aheinecke@340: ; renameme.nsi aheinecke@340: ; TODO Rename it! aheinecke@340: ; aheinecke@340: ; This script creates the installer for renameme it needs the aheinecke@340: ; following definitions to be set when calling makensis: aheinecke@340: ; aheinecke@340: ; productname: Name of the Software as it will show up under installed aheinecke@340: ; Software aheinecke@340: ; company: The publisher of this software. (Windows needs this) aheinecke@340: ; version_number: The version of the software aheinecke@340: ; setupname: The name for the result created by this aheinecke@340: ; productname_short: Used for the default folder name and such aheinecke@340: ; files_dir: the path to the files aheinecke@340: aheinecke@340: ;-------------------------------- aheinecke@340: ; Includes aheinecke@340: !define MULTIUSER_EXECUTIONLEVEL Highest aheinecke@340: !define MULTIUSER_MUI aheinecke@340: !define MULTIUSER_INSTALLMODE_COMMANDLINE aheinecke@340: !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "Software\${productname_short}" aheinecke@340: !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME "" aheinecke@340: !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "Software\${productname_short}" aheinecke@340: !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "" aheinecke@340: !define MULTIUSER_INSTALLMODE_INSTDIR "${productname_short}" aheinecke@340: aheinecke@340: !include "MultiUser.nsh" aheinecke@340: !include "MUI2.nsh" aheinecke@340: aheinecke@340: ;-------------------------------- aheinecke@340: ;Version Information (for installer file properties) aheinecke@340: aheinecke@340: VIProductVersion "${version_number}" ;needs integer format: x.x.x.x aheinecke@340: VIAddVersionKey "ProductName" "${productname_short}" aheinecke@340: VIAddVersionKey "Comments" "${productname_short} ist Freie Software" aheinecke@340: VIAddVersionKey "CompanyName" "${company}" aheinecke@340: VIAddVersionKey "LegalTrademarks" "" aheinecke@340: VIAddVersionKey "LegalCopyright" "${copyright}" aheinecke@340: VIAddVersionKey "FileDescription" "${description}" aheinecke@340: VIAddVersionKey "FileVersion" "${version_number}" aheinecke@340: aheinecke@340: Var StartMenuFolder aheinecke@340: ;-------------------------------- aheinecke@340: ; General aheinecke@340: aheinecke@340: ; Define Name, File and Installdir of Installer aheinecke@340: Name "${productname}" aheinecke@340: OutFile "${setupname}" aheinecke@340: InstallDir "$PROGRAMFILES\${productname_short}" aheinecke@340: InstType "Standard" aheinecke@340: aheinecke@340: ;-------------------------------- aheinecke@340: ;Interface Settings aheinecke@340: aheinecke@340: BrandingText "${company} - ${productname}" aheinecke@340: ; MUI Settings / Header aheinecke@340: !define MUI_WELCOMEPAGE_TITLE "Willkommen bei der Installation von ${productname_short}." aheinecke@340: !define MUI_WELCOMEPAGE_TEXT "Sie sind im Begriff ${productname} \r\n\ aheinecke@340: zu installieren. ${productname} ist eine Anwendung um Zertifikate TODO \r\n\ aheinecke@340: auf ihrem System zu installieren und aktualisieren." aheinecke@340: ;!define MUI_HEADERIMAGE_BITMAP "" ;TODO aheinecke@340: ;!define MUI_WELCOMEFINISHPAGE_BITMAP "ressources\welcome_left.bmp" ;TODO aheinecke@340: !define MUI_ICON "renameme_installer.ico" aheinecke@340: aheinecke@340: !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" aheinecke@340: !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${productname_short}" aheinecke@340: !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" aheinecke@340: aheinecke@340: aheinecke@340: !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder aheinecke@340: aheinecke@340: !define MUI_FINISHPAGE_RUN $INSTDIR\m13ui.exe aheinecke@340: aheinecke@340: !insertmacro MUI_PAGE_WELCOME aheinecke@340: !insertmacro MUI_PAGE_DIRECTORY aheinecke@340: !insertmacro MUI_PAGE_INSTFILES aheinecke@340: !insertmacro MUI_PAGE_FINISH aheinecke@340: aheinecke@340: ;-------------------------------- aheinecke@340: ;Install Functions aheinecke@340: Function ".onInit" aheinecke@340: !insertmacro MULTIUSER_INIT aheinecke@340: FunctionEnd aheinecke@340: aheinecke@340: ;-------------------------------- aheinecke@340: ;UnInstall Functions aheinecke@340: Function "un.onInit" aheinecke@340: !insertmacro MULTIUSER_UNINIT aheinecke@340: FunctionEnd aheinecke@340: aheinecke@340: Section "" aheinecke@340: ; The actual installation aheinecke@340: SetOutPath "$INSTDIR" aheinecke@340: !include "filelist.nsh" aheinecke@340: aheinecke@340: WriteRegStr SHCTX "Software\${productname_short}" "" $INSTDIR aheinecke@340: aheinecke@340: ;Create uninstaller aheinecke@340: WriteUninstaller "$INSTDIR\Uninstall.exe" aheinecke@340: aheinecke@340: !insertmacro MUI_STARTMENU_WRITE_BEGIN Application aheinecke@340: aheinecke@340: ;Create shortcuts aheinecke@340: CreateDirectory "$SMPROGRAMS\$StartMenuFolder" aheinecke@340: CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${productname}.lnk" "$INSTDIR\m13ui.exe" aheinecke@340: aheinecke@340: !insertmacro MUI_STARTMENU_WRITE_END aheinecke@340: aheinecke@340: SectionEnd aheinecke@340: aheinecke@340: Section "Uninstall" aheinecke@340: RMDir /r "$INSTDIR" ; TODO include uninstall files aheinecke@340: ; !include "filelist-un.nsh" aheinecke@340: ; Delete "$INSTDIR\Uninstall.exe" aheinecke@340: ; RMDir "$INSTDIR" aheinecke@340: aheinecke@340: !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder aheinecke@340: aheinecke@340: Delete "$SMPROGRAMS\$StartMenuFolder\${productname}.lnk" aheinecke@340: RMDir "$SMPROGRAMS\$StartMenuFolder" aheinecke@340: aheinecke@340: DeleteRegKey /ifempty SHCTX "Software\${productname_short}" aheinecke@340: aheinecke@340: SectionEnd