diff --git a/.github/workflows/build-and-deploy-release.yml b/.github/workflows/build-and-deploy-release.yml new file mode 100644 index 000000000..60bc19ec1 --- /dev/null +++ b/.github/workflows/build-and-deploy-release.yml @@ -0,0 +1,76 @@ +name: build and deploy snapshots +on: + release: + types: [published] +jobs: + build: + if: github.repository == 'QW-Group/ezquake-source' + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + target: [windows-glsl-x64, windows-opengl-x64, windows-combined-x64] + include: + - target: windows-glsl-x64 + config: rls-modern + platform: x64 + - target: windows-opengl-x64 + config: rls-classic + platform: x64 + - target: windows-combined-x64 + config: rls-all + platform: x64 + + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + + - name: Build txt2c + run: msbuild misc\vstudio\txt2c\txt2c.vcxproj -t:rebuild -property:Configuration=Release + + - name: Make dir + run: mkdir .vs + + - name: Copy txt2c + run: cp misc\vstudio\txt2c\.vs\txt2c.exe .vs\ + + - name: Build ezquake + run: msbuild ezQuake.vcxproj -t:rebuild -property:Configuration=${{ matrix.config }} -property:Platform=${{ matrix.platform }} + + - name: Create checksum + run: | + md5sum .vs\${{ matrix.platform }}\${{ matrix.config }}\Output\ezQuake.exe > .vs\${{ matrix.platform }}\${{ matrix.config }}\Output\ezQuake.md5 + + - name: Invoke msys + uses: msys2/setup-msys2@v2 + with: + install: openssh + + - name: Setup SSH + shell: msys2 {0} + env: + SSH_AUTH_SOCK: C:\ssh_agent.sock + run: | + ssh-agent -a $SSH_AUTH_SOCK > /dev/null + ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" + - name: Set date + shell: msys2 {0} + run: | + #timedatectl set-timezone Europe/Amsterdam + export TZ=CET-1CEST + echo "DATE=$(date "+%Y%m%d-%H%M%S")" >> $GITHUB_ENV + - name: Deploy + shell: msys2 {0} + env: + SSH_AUTH_SOCK: C:\ssh_agent.sock + run: | + mkdir -p upload/releases/${{ matrix.platform }}/${{ matrix.config }} + mkdir -p upload/releases/latest/${{ matrix.platform }}/${{ matrix.config }} + cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.exe upload/releases/${{ matrix.platform }}/${{ matrix.config }}/${{ env.DATE }}_${GITHUB_SHA::7}_ezquake.exe + cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.md5 upload/releases/${{ matrix.platform }}/${{ matrix.config }}/${{ env.DATE }}_${GITHUB_SHA::7}_ezquake.md5 + cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.exe upload/releases/latest/${{ matrix.platform }}/${{ matrix.config }}/ezquake.exe + cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.md5 upload/releases/latest/${{ matrix.platform }}/${{ matrix.config }}/ezquake.md5 + sftp -rp -o 'StrictHostKeyChecking no' -o 'UserKnownHostsFile /dev/null' -P ${{ secrets.SFTP_PORT }} ${{ secrets.SFTP_USERNAME }}@${{ secrets.SFTP_HOST }}:/releases <<< $'put -rp upload/releases/*' diff --git a/.github/workflows/build-and-deploy-snapshots.yml b/.github/workflows/build-and-deploy-snapshots.yml new file mode 100644 index 000000000..a64a34db3 --- /dev/null +++ b/.github/workflows/build-and-deploy-snapshots.yml @@ -0,0 +1,74 @@ +name: build and deploy snapshots +on: [push] +jobs: + build: + if: github.repository == 'QW-Group/ezquake-source' + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + target: [windows-glsl-x64, windows-opengl-x64, windows-combined-x64] + include: + - target: windows-glsl-x64 + config: rls-modern + platform: x64 + - target: windows-opengl-x64 + config: rls-classic + platform: x64 + - target: windows-combined-x64 + config: rls-all + platform: x64 + + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + + - name: Build txt2c + run: msbuild misc\vstudio\txt2c\txt2c.vcxproj -t:rebuild -property:Configuration=Release + + - name: Make dir + run: mkdir .vs + + - name: Copy txt2c + run: cp misc\vstudio\txt2c\.vs\txt2c.exe .vs\ + + - name: Build ezquake + run: msbuild ezQuake.vcxproj -t:rebuild -property:Configuration=${{ matrix.config }} -property:Platform=${{ matrix.platform }} + + - name: Create checksum + run: | + md5sum .vs\${{ matrix.platform }}\${{ matrix.config }}\Output\ezQuake.exe > .vs\${{ matrix.platform }}\${{ matrix.config }}\Output\ezQuake.md5 + + - name: Invoke msys + uses: msys2/setup-msys2@v2 + with: + install: openssh + + - name: Setup SSH + shell: msys2 {0} + env: + SSH_AUTH_SOCK: C:\ssh_agent.sock + run: | + ssh-agent -a $SSH_AUTH_SOCK > /dev/null + ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" + - name: Set date + shell: msys2 {0} + run: | + #timedatectl set-timezone Europe/Amsterdam + export TZ=CET-1CEST + echo "DATE=$(date "+%Y%m%d-%H%M%S")" >> $GITHUB_ENV + - name: Deploy + shell: msys2 {0} + env: + SSH_AUTH_SOCK: C:\ssh_agent.sock + run: | + mkdir -p upload/snapshots/${{ matrix.platform }}/${{ matrix.config }} + mkdir -p upload/snapshots/latest/${{ matrix.platform }}/${{ matrix.config }} + cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.exe upload/snapshots/${{ matrix.platform }}/${{ matrix.config }}/${{ env.DATE }}_${GITHUB_SHA::7}_ezquake.exe + cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.md5 upload/snapshots/${{ matrix.platform }}/${{ matrix.config }}/${{ env.DATE }}_${GITHUB_SHA::7}_ezquake.md5 + cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.exe upload/snapshots/latest/${{ matrix.platform }}/${{ matrix.config }}/ezquake.exe + cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.md5 upload/snapshots/latest/${{ matrix.platform }}/${{ matrix.config }}/ezquake.md5 + sftp -rp -o 'StrictHostKeyChecking no' -o 'UserKnownHostsFile /dev/null' -P ${{ secrets.SFTP_PORT }} ${{ secrets.SFTP_USERNAME }}@${{ secrets.SFTP_HOST }}:/snapshots <<< $'put -rp upload/snapshots/*' diff --git a/.github/workflows/build-targets.yml b/.github/workflows/build-targets.yml new file mode 100644 index 000000000..04889b91e --- /dev/null +++ b/.github/workflows/build-targets.yml @@ -0,0 +1,45 @@ +name: build targets +on: [pull_request] +jobs: + build: + if: github.repository == 'QW-Group/ezquake-source' + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + target: [windows-glsl-x64, windows-opengl-x64, windows-combined-x64] + include: + - target: windows-glsl-x64 + config: rls-modern + platform: x64 + - target: windows-opengl-x64 + config: rls-classic + platform: x64 + - target: windows-combined-x64 + config: dbg-all + platform: x64 + + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + + - name: Build txt2c + run: msbuild misc\vstudio\txt2c\txt2c.vcxproj -t:rebuild -property:Configuration=Release + + - name: Make dir + run: mkdir .vs + + - name: Copy txt2c + run: cp misc\vstudio\txt2c\.vs\txt2c.exe .vs\ + + - name: Build ezquake + run: msbuild ezQuake.vcxproj -t:rebuild -property:Configuration=${{ matrix.config }} -property:Platform=${{ matrix.platform }} + + - name: Archive client + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.target }} + path: .vs\${{ matrix.platform }}\${{ matrix.config }}\Output\ezQuake.exe diff --git a/.gitignore b/.gitignore index 990d825de..c2b690747 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -.* !.travis.yml ezquake ezquake.exe diff --git a/ezQuake.sln b/ezQuake.sln index 802615767..b9f2b1a04 100644 --- a/ezQuake.sln +++ b/ezQuake.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30611.23 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32825.248 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ezQuake", "ezQuake.vcxproj", "{5147CA71-1D3D-4F61-9847-87B36421C323}" ProjectSection(ProjectDependencies) = postProject @@ -85,8 +85,8 @@ Global {5147CA71-1D3D-4F61-9847-87B36421C323}.rls-all|Any CPU.Build.0 = dbg-all|Win32 {5147CA71-1D3D-4F61-9847-87B36421C323}.rls-all|ARM.ActiveCfg = rls-all|Win32 {5147CA71-1D3D-4F61-9847-87B36421C323}.rls-all|ARM64.ActiveCfg = rls-all|Win32 - {5147CA71-1D3D-4F61-9847-87B36421C323}.rls-all|x64.ActiveCfg = dbg-all|x64 - {5147CA71-1D3D-4F61-9847-87B36421C323}.rls-all|x64.Build.0 = dbg-all|x64 + {5147CA71-1D3D-4F61-9847-87B36421C323}.rls-all|x64.ActiveCfg = rls-all|x64 + {5147CA71-1D3D-4F61-9847-87B36421C323}.rls-all|x64.Build.0 = rls-all|x64 {5147CA71-1D3D-4F61-9847-87B36421C323}.rls-all|x86.ActiveCfg = dbg-all|Win32 {5147CA71-1D3D-4F61-9847-87B36421C323}.rls-all|x86.Build.0 = dbg-all|Win32 {5147CA71-1D3D-4F61-9847-87B36421C323}.rls-classic|Any CPU.ActiveCfg = rls-classic|Win32 diff --git a/ezQuake.vcxproj b/ezQuake.vcxproj index fb454f0aa..bf97a6ac5 100644 --- a/ezQuake.vcxproj +++ b/ezQuake.vcxproj @@ -68,7 +68,7 @@ Application true - v142 + v143 MultiByte @@ -80,78 +80,78 @@ Application true - v142 + v143 MultiByte Application true - v142 + v143 MultiByte Application false - v142 + v143 true MultiByte Application false - v142 + v143 true MultiByte Application false - v142 + v143 true MultiByte Application true - v142 + v143 MultiByte Application true - v142 + v143 MultiByte Application true - v142 + v143 MultiByte Application true - v142 + v143 MultiByte Application false - v142 + v143 true MultiByte Application false - v142 + v143 true MultiByte Application false - v142 + v143 true MultiByte @@ -319,6 +319,7 @@ Setupapi.lib;libspeexdsp.lib;libspeex.lib;libsndfile.lib;freetyped.lib;version.lib;imm32.lib;winmm.lib;turbojpeg-static.lib;SDL2.lib;comctl32.lib;wldap32.lib;Winmm.lib;OpenGL32.lib;ws2_32.lib;sdl2.lib;jansson_d.lib;libpng16.lib;zlib.lib;libcurld.lib;libexpat.lib;pcred.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) /ignore:4099 /LTCG %(AdditionalOptions) + UseFastLinkTimeCodeGeneration cd $(SolutionDir) @@ -372,6 +373,7 @@ msversion.bat Setupapi.lib;libspeexdsp.lib;libspeex.lib;libsndfile.lib;freetyped.lib;version.lib;imm32.lib;winmm.lib;turbojpeg-static.lib;SDL2.lib;comctl32.lib;wldap32.lib;Winmm.lib;OpenGL32.lib;ws2_32.lib;sdl2.lib;jansson_d.lib;libpng16.lib;zlib.lib;libcurld.lib;libexpat.lib;pcred.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) /ignore:4099 /LTCG %(AdditionalOptions) + UseFastLinkTimeCodeGeneration cd $(SolutionDir) @@ -425,6 +427,7 @@ msversion.bat Setupapi.lib;libspeexdsp.lib;libspeex.lib;libsndfile.lib;freetyped.lib;version.lib;imm32.lib;winmm.lib;turbojpeg-static.lib;SDL2.lib;comctl32.lib;wldap32.lib;Winmm.lib;OpenGL32.lib;ws2_32.lib;sdl2.lib;jansson_d.lib;libpng16.lib;zlib.lib;libcurld.lib;libexpat.lib;pcred.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) /ignore:4099 /LTCG %(AdditionalOptions) + UseFastLinkTimeCodeGeneration cd $(SolutionDir) @@ -478,6 +481,7 @@ msversion.bat Setupapi.lib;libspeexdsp.lib;libspeex.lib;libsndfile.lib;freetyped.lib;version.lib;imm32.lib;winmm.lib;turbojpeg-static.lib;SDL2.lib;comctl32.lib;wldap32.lib;Winmm.lib;OpenGL32.lib;ws2_32.lib;sdl2.lib;jansson_d.lib;libpng16.lib;zlib.lib;libcurld.lib;libexpat.lib;pcred.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) /ignore:4099 /LTCG %(AdditionalOptions) + UseFastLinkTimeCodeGeneration cd $(SolutionDir) @@ -531,6 +535,7 @@ msversion.bat Setupapi.lib;libsndfile.lib;freetyped.lib;version.lib;imm32.lib;winmm.lib;turbojpeg-static.lib;SDL2.lib;comctl32.lib;wldap32.lib;Winmm.lib;OpenGL32.lib;ws2_32.lib;sdl2.lib;jansson_d.lib;libpng16.lib;zlib.lib;libcurld.lib;libexpat.lib;pcred.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + UseFastLinkTimeCodeGeneration copy /y $(TargetPath) $(ProjectDir) @@ -574,6 +579,7 @@ msversion.bat Setupapi.lib;libsndfile.lib;freetyped.lib;version.lib;imm32.lib;winmm.lib;turbojpeg-static.lib;SDL2.lib;comctl32.lib;wldap32.lib;Winmm.lib;OpenGL32.lib;ws2_32.lib;sdl2.lib;jansson_d.lib;libpng16.lib;zlib.lib;libcurld.lib;libexpat.lib;pcred.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + UseFastLinkTimeCodeGeneration copy /y $(TargetPath) $(ProjectDir) @@ -617,6 +623,7 @@ msversion.bat Setupapi.lib;libsndfile.lib;freetyped.lib;version.lib;imm32.lib;winmm.lib;turbojpeg-static.lib;SDL2.lib;comctl32.lib;wldap32.lib;Winmm.lib;OpenGL32.lib;ws2_32.lib;sdl2.lib;jansson_d.lib;libpng16.lib;zlib.lib;libcurld.lib;libexpat.lib;pcred.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + UseFastLinkTimeCodeGeneration copy /y $(TargetPath) $(ProjectDir) @@ -660,6 +667,7 @@ msversion.bat Setupapi.lib;libsndfile.lib;freetyped.lib;version.lib;imm32.lib;winmm.lib;turbojpeg-static.lib;SDL2.lib;comctl32.lib;wldap32.lib;Winmm.lib;OpenGL32.lib;ws2_32.lib;sdl2.lib;jansson_d.lib;libpng16.lib;zlib.lib;libcurld.lib;libexpat.lib;pcred.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + UseFastLinkTimeCodeGeneration copy /y $(TargetPath) $(ProjectDir) @@ -706,6 +714,7 @@ msversion.bat /ignore:4099 /LTCG %(AdditionalOptions) NotSet true + UseFastLinkTimeCodeGeneration cd $(SolutionDir) @@ -757,6 +766,7 @@ msversion.bat /ignore:4099 /LTCG %(AdditionalOptions) NotSet true + UseFastLinkTimeCodeGeneration cd $(SolutionDir) @@ -809,6 +819,7 @@ msversion.bat /ignore:4099 /LTCG %(AdditionalOptions) NotSet true + UseFastLinkTimeCodeGeneration cd $(SolutionDir) @@ -849,7 +860,7 @@ msversion.bat true true true - EZ_FREETYPE_SUPPORT_STATIC;EZ_FREETYPE_SUPPORT;WITH_NQPROGS;XML_STATIC;USE_PR2;__Q_PNG14__;WITH_ZIP;WITH_ZLIB;WITH_JPEG;WITH_PNG;PCRE_STATIC;CURL_STATICLIB;JSS_CAM;_MBCS;%(PreprocessorDefinitions) + EZ_FREETYPE_SUPPORT_STATIC;RENDERER_OPTION_MODERN_OPENGL;RENDERER_OPTION_CLASSIC_OPENGL;EZ_FREETYPE_SUPPORT;WITH_NQPROGS;XML_STATIC;USE_PR2;__Q_PNG14__;WITH_ZIP;WITH_ZLIB;WITH_JPEG;WITH_PNG;PCRE_STATIC;CURL_STATICLIB;JSS_CAM;_MBCS;%(PreprocessorDefinitions) @@ -858,6 +869,7 @@ msversion.bat true Setupapi.lib;libsndfile.lib;freetyped.lib;version.lib;imm32.lib;winmm.lib;turbojpeg-static.lib;SDL2.lib;comctl32.lib;wldap32.lib;Winmm.lib;OpenGL32.lib;ws2_32.lib;sdl2.lib;jansson_d.lib;libpng16.lib;zlib.lib;libcurld.lib;libexpat.lib;pcred.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) true + UseFastLinkTimeCodeGeneration cd $(SolutionDir) @@ -906,6 +918,7 @@ msversion.bat true Setupapi.lib;libsndfile.lib;freetyped.lib;version.lib;imm32.lib;winmm.lib;turbojpeg-static.lib;SDL2.lib;comctl32.lib;wldap32.lib;Winmm.lib;OpenGL32.lib;ws2_32.lib;sdl2.lib;jansson_d.lib;libpng16.lib;zlib.lib;libcurld.lib;libexpat.lib;pcred.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) true + UseFastLinkTimeCodeGeneration cd $(SolutionDir) @@ -954,6 +967,7 @@ msversion.bat true Setupapi.lib;libsndfile.lib;freetyped.lib;version.lib;imm32.lib;winmm.lib;turbojpeg-static.lib;SDL2.lib;comctl32.lib;wldap32.lib;Winmm.lib;OpenGL32.lib;ws2_32.lib;sdl2.lib;jansson_d.lib;libpng16.lib;zlib.lib;libcurld.lib;libexpat.lib;pcred.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) true + UseFastLinkTimeCodeGeneration cd $(SolutionDir) diff --git a/fs.h b/fs.h index 4d4cceb58..2f8f03b45 100644 --- a/fs.h +++ b/fs.h @@ -104,7 +104,7 @@ typedef enum { | FS_LOAD_FILE_PK4 | FS_LOAD_FILE_DOOMWAD | FS_LOAD_FROM_PAKLST, } FS_Load_File_Types; -void FS_AddGameDirectory (char *dir, unsigned int loadstuff); +void FS_AddGameDirectory (char *dir, FS_Load_File_Types loadstuff); char *FS_NextPath (char *prevpath); diff --git a/misc/vstudio/txt2c/txt2c.vcxproj b/misc/vstudio/txt2c/txt2c.vcxproj index dfbed4081..d577c1445 100644 --- a/misc/vstudio/txt2c/txt2c.vcxproj +++ b/misc/vstudio/txt2c/txt2c.vcxproj @@ -34,7 +34,7 @@ Application false - v142 + v143 true Unicode @@ -47,7 +47,7 @@ Application false - v142 + v143 true Unicode