Skip to content

Commit

Permalink
Make 32bit build part of installer
Browse files Browse the repository at this point in the history
  • Loading branch information
fholger committed Jan 27, 2025
1 parent 98075cd commit 9e4f103
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 10 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,31 @@ jobs:
- name: Build project
working-directory: Code
run: msbuild CrysisMod.sln /p:Configuration=Release -m
run: msbuild CrysisMod.sln /p:Configuration=Release /p:Platform=x64 -m

- name: Build launcher
working-directory: Code/ThirdParty/c1-launcher
run: |
mkdir build64
cd build64
cmake -D CMAKE_BUILD_TYPE=Release ..
cmake -D CMAKE_BUILD_TYPE=Release -DCMAKE_GENERATOR_PLATFORM=x64 ..
cmake --build . --parallel --config Release
- name: Setup MSBuild (Win32)
uses: microsoft/[email protected]
with:
msbuild-architecture: x86

- name: Build project (Win32)
working-directory: Code
run: msbuild CrysisMod.sln /p:Configuration=Release /p:Platform=Win32 -m

- name: Build launcher (WIN32)
working-directory: Code/ThirdParty/c1-launcher
run: |
mkdir build32
cd build32
cmake -D CMAKE_BUILD_TYPE=Release -DCMAKE_GENERATOR_PLATFORM=Win32 ..
cmake --build . --parallel --config Release
- name: Create installer
Expand All @@ -47,7 +64,7 @@ jobs:

- name: Zip debug symbols
run: |
7z a -t7z crysisvr_pdbs.7z Bin64\*.pdb
7z a -t7z crysisvr_pdbs.7z Bin64\*.pdb Bin32\*.pdb
- name: Update Github dev release
if: github.ref == 'refs/heads/main'
Expand Down
1 change: 1 addition & 0 deletions Installer/create_installer.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ mkdir %PACKAGE_DIR%\Bin64

set CRYSIS_INSTALL_DIR=%PACKAGE_DIR%
call %CURRENT_DIR%\..\install.bat
call %CURRENT_DIR%\..\install32.bat
call "C:\Program Files (x86)\NSIS\makensis.exe" crysis.nsi
23 changes: 16 additions & 7 deletions Installer/crysis.nsi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!include "MUI2.nsh"
!define VERSION '1.0.2'
!define VERSION '1.1.0'

Name "Crysis VR Mod"
Name "Crysis VR"
; should not need admin privileges as the install folder should be user writable, anyway
RequestExecutionLevel user

Expand All @@ -12,7 +12,7 @@ OutFile ".\crysis-vrmod-${VERSION}.exe"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP ".\header.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP ".\welcome.bmp"
!define MUI_WELCOMEPAGE_TITLE 'Crysis VR Mod v${VERSION}'
!define MUI_WELCOMEPAGE_TITLE 'Crysis VR v${VERSION}'
!define MUI_WELCOMEPAGE_TEXT 'This will install the Crysis VR Mod on your computer. \
It will turn the game into a full 6DOF tracked VR experience with motion controls. \
But remember, it is Crysis - expect performance to not be great :)'
Expand Down Expand Up @@ -42,24 +42,33 @@ Section ""
SetOutPath $INSTDIR\Bin64
File .\assembly\Bin64\*

SetOutPath $INSTDIR\Bin32
File .\assembly\Bin32\*

WriteUninstaller "$INSTDIR\Uninstall_CrysisVR.exe"
SectionEnd

Section "Start menu shortcut"
CreateShortcut "$SMPrograms\$(^Name).lnk" "$InstDir\Bin64\CrysisVR.exe"
CreateShortcut "$SMPrograms\$(^Name) (64 bit).lnk" "$InstDir\Bin64\CrysisVR.exe"
CreateShortcut "$SMPrograms\$(^Name) (32 bit).lnk" "$InstDir\Bin32\CrysisVR.exe"
SectionEnd

Section /o "Desktop shortcut"
CreateShortcut "$Desktop\$(^Name).lnk" "$InstDir\Bin64\CrysisVR.exe"
CreateShortcut "$Desktop\$(^Name) (64 bit).lnk" "$InstDir\Bin64\CrysisVR.exe"
CreateShortcut "$Desktop\$(^Name) (32 bit).lnk" "$InstDir\Bin32\CrysisVR.exe"
SectionEnd

Section "Uninstall"
SetOutPath $INSTDIR
RMDir /r "$INSTDIR\Mods\VRMod"
Delete "$INSTDIR\Bin64\CrysisVR.exe"
Delete "$INSTDIR\Bin64\haptic_library.dll"
Delete "$SMPrograms\$(^Name).lnk"
Delete "$Desktop\$(^Name).lnk"
Delete "$INSTDIR\Bin32\CrysisVR.exe"
Delete "$INSTDIR\Bin32\haptic_library.dll"
Delete "$SMPrograms\$(^Name) (64 bit).lnk"
Delete "$SMPrograms\$(^Name) (32 bit).lnk"
Delete "$Desktop\$(^Name) (64 bit).lnk"
Delete "$Desktop\$(^Name) (32 bit).lnk"
Delete "Uninstall_CrysisVR.exe"
SectionEnd

Expand Down

0 comments on commit 9e4f103

Please sign in to comment.