94 lines
3.3 KiB
Plaintext
94 lines
3.3 KiB
Plaintext
;--------------------------------
|
|
;Include Modern UI
|
|
!include "MUI2.nsh"
|
|
;--------------------------------
|
|
;General
|
|
Name "Zway-Bot x.x.x"
|
|
OutFile "Zway-Bot x.x.x.exe"
|
|
|
|
InstallDir "$LOCALAPPDATA\Zway-Bot"
|
|
InstallDirRegKey HKCU "Software\Zway-Bot" ""
|
|
RequestExecutionLevel user
|
|
ShowInstDetails show
|
|
ShowUninstDetails show
|
|
SetCompressor lzma
|
|
SetDateSave off
|
|
VIAddVersionKey "ProductName" "Zway-Bot"
|
|
VIAddVersionKey "CompanyName" "BlubbFish"
|
|
VIAddVersionKey "LegalTrademarks" "BlubbFish"
|
|
VIProductVersion x.x.x
|
|
;--------------------------------
|
|
;Variables
|
|
Var StartMenuFolder
|
|
;--------------------------------
|
|
;Interface Settings
|
|
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
|
|
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Zway-Bot"
|
|
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
|
!define MUI_ICON "..\Resources\Icon.ico"
|
|
!define MUI_UNICON "..\Resources\Icon.ico"
|
|
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
|
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
|
|
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Zway-Bot"
|
|
;--------------------------------
|
|
;Pages
|
|
!insertmacro MUI_PAGE_WELCOME
|
|
!insertmacro MUI_PAGE_LICENSE "..\License.txt"
|
|
!insertmacro MUI_PAGE_COMPONENTS
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
!insertmacro MUI_PAGE_FINISH
|
|
|
|
!insertmacro MUI_UNPAGE_WELCOME
|
|
!insertmacro MUI_UNPAGE_CONFIRM
|
|
!insertmacro MUI_UNPAGE_INSTFILES
|
|
!insertmacro MUI_UNPAGE_FINISH
|
|
;--------------------------------
|
|
;Languages
|
|
!insertmacro MUI_LANGUAGE "German"
|
|
;--------------------------------
|
|
;Installer Sections
|
|
InstType /NOCUSTOM
|
|
InstType Vollständig
|
|
InstType Minimal
|
|
Section "!Programm" SecProg
|
|
SectionIn 1 2
|
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
|
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
|
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
|
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Zway-Bot.lnk" "$INSTDIR\Zway-Bot.exe"
|
|
!insertmacro MUI_STARTMENU_WRITE_END
|
|
WriteRegStr HKCU "Software\Zway-Bot" "" $INSTDIR
|
|
SetOutPath "$INSTDIR"
|
|
File /r /x Mono.Posix.dll ..\bin\Release\*.dll
|
|
File /r ..\bin\Release\*.exe
|
|
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
|
SectionEnd
|
|
Section "Konfigurationsdateien" SecConf
|
|
SectionIn 1
|
|
CreateDirectory "$APPDATA\zwaybot"
|
|
SetOutPath "$APPDATA\zwaybot"
|
|
File /r ..\bin\Release\config-example\*.example
|
|
SectionEnd
|
|
Section "Uninstall"
|
|
;ADD YOUR OWN FILES HERE...
|
|
Delete "$INSTDIR\*.exe"
|
|
Delete "$INSTDIR\*.dll"
|
|
Delete "$APPDATA\zwaybot\*.example"
|
|
RMDir "$INSTDIR"
|
|
RMDir "$APPDATA\zwaybot"
|
|
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
|
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
|
|
RMDir "$SMPROGRAMS\$StartMenuFolder"
|
|
DeleteRegKey /ifempty HKCU "Software\Zway-Bot"
|
|
SectionEnd
|
|
;--------------------------------
|
|
;Descriptions
|
|
LangString DESC_SecProg ${LANG_GERMAN} "Das Zway-Bot Programm"
|
|
LangString DESC_SecConf ${LANG_GERMAN} "Beispiel Konfigurationsdateien"
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecProg} $(DESC_SecProg)
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${Secconf} $(DESC_SecConf)
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
|
;-------------------------------- |