Made generated nsis script create shortcuts and install dlls.
This commit is contained in:
parent
22741ea920
commit
c113ceb808
3 changed files with 38 additions and 4 deletions
|
@ -581,7 +581,7 @@ env.Alias('data-dist', data_tarball)
|
|||
# Windows installer
|
||||
#
|
||||
|
||||
env.WindowsInstaller([wesnoth, wesnoth_editor, Dir(installable_subs)])
|
||||
env.WindowsInstaller([wesnoth, wesnoth_editor, Dir(installable_subs)] + glob("*.dll"))
|
||||
|
||||
#
|
||||
# Making Mac OS X application bundles
|
||||
|
|
|
@ -15,7 +15,7 @@ for bin in binaries:
|
|||
env[bin + "_res"] = res
|
||||
|
||||
def WindowsInstaller(env, files):
|
||||
files = Flatten(files)
|
||||
files = Entry(Flatten(files))
|
||||
env["NSIS_INSTALL_FILES"] = ""
|
||||
env["NSIS_UNINSTALL_FILES"] = ""
|
||||
for file in files:
|
||||
|
|
|
@ -22,6 +22,13 @@
|
|||
;Get installation folder from registry if available
|
||||
InstallDirRegKey HKCU "Software\Battle for Wesnoth" ""
|
||||
|
||||
RequestExecutionLevel user
|
||||
|
||||
;--------------------------------
|
||||
;Variables
|
||||
|
||||
Var StartMenuFolder
|
||||
|
||||
;--------------------------------
|
||||
;Interface Settings
|
||||
|
||||
|
@ -41,6 +48,14 @@
|
|||
!insertmacro MUI_PAGE_LICENSE "COPYING"
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
;Start Menu Folder Page Configuration
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Battle for Wesnoth"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
||||
|
||||
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
|
||||
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
|
@ -117,7 +132,7 @@
|
|||
;--------------------------------
|
||||
;Installer Sections
|
||||
|
||||
Section "Dummy Section" SecDummy
|
||||
Section "Battle for Wesnoth" BfWSection
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
|
@ -130,6 +145,17 @@ Section "Dummy Section" SecDummy
|
|||
;Create uninstaller
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
|
||||
;Create shortcuts
|
||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Battle for Wesnoth.lnk" "$INSTDIR\wesnoth.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Map editor.lnk" "$INSTDIR\wesnoth_editor.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Multiplayer server.lnk" "$INSTDIR\wesnothd.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
|
@ -148,7 +174,7 @@ FunctionEnd
|
|||
|
||||
;Assign descriptions to sections
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} "A test section."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${BfWSection} "Battle for wesnoth executable and data."
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
|
||||
|
@ -164,6 +190,14 @@ Section "Uninstall"
|
|||
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
||||
|
||||
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
|
||||
Delete "$SMPROGRAMS\$StartMenuFolder\Multiplayer server.lnk"
|
||||
Delete "$SMPROGRAMS\$StartMenuFolder\Map editor.lnk"
|
||||
Delete "$SMPROGRAMS\$StartMenuFolder\Battle for Wesnoth.lnk"
|
||||
RMDir "$SMPROGRAMS\$StartMenuFolder"
|
||||
|
||||
DeleteRegKey /ifempty HKCU "Software\Battle for Wesnoth"
|
||||
|
||||
SectionEnd
|
||||
|
|
Loading…
Add table
Reference in a new issue