forked from mirrors/principia
Merge pull request #52 from rollerozxa/improve-windows-installer
Windows installer improvements
This commit is contained in:
commit
a9348277fb
8 changed files with 38 additions and 15 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -42,3 +42,6 @@ principia.state
|
|||
sha1_test
|
||||
.DS_Store
|
||||
*.iml
|
||||
build-windows/release/
|
||||
# mesa software rendering dll
|
||||
opengl32.dll
|
||||
|
|
|
|||
|
|
@ -57,6 +57,13 @@ And start the building process:
|
|||
|
||||
Principia will launch if everything was successful. Note that the compilation might take up to 10 minutes depending on your system.
|
||||
|
||||
### Building the Windows installer
|
||||
The Windows installer uses NSIS, which must be installed first before building:
|
||||
|
||||
$ pacman -S mingw-w64-x86_64-nsis
|
||||
|
||||
For making Windows release builds you would run the `make_release.sh` script, which builds the game in release mode, copies over necessary DLL files, and builds the installer.
|
||||
|
||||
## Building on Linux
|
||||
|
||||
Install dependencies. For Debian-based distros:
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
Additional dependencies for building the installer:
|
||||
|
||||
$ pacman -S mingw-w64-x86_64-nsis
|
||||
|
|
@ -19,17 +19,36 @@ InstallDirRegKey HKCU "Software\Bithack\Principia" ""
|
|||
|
||||
!define REG_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\Principia"
|
||||
|
||||
BrandingText "Principia ${VERSION}"
|
||||
|
||||
RequestExecutionLevel admin
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
; Required because otherwise start menu and desktop shortcuts will be installed for only
|
||||
; the main administrator, even if a regular user escalating to admin installs it.
|
||||
Function .onInit
|
||||
SetShellVarContext All
|
||||
FunctionEnd
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_UNABORTWARNING
|
||||
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp"
|
||||
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "unwelcome.bmp"
|
||||
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR/principia.exe"
|
||||
!define MUI_FINISHPAGE_RUN_TEXT "Run Principia"
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "..\LICENSE.md"
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
!insertmacro MUI_UNPAGE_WELCOME
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
!insertmacro MUI_UNPAGE_FINISH
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
|
|
@ -76,6 +95,12 @@ Section "Start Menu entry" SecSM
|
|||
|
||||
SectionEnd
|
||||
|
||||
Section "Desktop shortcut" SecDesktop
|
||||
|
||||
CreateShortCut $DESKTOP\Principia.lnk $INSTDIR\principia.exe
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -post
|
||||
|
||||
WriteRegStr HKCR "principia" "" "URL:Principia"
|
||||
|
|
@ -97,13 +122,14 @@ Section -post
|
|||
WriteUninstaller "$INSTDIR\uninst-principia.exe"
|
||||
SectionEnd
|
||||
|
||||
; TODO: Add a section after installation is complete, to ask if the user wants to run the game
|
||||
|
||||
LangString DESC_SecCore ${LANG_ENGLISH} "Contains the core files required to run Principia."
|
||||
LangString DESC_SecSM ${LANG_ENGLISH} "Create a Start Menu entry for Principia."
|
||||
LangString DESC_SecDesktop ${LANG_ENGLISH} "Create a shortcut to Principia on your desktop."
|
||||
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecCore} $(DESC_SecCore)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecSM} $(DESC_SecSM)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} $(DESC_SecDesktop)
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
Section "Uninstall"
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,10 +0,0 @@
|
|||
#include <windows.h>
|
||||
|
||||
class isocket {
|
||||
};
|
||||
|
||||
isocket *s = nullptr;
|
||||
|
||||
int main(void) {
|
||||
HDC x = 0;
|
||||
}
|
||||
BIN
build-windows/unwelcome.bmp
Normal file
BIN
build-windows/unwelcome.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 151 KiB |
BIN
build-windows/welcome.bmp
Normal file
BIN
build-windows/welcome.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 151 KiB |
Loading…
Add table
Add a link
Reference in a new issue