Skip to content

Commit

Permalink
Update build system scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
acidicMercury8 committed Aug 22, 2023
1 parent be0132e commit 35c6f3a
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
config:
- Release
platform:
- Win32
- x86

runs-on: ${{ matrix.system }}

Expand All @@ -165,7 +165,7 @@ jobs:
- name: Get binaries
uses: actions/download-artifact@v3
with:
name: utils-bin-x86-${{ matrix.config }}-${{ github.sha }}
name: bin-utils-(${{ matrix.platform }}-${{ matrix.config }})-(${{ github.sha }})
path: bin/utils/Win32/${{ matrix.config }}/

- name: Generate patch
Expand Down
108 changes: 108 additions & 0 deletions pack-artifacts.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
:: Deleting unnecessary files
del "bin\*.ilk" /s
del "bin\*.lib" /s
del "bin\*.exp" /s
del "lib\*.idb" /s
del "lib\*.pdb" /s

:: Packing packages
"%ProgramFiles%"\7-Zip\7z.exe a "packages.zip" "packages"

:: Packing engine binaries
"%ProgramFiles%"\7-Zip\7z.exe a "bin-engine-debug.zip" "bin\Win32\Debug" ^
-ir!"bin\Win32\Debug\*" ^
-xr!"*.pdb" -xr!"bin\utils\Win32\*" -xr!"bin\dedicated\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "bin-engine-mixed.zip" "bin\Win32\Mixed" ^
-ir!"bin\Win32\Mixed\*" ^
-xr!"*.pdb" -xr!"bin\utils\Win32\*" -xr!"bin\dedicated\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "bin-engine-release.zip" "bin\Win32\Release" ^
-ir!"bin\Win32\Release\*" ^
-xr!"*.pdb" -xr!"bin\utils\Win32\*" -xr!"bin\dedicated\Win32\*"

:: Packing server binaries
"%ProgramFiles%"\7-Zip\7z.exe a "bin-server-debug.zip" "bin\dedicated\Win32\Debug" ^
-ir!"bin\dedicated\Win32\Debug\*" ^
-xr!"*.pdb" -xr!"bin\Win32\*" -xr!"bin\utils\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "bin-server-mixed.zip" "bin\dedicated\Win32\Mixed" ^
-ir!"bin\dedicated\Win32\Mixed\*" ^
-xr!"*.pdb" -xr!"bin\Win32\*" -xr!"bin\utils\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "bin-server-release.zip" "bin\dedicated\Win32\Release" ^
-ir!"bin\dedicated\Win32\Release\*" ^
-xr!"*.pdb" -xr!"bin\Win32\*" -xr!"bin\utils\Win32\*"

:: Packing utility binaries
"%ProgramFiles%"\7-Zip\7z.exe a "bin-utils-debug.zip" "bin\utils\Win32\Debug" ^
-ir!"bin\utils\Win32\Debug\*" ^
-xr!"*.pdb" -xr!"bin\Win32\*" -xr!"bin\dedicated\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "bin-utils-mixed.zip" "bin\utils\Win32\Mixed" ^
-ir!"bin\utils\Win32\Mixed\*" ^
-xr!"*.pdb" -xr!"bin\Win32\*" -xr!"bin\dedicated\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "bin-utils-release.zip" "bin\utils\Win32\Release" ^
-ir!"bin\utils\Win32\Release\*" ^
-xr!"*.pdb" -xr!"bin\Win32\*" -xr!"bin\dedicated\Win32\*"

:: Packing engine libraries
"%ProgramFiles%"\7-Zip\7z.exe a "lib-engine-debug.zip" "lib\Win32\Debug" ^
-ir!"lib\Win32\Debug\*" ^
-xr!"lib\utils\Win32\*" -xr!"lib\dedicated\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "lib-engine-mixed.zip" "lib\Win32\Mixed" ^
-ir!"lib\Win32\Mixed\*" ^
-xr!"lib\utils\Win32\*" -xr!"lib\dedicated\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "lib-engine-release.zip" "lib\Win32\Release" ^
-ir!"lib\Win32\Release\*" ^
-xr!"lib\utils\Win32\*" -xr!"lib\dedicated\Win32\*"

:: Packing server libraries
"%ProgramFiles%"\7-Zip\7z.exe a "lib-server-debug.zip" "lib\dedicated\Win32\Debug" ^
-ir!"lib\dedicated\Win32\Debug\*" ^
-xr!"lib\Win32\*" -xr!"lib\utils\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "lib-server-mixed.zip" "lib\dedicated\Win32\Mixed" ^
-ir!"lib\dedicated\Win32\Mixed\*" ^
-xr!"lib\Win32\*" -xr!"lib\utils\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "lib-server-release.zip" "lib\dedicated\Win32\Release" ^
-ir!"lib\dedicated\Win32\Release\*" ^
-xr!"lib\Win32\*" -xr!"lib\utils\Win32\*"

:: Packing utility libraries
"%ProgramFiles%"\7-Zip\7z.exe a "lib-utils-debug.zip" "lib\utils\Win32\Debug" ^
-ir!"lib\utils\Win32\Debug\*" ^
-xr!"lib\Win32\*" -xr!"lib\dedicated\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "lib-utils-mixed.zip" "lib\utils\Win32\Mixed" ^
-ir!"lib\utils\Win32\Mixed\*" ^
-xr!"lib\Win32\*" -xr!"lib\dedicated\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "lib-utils-release.zip" "lib\utils\Win32\Release" ^
-ir!"lib\utils\Win32\Release\*" ^
-xr!"lib\Win32\*" -xr!"lib\dedicated\Win32\*"

:: Packing engine symbols
"%ProgramFiles%"\7-Zip\7z.exe a "pdb-engine-debug.zip" "bin\Win32\Debug" ^
-ir!"bin\Win32\Debug\*" ^
-xr!"*.exe" -xr!"*.dll" -xr!"bin\utils\Win32\*" -xr!"bin\dedicated\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "pdb-engine-mixed.zip" "bin\Win32\Mixed" ^
-ir!"bin\Win32\Mixed\*" ^
-xr!"*.exe" -xr!"*.dll" -xr!"bin\utils\Win32\*" -xr!"bin\dedicated\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "pdb-engine-release.zip" "bin\Win32\Release" ^
-ir!"bin\Win32\Release\*" ^
-xr!"*.exe" -xr!"*.dll" -xr!"bin\utils\Win32\*" -xr!"bin\dedicated\Win32\*"

:: Packing server symbols
"%ProgramFiles%"\7-Zip\7z.exe a "pdb-server-debug.zip" "bin\dedicated\Win32\Debug" ^
-ir!"bin\dedicated\Win32\Debug\*" ^
-xr!"*.exe" -xr!"*.dll" -xr!"bin\Win32\*" -xr!"bin\utils\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "pdb-server-mixed.zip" "bin\dedicated\Win32\Mixed" ^
-ir!"bin\dedicated\Win32\Mixed\*" ^
-xr!"*.exe" -xr!"*.dll" -xr!"bin\Win32\*" -xr!"bin\utils\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "pdb-server-release.zip" "bin\dedicated\Win32\Release" ^
-ir!"bin\dedicated\Win32\Release\*" ^
-xr!"*.exe" -xr!"*.dll" -xr!"bin\Win32\*" -xr!"bin\utils\Win32\*"

:: Packing utility symbols
"%ProgramFiles%"\7-Zip\7z.exe a "pdb-utils-debug.zip" "bin\utils\Win32\Debug" ^
-ir!"bin\utils\Win32\Debug\*" ^
-xr!"*.exe" -xr!"*.dll" -xr!"bin\Win32\*" -xr!"bin\dedicated\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "pdb-utils-mixed.zip" "bin\utils\Win32\Mixed" ^
-ir!"bin\utils\Win32\Mixed\*" ^
-xr!"*.exe" -xr!"*.dll" -xr!"bin\Win32\*" -xr!"bin\dedicated\Win32\*"
"%ProgramFiles%"\7-Zip\7z.exe a "pdb-utils-release.zip" "bin\utils\Win32\Release" ^
-ir!"bin\utils\Win32\Release\*" ^
-xr!"*.exe" -xr!"*.dll" -xr!"bin\Win32\*" -xr!"bin\dedicated\Win32\*"
4 changes: 4 additions & 0 deletions src/Compressor.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
<ItemGroup>
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCore.dll" />
</ItemGroup>

<ItemGroup>
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCore.pdb" />
</ItemGroup>
</Project>
13 changes: 13 additions & 0 deletions src/Mixed.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Debug\lua.JIT.1.1.4.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Debug\luabind.beta7-devel.rc4.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Debug\xrAPI.dll" />

<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Release\editor.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Release\editor_controls.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Release\ImeSense.Controls.WinForms.PropertyGrid.dll" />
Expand All @@ -13,4 +14,16 @@
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Release\xrD3D9-Null.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Release\xrGameSpy.dll" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration.ToLower())' == 'mixed'">
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Debug\crypto.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Debug\lua.JIT.1.1.4.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Debug\luabind.beta7-devel.rc4.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Debug\xrAPI.pdb" />

<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Release\editor.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Release\editor_controls.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Release\xrD3D9-Null.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Release\xrGameSpy.pdb" />
</ItemGroup>
</Project>
71 changes: 55 additions & 16 deletions src/Server.targets
Original file line number Diff line number Diff line change
@@ -1,21 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Common-BinPath>$(MSBuildThisFileDirectory)\..\bin\</Common-BinPath>
</PropertyGroup>
<ItemGroup Condition="'$(Configuration.ToLower())' != 'mixed'">
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\libvorbis.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\libvorbisfile.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\openal32.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\lua.JIT.1.1.4.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\luabind.beta7-devel.rc4.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrAPI.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCDB.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCore.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCPU_Pipe.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrD3D9-Null.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrNetServer.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrSound.dll" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration.ToLower())' != 'mixed'">
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\lua.JIT.1.1.4.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\luabind.beta7-devel.rc4.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrAPI.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCDB.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCore.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCPU_Pipe.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrD3D9-Null.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrNetServer.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrSound.pdb" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration.ToLower())' == 'mixed'">
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\libvorbis.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\libvorbisfile.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\openal32.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCDB.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCore.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCPU_Pipe.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrNetServer.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrSound.dll" />

<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Debug\lua.JIT.1.1.4.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Debug\luabind.beta7-devel.rc4.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Debug\xrAPI.dll" />

<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Release\xrD3D9-Null.dll" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration.ToLower())' == 'mixed'">
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCDB.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCore.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrCPU_Pipe.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrNetServer.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\$(Configuration)\xrSound.pdb" />

<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Debug\lua.JIT.1.1.4.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Debug\luabind.beta7-devel.rc4.pdb" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Debug\xrAPI.pdb" />

<ItemGroup>
<ReferenceCopyLocalPaths Include="$(Common-BinPath)\libvorbis.dll" />
<ReferenceCopyLocalPaths Include="$(Common-BinPath)\libvorbisfile.dll" />
<ReferenceCopyLocalPaths Include="$(Common-BinPath)\lua.JIT.1.1.4.dll" />
<ReferenceCopyLocalPaths Include="$(Common-BinPath)\luabind.beta7-devel.rc4.dll" />
<ReferenceCopyLocalPaths Include="$(Common-BinPath)\openal32.dll" />
<ReferenceCopyLocalPaths Include="$(Common-BinPath)\xrAPI.dll" />
<ReferenceCopyLocalPaths Include="$(Common-BinPath)\xrCDB.dll" />
<ReferenceCopyLocalPaths Include="$(Common-BinPath)\xrCore.dll" />
<ReferenceCopyLocalPaths Include="$(Common-BinPath)\xrCPU_Pipe.dll" />
<ReferenceCopyLocalPaths Include="$(Common-BinPath)\xrD3D9-Null.dll" />
<ReferenceCopyLocalPaths Include="$(Common-BinPath)\xrNetServer.dll" />
<ReferenceCopyLocalPaths Include="$(Common-BinPath)\xrSound.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)\..\bin\$(Platform)\Release\xrD3D9-Null.pdb" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions src/xrEngine/xrServer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -497,4 +497,5 @@
<Error Condition="!Exists('..\..\packages\directxmath.2022.12.12.1\build\native\directxmath.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\directxmath.2022.12.12.1\build\native\directxmath.targets'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.DXSDK.D3DX.9.29.952.8\build\native\Microsoft.DXSDK.D3DX.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.DXSDK.D3DX.9.29.952.8\build\native\Microsoft.DXSDK.D3DX.targets'))" />
</Target>
<Import Project="..\Server.targets" />
</Project>

0 comments on commit 35c6f3a

Please sign in to comment.