aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorMartijn Kaijser <mcm.kaijser@gmail.com>2013-08-20 00:26:10 +0200
committerMartijn Kaijser <mcm.kaijser@gmail.com>2013-08-28 17:46:22 +0200
commit719af9c72d6dd93988ac8871f4ba61cf273e817a (patch)
tree02fdc0e2db4a607204049cc6061c9f6ebaacebc3 /project
parent36cfd158f31d7651a273d5f72e427fc19ebd6d42 (diff)
[win32]installer: set app name global
Diffstat (limited to 'project')
-rw-r--r--project/Win32BuildSetup/XBMC for Windows.nsi75
1 files changed, 39 insertions, 36 deletions
diff --git a/project/Win32BuildSetup/XBMC for Windows.nsi b/project/Win32BuildSetup/XBMC for Windows.nsi
index cb10f2f7bc..e15edf76ba 100644
--- a/project/Win32BuildSetup/XBMC for Windows.nsi
+++ b/project/Win32BuildSetup/XBMC for Windows.nsi
@@ -11,20 +11,25 @@
!include "nsDialogs.nsh"
!include "LogicLib.nsh"
!include "WinVer.nsh"
+
+;--------------------------------
+;define global used name
+ !define APP_NAME "XBMC"
+
;--------------------------------
;General
;Name and file
- Name "XBMC"
- OutFile "XBMCSetup-${xbmc_revision}-${xbmc_branch}.exe"
+ Name "${APP_NAME}"
+ OutFile "${APP_NAME}Setup-${xbmc_revision}-${xbmc_branch}.exe"
XPStyle on
;Default installation folder
- InstallDir "$PROGRAMFILES\XBMC"
+ InstallDir "$PROGRAMFILES\${APP_NAME}"
;Get installation folder from registry if available
- InstallDirRegKey HKCU "Software\XBMC" ""
+ InstallDirRegKey HKCU "Software\${APP_NAME}" ""
;Request application privileges for Windows Vista
RequestExecutionLevel admin
@@ -34,7 +39,6 @@
Var StartMenuFolder
Var PageProfileState
- Var RunArgs
Var DirectXSetupError
Var VSRedistSetupError
@@ -50,8 +54,7 @@
;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\webapps\ROOT\RELEASE-NOTES.txt"
!define MUI_FINISHPAGE_LINK "Please visit http://xbmc.org for more information."
!define MUI_FINISHPAGE_LINK_LOCATION "http://xbmc.org"
- !define MUI_FINISHPAGE_RUN "$INSTDIR\XBMC.exe"
- ;!define MUI_FINISHPAGE_RUN_PARAMETERS $RunArgs
+ !define MUI_FINISHPAGE_RUN "$INSTDIR\${APP_NAME}.exe"
!define MUI_FINISHPAGE_RUN_NOTCHECKED
!define MUI_ABORTWARNING
;--------------------------------
@@ -64,7 +67,7 @@
;Start Menu Folder Page Configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
- !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\XBMC"
+ !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${APP_NAME}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
@@ -129,7 +132,7 @@ Section "XBMC" SecXBMC
;File /r "${xbmc_root}\Xbmc\web\*.*"
;Store installation folder
- WriteRegStr HKCU "Software\XBMC" "" $INSTDIR
+ WriteRegStr HKCU "Software\${APP_NAME}" "" $INSTDIR
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
@@ -142,34 +145,34 @@ Section "XBMC" SecXBMC
Delete "$SMPROGRAMS\$StartMenuFolder\XBMC (Windowed).lnk"
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
- CreateShortCut "$SMPROGRAMS\$StartMenuFolder\XBMC.lnk" "$INSTDIR\XBMC.exe" \
- "" "$INSTDIR\XBMC.exe" 0 SW_SHOWNORMAL \
- "" "Start XBMC."
- CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall XBMC.lnk" "$INSTDIR\Uninstall.exe" \
+ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${APP_NAME}.lnk" "$INSTDIR\${APP_NAME}.exe" \
+ "" "$INSTDIR\${APP_NAME}.exe" 0 SW_SHOWNORMAL \
+ "" "Start ${APP_NAME}."
+ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall ${APP_NAME}.lnk" "$INSTDIR\Uninstall.exe" \
"" "$INSTDIR\Uninstall.exe" 0 SW_SHOWNORMAL \
- "" "Uninstall XBMC."
+ "" "Uninstall ${APP_NAME}."
- WriteINIStr "$SMPROGRAMS\$StartMenuFolder\Visit XBMC Online.url" "InternetShortcut" "URL" "http://xbmc.org"
+ WriteINIStr "$SMPROGRAMS\$StartMenuFolder\Visit ${APP_NAME} Online.url" "InternetShortcut" "URL" "http://xbmc.org"
!insertmacro MUI_STARTMENU_WRITE_END
;add entry to add/remove programs
- WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBMC" \
- "DisplayName" "XBMC"
- WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBMC" \
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
+ "DisplayName" "${APP_NAME}"
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"UninstallString" "$INSTDIR\uninstall.exe"
- WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBMC" \
+ WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"NoModify" 1
- WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBMC" \
+ WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"NoRepair" 1
- WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBMC" \
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"InstallLocation" "$INSTDIR"
- WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBMC" \
- "DisplayIcon" "$INSTDIR\XBMC.exe,0"
- WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBMC" \
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
+ "DisplayIcon" "$INSTDIR\${APP_NAME}.exe,0"
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"Publisher" "Team XBMC"
- WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBMC" \
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"HelpLink" "http://xbmc.org/support"
- WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBMC" \
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"URLInfoAbout" "http://xbmc.org"
SectionEnd
@@ -215,7 +218,7 @@ SectionGroupEnd
;Descriptions
;Language strings
- LangString DESC_SecXBMC ${LANG_ENGLISH} "XBMC"
+ LangString DESC_SecXBMC ${LANG_ENGLISH} "${APP_NAME}"
;Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
@@ -231,7 +234,7 @@ Var UnPageProfileCheckbox_State
Var UnPageProfileEditBox
Function un.UnPageProfile
- !insertmacro MUI_HEADER_TEXT "Uninstall XBMC" "Remove XBMC's profile folder from your computer."
+ !insertmacro MUI_HEADER_TEXT "Uninstall ${APP_NAME}" "Remove ${APP_NAME}'s profile folder from your computer."
nsDialogs::Create /NOUNLOAD 1018
Pop $UnPageProfileDialog
@@ -242,7 +245,7 @@ Function un.UnPageProfile
${NSD_CreateLabel} 0 0 100% 12u "Do you want to delete the profile folder?"
Pop $0
- ${NSD_CreateText} 0 13u 100% 12u "$APPDATA\XBMC\"
+ ${NSD_CreateText} 0 13u 100% 12u "$APPDATA\${APP_NAME}\"
Pop $UnPageProfileEditBox
SendMessage $UnPageProfileEditBox ${EM_SETREADONLY} 1 0
@@ -265,7 +268,7 @@ Section "Uninstall"
SetShellVarContext current
;ADD YOUR OWN FILES HERE...
- Delete "$INSTDIR\XBMC.exe"
+ Delete "$INSTDIR\${APP_NAME}.exe"
Delete "$INSTDIR\copying.txt"
Delete "$INSTDIR\known_issues.txt"
Delete "$INSTDIR\LICENSE.GPL"
@@ -295,7 +298,7 @@ Section "Uninstall"
${If} $UnPageProfileCheckbox_State == ${BST_CHECKED}
RMDir /r "$INSTDIR\userdata"
RMDir "$INSTDIR"
- RMDir /r "$APPDATA\XBMC\"
+ RMDir /r "$APPDATA\${APP_NAME}\"
${Else}
;Even if userdata is kept in %appdata%\xbmc\userdata, the $INSTDIR\userdata should be cleaned up on uninstall if not used
;If guisettings.xml exists in the XBMC\userdata directory, do not delete XBMC\userdata directory
@@ -307,15 +310,15 @@ Section "Uninstall"
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
- Delete "$SMPROGRAMS\$StartMenuFolder\XBMC.lnk"
+ Delete "$SMPROGRAMS\$StartMenuFolder\${APP_NAME}.lnk"
Delete "$SMPROGRAMS\$StartMenuFolder\XBMC (Portable).lnk"
Delete "$SMPROGRAMS\$StartMenuFolder\XBMC (Windowed).lnk"
- Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall XBMC.lnk"
- Delete "$SMPROGRAMS\$StartMenuFolder\Visit XBMC Online.url"
+ Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall ${APP_NAME}.lnk"
+ Delete "$SMPROGRAMS\$StartMenuFolder\Visit ${APP_NAME} Online.url"
RMDir "$SMPROGRAMS\$StartMenuFolder"
- DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBMC"
+ DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
- DeleteRegKey /ifempty HKCU "Software\XBMC"
+ DeleteRegKey /ifempty HKCU "Software\${APP_NAME}"
SectionEnd