diff --git a/.github/workflows/build-on-pr.yml b/.github/workflows/build-on-pr.yml new file mode 100644 index 0000000..f3d8e34 --- /dev/null +++ b/.github/workflows/build-on-pr.yml @@ -0,0 +1,32 @@ +name: Package Pull Request + +on: + pull_request: + branches: + - master + +jobs: + build: + runs-on: windows-latest + + steps: + # Step 1: Checkout repository + - name: Checkout repository + uses: actions/checkout@v3 + + # Step 2: Set up MS Build + - name: Set up MS Build + uses: microsoft/setup-msbuild@v1 + + # Step 3: Build the project using the Package configuration + - name: Build HaloCEVR + run: | + msbuild HaloCEVR.sln /p:Configuration=Package /p:Platform=x86 /p:WholeProgramOptimization=false + + # Step 4: Upload Zip file + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: HaloCEVR + path: HaloCEVR.zip + diff --git a/.gitignore b/.gitignore index fa98710..caeb188 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ mono_crash.* [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ +[Pp]ackage/ [Rr]eleases/ x64/ x86/ diff --git a/HaloCEVR.sln b/HaloCEVR.sln index 342ef7d..9df7293 100644 --- a/HaloCEVR.sln +++ b/HaloCEVR.sln @@ -9,6 +9,8 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 + Package|x64 = Package|x64 + Package|x86 = Package|x86 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection @@ -17,6 +19,10 @@ Global {4EE74470-E365-48E4-9920-237AA8B6F6D0}.Debug|x64.Build.0 = Debug|x64 {4EE74470-E365-48E4-9920-237AA8B6F6D0}.Debug|x86.ActiveCfg = Debug|Win32 {4EE74470-E365-48E4-9920-237AA8B6F6D0}.Debug|x86.Build.0 = Debug|Win32 + {4EE74470-E365-48E4-9920-237AA8B6F6D0}.Package|x64.ActiveCfg = Package|x64 + {4EE74470-E365-48E4-9920-237AA8B6F6D0}.Package|x64.Build.0 = Package|x64 + {4EE74470-E365-48E4-9920-237AA8B6F6D0}.Package|x86.ActiveCfg = Package|Win32 + {4EE74470-E365-48E4-9920-237AA8B6F6D0}.Package|x86.Build.0 = Package|Win32 {4EE74470-E365-48E4-9920-237AA8B6F6D0}.Release|x64.ActiveCfg = Release|x64 {4EE74470-E365-48E4-9920-237AA8B6F6D0}.Release|x64.Build.0 = Release|x64 {4EE74470-E365-48E4-9920-237AA8B6F6D0}.Release|x86.ActiveCfg = Release|Win32 diff --git a/HaloCEVR/HaloCEVR.vcxproj b/HaloCEVR/HaloCEVR.vcxproj index b4bf929..d3027d7 100644 --- a/HaloCEVR/HaloCEVR.vcxproj +++ b/HaloCEVR/HaloCEVR.vcxproj @@ -1,6 +1,14 @@ + + Package + Win32 + + + Package + x64 + Debug Win32 @@ -39,6 +47,14 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + true + DynamicLibrary true @@ -52,6 +68,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -63,12 +86,18 @@ + + + + + + $(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)ThirdParty\MinHook\include @@ -80,6 +109,13 @@ $(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(SolutionDir)ThirdParty\MinHook\lib;$(SolutionDir)ThirdParty\OpenVR\lib d3d9 + + $(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)ThirdParty\MinHook\include + $(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(SolutionDir)ThirdParty\MinHook\lib;$(SolutionDir)ThirdParty\OpenVR\lib + d3d9 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + Level3 @@ -113,6 +149,7 @@ NotUsing pch.h stdcpp17 + false Windows @@ -128,6 +165,39 @@ xcopy /D /Y "$(TargetDir)d3d9.dll" "E:\Halo" + + + Level3 + true + true + true + WIN32;NDEBUG;HALOCEVR_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + NotUsing + pch.h + stdcpp17 + false + + + Windows + true + true + true + false + + + LIBCMT + + + +cd "$(SolutionDir)" +call "makerelease.bat" + + + cd "$(SolutionDir)Bindings" +call "py" manifest.py + + Level3 @@ -162,6 +232,25 @@ false + + + Level3 + true + true + true + NDEBUG;HALOCEVR_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + NotUsing + pch.h + + + Windows + true + true + true + false + + diff --git a/README.md b/README.md index 610ff01..30716cc 100644 --- a/README.md +++ b/README.md @@ -202,4 +202,4 @@ This should be everything that needs to be done inside of the HaloCEVR project, 4. Build the libMinHook project, the result of which should be a libMinHook.x86.lib file. 5. Replace the file libMinHook.x86.lib in the HaloCEVR folder found at HaloCEVR-master\ThirdParty\MinHook\lib with this newly compiled libMinHook.x86.lib file -You should now be able to build successfully, this will generate a d3d9.dll file, using the "makerelease" bat file we can create a zip containing the d3d9.dll and the VR folder. You will need to add openvr_api.dll yourself, either by adding to the release folder so the bat file can pickup copy and zip it, or by adding it directly into your halo CE installation directory. +You should now be able to build successfully, this will generate a d3d9.dll file, using the "makerelease" bat file we can create a zip containing the d3d9.dll and the VR folder. Alternatively you can generate the zip by building the project using the Package Configuration. You will need to add openvr_api.dll yourself, either by adding to the release folder so the bat file can pickup copy and zip it, or by adding it directly into your halo CE installation directory.