expose the new portable Support directory to Win installer

closes #3673
This commit is contained in:
Matthias Mailänder
2013-09-08 11:44:06 +02:00
parent 2e7081e22e
commit af41cf5664

View File

@@ -39,6 +39,7 @@ SetCompressor lzma
Var StartMenuFolder Var StartMenuFolder
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_CONFIRM
@@ -54,7 +55,7 @@ Section "-Reg" Reg
WriteRegStr HKLM "Software\OpenRA" "InstallDir" $INSTDIR WriteRegStr HKLM "Software\OpenRA" "InstallDir" $INSTDIR
SectionEnd SectionEnd
Section "Client" Client Section "Client" CLIENT
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
File "${SRCDIR}\OpenRA.Game.exe" File "${SRCDIR}\OpenRA.Game.exe"
File "${SRCDIR}\OpenRA.Utility.exe" File "${SRCDIR}\OpenRA.Utility.exe"
@@ -95,7 +96,7 @@ Section "Client" Client
File "${SRCDIR}\glsl\*.vert" File "${SRCDIR}\glsl\*.vert"
SectionEnd SectionEnd
Section "Editor" Editor Section "Editor" EDITOR
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
File "${SRCDIR}\OpenRA.Editor.exe" File "${SRCDIR}\OpenRA.Editor.exe"
@@ -119,7 +120,7 @@ SectionGroup /e "Mods"
File /r "${SRCDIR}\mods\ra\tilesets" File /r "${SRCDIR}\mods\ra\tilesets"
File /r "${SRCDIR}\mods\ra\uibits" File /r "${SRCDIR}\mods\ra\uibits"
SectionEnd SectionEnd
Section "Command & Conquer" CNC Section "C&C" CNC
RMDir /r "$INSTDIR\mods\cnc" RMDir /r "$INSTDIR\mods\cnc"
SetOutPath "$INSTDIR\mods\cnc" SetOutPath "$INSTDIR\mods\cnc"
File "${SRCDIR}\mods\cnc\*.*" File "${SRCDIR}\mods\cnc\*.*"
@@ -145,6 +146,16 @@ SectionGroup /e "Mods"
SectionEnd SectionEnd
SectionGroupEnd SectionGroupEnd
SectionGroup /e "Settings"
Section "Portable Install" PORTABLE
CreateDirectory $INSTDIR\Support
SectionEnd
SectionGroupEnd
Function .onInit
SectionSetFlags ${PORTABLE} 0
FunctionEnd
;*************************** ;***************************
;Dependency Sections ;Dependency Sections
;*************************** ;***************************
@@ -223,6 +234,7 @@ Function ${UN}Clean
Delete $INSTDIR\SDL.dll Delete $INSTDIR\SDL.dll
Delete $INSTDIR\freetype6.dll Delete $INSTDIR\freetype6.dll
Delete $INSTDIR\zlib1.dll Delete $INSTDIR\zlib1.dll
RMDir /r $INSTDIR\Support
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA"
Delete $INSTDIR\uninstaller.exe Delete $INSTDIR\uninstaller.exe
RMDir $INSTDIR RMDir $INSTDIR
@@ -243,16 +255,20 @@ SectionEnd
;*************************** ;***************************
;Section Descriptions ;Section Descriptions
;*************************** ;***************************
LangString DESC_Client ${LANG_ENGLISH} "OpenRA client and dependencies" LangString DESC_CLIENT ${LANG_ENGLISH} "OpenRA game and dependencies"
LangString DESC_EDITOR ${LANG_ENGLISH} "OpenRA map editor"
LangString DESC_RA ${LANG_ENGLISH} "Base Red Alert mod" LangString DESC_RA ${LANG_ENGLISH} "Base Red Alert mod"
LangString DESC_CNC ${LANG_ENGLISH} "Base Command and Conquer mod" LangString DESC_CNC ${LANG_ENGLISH} "Base Command and Conquer mod"
LangString DESC_D2K ${LANG_ENGLISH} "Base Dune 2000 mod" LangString DESC_D2K ${LANG_ENGLISH} "Base Dune 2000 mod"
LangString DESC_PORTABLE ${LANG_ENGLISH} "Store support files in the install directory."
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Client} $(DESC_Client) !insertmacro MUI_DESCRIPTION_TEXT ${CLIENT} $(DESC_CLIENT)
!insertmacro MUI_DESCRIPTION_TEXT ${EDITOR} $(DESC_EDITOR)
!insertmacro MUI_DESCRIPTION_TEXT ${RA} $(DESC_RA) !insertmacro MUI_DESCRIPTION_TEXT ${RA} $(DESC_RA)
!insertmacro MUI_DESCRIPTION_TEXT ${CNC} $(DESC_CNC) !insertmacro MUI_DESCRIPTION_TEXT ${CNC} $(DESC_CNC)
!insertmacro MUI_DESCRIPTION_TEXT ${D2K} $(DESC_D2K) !insertmacro MUI_DESCRIPTION_TEXT ${D2K} $(DESC_D2K)
!insertmacro MUI_DESCRIPTION_TEXT ${PORTABLE} $(DESC_PORTABLE)
!insertmacro MUI_FUNCTION_DESCRIPTION_END !insertmacro MUI_FUNCTION_DESCRIPTION_END
;*************************** ;***************************