Skip to content

Commit

Permalink
Merge pull request #7 from Planimeter/feature/VS2022
Browse files Browse the repository at this point in the history
Feature/vs2022
  • Loading branch information
andrewmcwatters authored Dec 15, 2024
2 parents a9b8ad5 + 913888c commit 6365fa0
Show file tree
Hide file tree
Showing 97 changed files with 462 additions and 213 deletions.
Binary file added .github/workflows/DefaultProjectExtension.reg
Binary file not shown.
54 changes: 54 additions & 0 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: MSBuild

on:
push:
branches: [ "master", "feature/msbuild" ]
pull_request:
branches: [ "master" ]

env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: ./mp/src/games.sln

# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release

permissions:
contents: read

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Add MSBuild to PATH
uses: microsoft/[email protected]

# - name: Restore NuGet packages
# working-directory: ${{env.GITHUB_WORKSPACE}}
# run: nuget restore ${{env.SOLUTION_FILE_PATH}}

- run: REG IMPORT .github/workflows/DefaultProjectExtension.reg

- working-directory: ./mp/src
shell: cmd
run: creategameprojects.bat

- working-directory: ./mp/src
shell: bash
run: ./devtools/fixsln.sh games.sln

- name: Build
working-directory: ${{github.workspace}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,10 @@ config.cfg
# shader files
*.tmp

*.lib
.vs
Debug*/
Release*/
*.vcxproj.*
*.vpc.sentinel
*.pdb
2 changes: 1 addition & 1 deletion mp/src/createallprojects.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
devtools\bin\vpc.exe /hl2mp +everything /mksln everything.sln
devtools\bin\vpc.exe /hl2mp +everything /mksln everything.sln /define:VS2022
2 changes: 1 addition & 1 deletion mp/src/creategameprojects.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
devtools\bin\vpc.exe /hl2mp +game /mksln games.sln
devtools\bin\vpc.exe /hl2mp +game /mksln games.sln /define:VS2022
41 changes: 41 additions & 0 deletions mp/src/devtools/fixsln.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh

Global=$(cat << 'EOF'
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{17BCE59A-9037-EC8D-433E-F81339E2F1BA}.Debug|Win32.ActiveCfg = Debug|Win32
{17BCE59A-9037-EC8D-433E-F81339E2F1BA}.Debug|Win32.Build.0 = Debug|Win32
{17BCE59A-9037-EC8D-433E-F81339E2F1BA}.Release|Win32.ActiveCfg = Release|Win32
{17BCE59A-9037-EC8D-433E-F81339E2F1BA}.Release|Win32.Build.0 = Release|Win32
{BAB92FF0-D72A-D7E5-1988-74628D39B94F}.Debug|Win32.ActiveCfg = Debug|Win32
{BAB92FF0-D72A-D7E5-1988-74628D39B94F}.Debug|Win32.Build.0 = Debug|Win32
{BAB92FF0-D72A-D7E5-1988-74628D39B94F}.Release|Win32.ActiveCfg = Release|Win32
{BAB92FF0-D72A-D7E5-1988-74628D39B94F}.Release|Win32.Build.0 = Release|Win32
{95D67225-8415-236F-9128-DCB171B7DEC6}.Debug|Win32.ActiveCfg = Debug|Win32
{95D67225-8415-236F-9128-DCB171B7DEC6}.Debug|Win32.Build.0 = Debug|Win32
{95D67225-8415-236F-9128-DCB171B7DEC6}.Release|Win32.ActiveCfg = Release|Win32
{95D67225-8415-236F-9128-DCB171B7DEC6}.Release|Win32.Build.0 = Release|Win32
{33B7DFDC-BECB-3678-1190-6C951E393EB3}.Debug|Win32.ActiveCfg = Debug|Win32
{33B7DFDC-BECB-3678-1190-6C951E393EB3}.Debug|Win32.Build.0 = Debug|Win32
{33B7DFDC-BECB-3678-1190-6C951E393EB3}.Release|Win32.ActiveCfg = Release|Win32
{33B7DFDC-BECB-3678-1190-6C951E393EB3}.Release|Win32.Build.0 = Release|Win32
{EC1C516D-E1D9-BC0A-F79D-E91E954ED8EC}.Debug|Win32.ActiveCfg = Debug|Win32
{EC1C516D-E1D9-BC0A-F79D-E91E954ED8EC}.Debug|Win32.Build.0 = Debug|Win32
{EC1C516D-E1D9-BC0A-F79D-E91E954ED8EC}.Release|Win32.ActiveCfg = Release|Win32
{EC1C516D-E1D9-BC0A-F79D-E91E954ED8EC}.Release|Win32.Build.0 = Release|Win32
{F69B3672-C5E8-CD1A-257F-253A25B5B939}.Debug|Win32.ActiveCfg = Debug|Win32
{F69B3672-C5E8-CD1A-257F-253A25B5B939}.Debug|Win32.Build.0 = Debug|Win32
{F69B3672-C5E8-CD1A-257F-253A25B5B939}.Release|Win32.ActiveCfg = Release|Win32
{F69B3672-C5E8-CD1A-257F-253A25B5B939}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
EOF
)
echo "$Global" >> "$1"
1 change: 1 addition & 0 deletions mp/src/game/client/achievement_notification_panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class CAchievementNotificationPanel : public CHudElement, public EditablePanel

public:
CAchievementNotificationPanel( const char *pElementName );
virtual ~CAchievementNotificationPanel() {}

virtual void Init();
virtual void ApplySchemeSettings( IScheme *scheme );
Expand Down
2 changes: 1 addition & 1 deletion mp/src/game/client/c_baseentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4751,7 +4751,7 @@ C_BaseEntity *C_BaseEntity::Instance( int iEnt )

#ifdef WIN32
#pragma warning( push )
#include <typeinfo.h>
#include <typeinfo>
#pragma warning( pop )
#endif

Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/c_point_commentary_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class CHudCommentary : public CHudElement, public vgui::Panel
DECLARE_CLASS_SIMPLE( CHudCommentary, vgui::Panel );
public:
CHudCommentary( const char *name );
virtual ~CHudCommentary() {}

virtual void Init( void );
virtual void VidInit( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/c_vguiscreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class CVGuiScreenPanel : public vgui::EditablePanel
public:
CVGuiScreenPanel( vgui::Panel *parent, const char *panelName );
CVGuiScreenPanel( vgui::Panel *parent, const char *panelName, vgui::HScheme hScheme );
virtual ~CVGuiScreenPanel() {}
virtual bool Init( KeyValues* pKeyValues, VGuiScreenInitData_t* pInitData );
vgui::Panel *CreateControlByName(const char *controlName);
virtual void OnCommand( const char *command );
Expand Down
3 changes: 2 additions & 1 deletion mp/src/game/client/client_base.vpc
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ $Configuration
$SystemFrameworks "Carbon" [$OSXALL]
$SystemLibraries "rt" [$LINUXALL]
$IgnoreImportLibrary "TRUE"
$AdditionalDependencies "$BASE winmm.lib" [$WIN32]
$AdditionalDependencies "$BASE winmm.lib legacy_stdio_definitions.lib" [$WIN32]
$AdditionalDependencies "$BASE wsock32.lib Ws2_32.lib" [$BUILD_REPLAY]
$ForceFileOutput "Multiply Defined Symbol Only (/FORCE:MULTIPLE)" [$VS2022]
}
}

Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/commentary_modelviewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class CCommentaryModelPanel : public CModelPanel
DECLARE_CLASS_SIMPLE( CCommentaryModelPanel, CModelPanel );

CCommentaryModelPanel( vgui::Panel *parent, const char *name );
virtual ~CCommentaryModelPanel() {}
};

//-----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/game_controls/IconPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class CIconPanel : public vgui::Panel

public:
CIconPanel( vgui::Panel *parent, const char *name );
virtual ~CIconPanel() {}

void Init( void );
virtual void Paint();
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/game_controls/SpectatorGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class CSpecButton : public Button
{
public:
CSpecButton(Panel *parent, const char *panelName): Button(parent, panelName, "") {}
virtual ~CSpecButton() {}

private:
void ApplySchemeSettings(vgui::IScheme *pScheme)
Expand Down
4 changes: 4 additions & 0 deletions mp/src/game/client/game_controls/baseviewport.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ class CBaseViewport : public vgui::EditablePanel, public IViewPort, public IGame
SetSizeable(false);
SetProportional(true);
}

virtual ~CBackGroundPanel()
{
}
private:

virtual void ApplySchemeSettings(IScheme *pScheme)
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/game_controls/vguitextwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class CTextWindow : public vgui::Frame, public IViewPortPanel

public:
CMOTDHTML( Panel *parent, const char *pchName ) : vgui::HTML( parent, pchName ) {}
virtual ~CMOTDHTML() {}
virtual bool OnStartRequest( const char *url, const char *target, const char *pchPostData, bool bIsRedirect ) OVERRIDE;
};
CMOTDHTML *m_pHTMLMessage;
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/geiger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class CHudGeiger: public CHudElement, public vgui::Panel
DECLARE_CLASS_SIMPLE( CHudGeiger, vgui::Panel );
public:
CHudGeiger( const char *pElementName );
virtual ~CHudGeiger() {}
void Init( void );
void VidInit( void );
bool ShouldDraw( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/history_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class CHudHistoryResource : public CHudElement, public vgui::Panel
public:

CHudHistoryResource( const char *pElementName );
virtual ~CHudHistoryResource() {}

// CHudElement overrides
virtual void Init( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/c_info_teleporter_countdown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class CTeleportCountdownScreen : public CVGuiScreenPanel

public:
CTeleportCountdownScreen( vgui::Panel *parent, const char *panelName );
virtual ~CTeleportCountdownScreen() {}

virtual bool Init( KeyValues* pKeyValues, VGuiScreenInitData_t* pInitData );
virtual void OnTick();
Expand Down
5 changes: 5 additions & 0 deletions mp/src/game/client/hl2/hud_ammo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class CHudAmmo : public CHudNumericDisplay, public CHudElement

public:
CHudAmmo( const char *pElementName );
virtual ~CHudAmmo() {}
void Init( void );
void VidInit( void );
void Reset();
Expand Down Expand Up @@ -366,6 +367,10 @@ class CHudSecondaryAmmo : public CHudNumericDisplay, public CHudElement
SetHiddenBits( HIDEHUD_HEALTH | HIDEHUD_WEAPONSELECTION | HIDEHUD_PLAYERDEAD | HIDEHUD_NEEDSUIT );
}

virtual ~CHudSecondaryAmmo()
{
}

void Init( void )
{
#ifndef HL2MP
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_battery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class CHudBattery : public CHudNumericDisplay, public CHudElement

public:
CHudBattery( const char *pElementName );
virtual ~CHudBattery() {}
void Init( void );
void Reset( void );
void VidInit( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_credits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class CHudCredits : public CHudElement, public vgui::Panel

public:
CHudCredits( const char *pElementName );
virtual ~CHudCredits() {}
virtual void Init( void );
virtual void LevelShutdown( void );

Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_damageindicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class CHudDamageIndicator : public CHudElement, public vgui::Panel

public:
CHudDamageIndicator( const char *pElementName );
virtual ~CHudDamageIndicator() {}
void Init( void );
void Reset( void );
virtual bool ShouldDraw( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_filmdemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class CHudFilmDemo : public CHudElement, public vgui::Panel
DECLARE_CLASS_SIMPLE( CHudFilmDemo, vgui::Panel );
public:
CHudFilmDemo( const char *name );
virtual ~CHudFilmDemo() {}

// vgui overrides
virtual void ApplySchemeSettings(vgui::IScheme *pScheme );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_flashlight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class CHudFlashlight : public CHudElement, public vgui::Panel

public:
CHudFlashlight( const char *pElementName );
virtual ~CHudFlashlight() {}
virtual void ApplySchemeSettings( vgui::IScheme *pScheme );

protected:
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_hdrdemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class CHudHDRDemo : public CHudElement, public vgui::Panel
DECLARE_CLASS_SIMPLE( CHudHDRDemo, vgui::Panel );
public:
CHudHDRDemo( const char *name );
virtual ~CHudHDRDemo() {}

// vgui overrides
virtual void ApplySchemeSettings(vgui::IScheme *pScheme );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_health.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class CHudHealth : public CHudElement, public CHudNumericDisplay

public:
CHudHealth( const char *pElementName );
virtual ~CHudHealth() {}
virtual void Init( void );
virtual void VidInit( void );
virtual void Reset( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_poisondamageindicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class CHudPoisonDamageIndicator : public CHudElement, public vgui::Panel

public:
CHudPoisonDamageIndicator( const char *pElementName );
virtual ~CHudPoisonDamageIndicator() {}
void Reset( void );
virtual bool ShouldDraw( void );

Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_quickinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class CHUDQuickInfo : public CHudElement, public vgui::Panel
DECLARE_CLASS_SIMPLE( CHUDQuickInfo, vgui::Panel );
public:
CHUDQuickInfo( const char *pElementName );
virtual ~CHUDQuickInfo() {}
void Init( void );
void VidInit( void );
bool ShouldDraw( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_suitpower.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class CHudSuitPower : public CHudElement, public vgui::Panel

public:
CHudSuitPower( const char *pElementName );
virtual ~CHudSuitPower() {}
virtual void Init( void );
virtual void Reset( void );
virtual void OnThink( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_weaponselection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class CHudWeaponSelection : public CBaseHudWeaponSelection, public vgui::Panel

public:
CHudWeaponSelection(const char *pElementName );
virtual ~CHudWeaponSelection() {}

virtual bool ShouldDraw();
virtual void OnWeaponPickup( C_BaseCombatWeapon *pWeapon );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_zoom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class CHudZoom : public vgui::Panel, public CHudElement

public:
CHudZoom( const char *pElementName );
virtual ~CHudZoom() {}

bool ShouldDraw( void );
void Init( void );
Expand Down
3 changes: 3 additions & 0 deletions mp/src/game/client/hl2mp/clientmode_hl2mpnormal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ ClientModeHL2MPNormal* GetClientModeHL2MPNormal()
//-----------------------------------------------------------------------------
class CHudViewport : public CBaseViewport
{
public:
CHudViewport() {}
virtual ~CHudViewport() {}
private:
DECLARE_CLASS_SIMPLE( CHudViewport, CBaseViewport );

Expand Down
3 changes: 3 additions & 0 deletions mp/src/game/client/hl2mp/hl2mp_hud_chat.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class CHudChatLine : public CBaseHudChatLine

public:
CHudChatLine( vgui::Panel *parent, const char *panelName ) : CBaseHudChatLine( parent, panelName ) {}
virtual ~CHudChatLine() {}

virtual void ApplySchemeSettings(vgui::IScheme *pScheme);

Expand All @@ -39,6 +40,7 @@ class CHudChatInputLine : public CBaseHudChatInputLine

public:
CHudChatInputLine( CBaseHudChat *parent, char const *panelName ) : CBaseHudChatInputLine( parent, panelName ) {}
virtual ~CHudChatInputLine() {}

virtual void ApplySchemeSettings(vgui::IScheme *pScheme);
};
Expand All @@ -49,6 +51,7 @@ class CHudChat : public CBaseHudChat

public:
CHudChat( const char *pElementName );
virtual ~CHudChat() {}

virtual void CreateChatInputLine( void );
virtual void CreateChatLines( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2mp/hl2mp_hud_target_id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class CTargetID : public CHudElement, public vgui::Panel

public:
CTargetID( const char *pElementName );
virtual ~CTargetID() {}
void Init( void );
virtual void ApplySchemeSettings( vgui::IScheme *scheme );
virtual void Paint( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2mp/hl2mp_hud_team.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class CTeamPlayHud : public vgui::Panel, public CHudElement

public:
CTeamPlayHud( const char *pElementName );
virtual ~CTeamPlayHud() {}
void Reset();

virtual void PerformLayout();
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2mp/hud_deathnotice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class CHudDeathNotice : public CHudElement, public vgui::Panel
DECLARE_CLASS_SIMPLE( CHudDeathNotice, vgui::Panel );
public:
CHudDeathNotice( const char *pElementName );
virtual ~CHudDeathNotice() {}

void Init( void );
void VidInit( void );
Expand Down
Loading

0 comments on commit 6365fa0

Please sign in to comment.