summaryrefslogtreecommitdiff
path: root/LawncableLauncher.nsi
diff options
context:
space:
mode:
Diffstat (limited to 'LawncableLauncher.nsi')
-rw-r--r--LawncableLauncher.nsi117
1 files changed, 117 insertions, 0 deletions
diff --git a/LawncableLauncher.nsi b/LawncableLauncher.nsi
new file mode 100644
index 0000000..7ec1d96
--- /dev/null
+++ b/LawncableLauncher.nsi
@@ -0,0 +1,117 @@
+;--------------------------------
+;Include Modern UI
+
+ !include "MUI2.nsh"
+
+;--------------------------------
+;General
+
+ ;Name and file
+ Name "ManaLauncher"
+ OutFile "InstallManaLauncher.exe"
+
+ ;Default installation folder
+ InstallDir "$PROGRAMFILES\ManaLauncher"
+
+ ;Get installation folder from registry if available
+ InstallDirRegKey HKCU "Software\ManaLauncher" ""
+
+ ;Request application privileges for Windows Vista
+ RequestExecutionLevel admin
+
+;--------------------------------
+;Variables
+
+ Var StartMenuFolder
+
+;--------------------------------
+;Interface Settings
+
+ !define MUI_ABORTWARNING
+
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_LICENSE "LICENSE"
+ ;!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\LawnCablesManaLauncher"
+ !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
+
+ !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
+
+ !insertmacro MUI_PAGE_INSTFILES
+
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+
+ Function finishpageaction
+ CreateShortcut "$Desktop\LawnCablesManaLauncher.lnk" "$INSTDIR\LawnCablesManaLauncher.exe"
+ FunctionEnd
+
+ !define MUI_FINISHPAGE_SHOWREADME ""
+ !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
+ !define MUI_FINISHPAGE_SHOWREADME_TEXT "Create Desktop Shortcut"
+ !define MUI_FINISHPAGE_SHOWREADME_FUNCTION finishpageaction
+
+ !insertmacro MUI_PAGE_FINISH
+
+;--------------------------------
+;Languages
+
+ !insertmacro MUI_LANGUAGE "English"
+
+;--------------------------------
+;Installer Sections
+
+Section "Install"
+
+ SetOutPath "$INSTDIR"
+
+ File /r "out\LawnCablesManaLauncher-win32-x64\*"
+
+ ;Store installation folder
+ WriteRegStr HKCU "Software\LawnCablesManaLauncher" "" $INSTDIR
+
+ ;Create uninstaller
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+
+ ;Create shortcuts
+ CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
+ CreateShortcut "$SMPROGRAMS\$StartMenuFolder\LawnCablesManaLauncher.lnk" "$INSTDIR\LawnCablesManaLauncher.exe"
+ CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
+
+
+
+
+ !insertmacro MUI_STARTMENU_WRITE_END
+
+SectionEnd
+
+
+;--------------------------------
+;Uninstaller Section
+
+Section "Uninstall"
+
+ ;ADD YOUR OWN FILES HERE...
+
+ Delete "$INSTDIR\Uninstall.exe"
+
+ RMDir /r "$INSTDIR"
+
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
+
+ Delete "$Desktop\LawnCablesManaLauncher.lnk"
+ Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
+ Delete "$SMPROGRAMS\$StartMenuFolder\LawnCablesManaLauncher.lnk"
+ RMDir "$SMPROGRAMS\$StartMenuFolder"
+
+ DeleteRegKey /ifempty HKCU "Software\LawnCablesManaLauncher"
+
+SectionEnd