Some more installer tweaks.
This commit is contained in:
parent
8d93069321
commit
7644b9ea79
@ -84,7 +84,7 @@ for /L %%n in (1, 1, 99) do (
|
|||||||
for %%i in (exe,sfx,zip,txt) do (
|
for %%i in (exe,sfx,zip,txt) do (
|
||||||
del "%OUT_FILE%.%%i" 2> NUL
|
del "%OUT_FILE%.%%i" 2> NUL
|
||||||
if exist "%OUT_FILE%.%%i" (
|
if exist "%OUT_FILE%.%%i" (
|
||||||
"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to delete existing output file^^!\n"
|
"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to delete existing output file^!\n"
|
||||||
pause && exit
|
pause && exit
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -173,7 +173,15 @@ pushd "%TMP_PATH%"
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_UPX_PATH=%PATH_UPXBIN%" "/DLAMEXP_DATE=%ISO_DATE%" "/DLAMEXP_VERSION=%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%" "/DLAMEXP_BUILD=%VER_LAMEXP_BUILD%" "/DLAMEXP_INSTTYPE=%VER_LAMEXP_TYPE%" "/DLAMEXP_PATCH=%VER_LAMEXP_PATCH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.sfx" "/DLAMEXP_SOURCE_PATH=%TMP_PATH%" "%~dp0\..\NSIS\setup.nsi"
|
"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_UPX_PATH=%PATH_UPXBIN%" "/DLAMEXP_DATE=%ISO_DATE%" "/DLAMEXP_VERSION=%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%" "/DLAMEXP_BUILD=%VER_LAMEXP_BUILD%" "/DLAMEXP_INSTTYPE=%VER_LAMEXP_TYPE%" "/DLAMEXP_PATCH=%VER_LAMEXP_PATCH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.sfx" "/DLAMEXP_SOURCE_PATH=%TMP_PATH%" "%~dp0\..\NSIS\setup.nsi"
|
||||||
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
|
"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to build installer^!\n"
|
||||||
|
pause && exit
|
||||||
|
)
|
||||||
"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_UPX_PATH=%PATH_UPXBIN%" "/DLAMEXP_DATE=%ISO_DATE%" "/DLAMEXP_VERSION=%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%" "/DLAMEXP_BUILD=%VER_LAMEXP_BUILD%" "/DLAMEXP_INSTTYPE=%VER_LAMEXP_TYPE%" "/DLAMEXP_PATCH=%VER_LAMEXP_PATCH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.exe" "/DLAMEXP_SOURCE_FILE=%OUT_FILE%.sfx" "%~dp0\..\NSIS\wrapper.nsi"
|
"%PATH_MKNSIS%\makensis.exe" "/DLAMEXP_UPX_PATH=%PATH_UPXBIN%" "/DLAMEXP_DATE=%ISO_DATE%" "/DLAMEXP_VERSION=%VER_LAMEXP_MAJOR%.%VER_LAMEXP_MINOR_HI%%VER_LAMEXP_MINOR_LO%" "/DLAMEXP_BUILD=%VER_LAMEXP_BUILD%" "/DLAMEXP_INSTTYPE=%VER_LAMEXP_TYPE%" "/DLAMEXP_PATCH=%VER_LAMEXP_PATCH%" "/DLAMEXP_OUTPUT_FILE=%OUT_FILE%.exe" "/DLAMEXP_SOURCE_FILE=%OUT_FILE%.sfx" "%~dp0\..\NSIS\wrapper.nsi"
|
||||||
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
|
"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to build installer^!\n"
|
||||||
|
pause && exit
|
||||||
|
)
|
||||||
|
|
||||||
attrib -R "%TMP_PATH%\*.txt"
|
attrib -R "%TMP_PATH%\*.txt"
|
||||||
attrib -R "%TMP_PATH%\*.html"
|
attrib -R "%TMP_PATH%\*.html"
|
||||||
@ -182,7 +190,7 @@ rd /S /Q "%TMP_PATH%"
|
|||||||
|
|
||||||
for %%i in (zip,exe) do (
|
for %%i in (zip,exe) do (
|
||||||
if not exist "%OUT_FILE%.zip" (
|
if not exist "%OUT_FILE%.zip" (
|
||||||
"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to create release packages^^!\n"
|
"%~dp0\..\Utilities\CEcho.exe" red "\nFailed to create release packages^!\n"
|
||||||
pause && exit
|
pause && exit
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -193,23 +193,23 @@ VIAddVersionKey "Website" "${MyWebSite}"
|
|||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
;Welcome
|
;Welcome
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUpdate
|
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckForPreRelease
|
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckForPreRelease
|
||||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||||
!define MUI_FINISHPAGE_TITLE_3LINES
|
!define MUI_FINISHPAGE_TITLE_3LINES
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
|
|
||||||
;License
|
;License
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUpdate
|
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
|
||||||
!insertmacro MUI_PAGE_LICENSE "license.rtf"
|
!insertmacro MUI_PAGE_LICENSE "license.rtf"
|
||||||
|
|
||||||
;Directory
|
;Directory
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUpdate
|
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_SHOW CheckForUpdate
|
!define MUI_PAGE_CUSTOMFUNCTION_SHOW CheckForUpdate
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
|
|
||||||
;Startmenu
|
;Startmenu
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUpdate
|
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
|
||||||
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
|
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
|
||||||
|
|
||||||
;LockedList
|
;LockedList
|
||||||
@ -219,7 +219,7 @@ Page Custom LockedListShow
|
|||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
|
||||||
;Finish
|
;Finish
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUpdate
|
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
|
||||||
!insertmacro MUI_PAGE_FINISH
|
!insertmacro MUI_PAGE_FINISH
|
||||||
|
|
||||||
|
|
||||||
@ -304,6 +304,32 @@ UninstPage Custom un.LockedListShow
|
|||||||
!include "..\Translation\LameXP_HU.nsh"
|
!include "..\Translation\LameXP_HU.nsh"
|
||||||
|
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
;LogicLib Support
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
!macro _UnattendedMode _a _b _t _f
|
||||||
|
!insertmacro _LOGICLIB_TEMP
|
||||||
|
${StdUtils.GetParameter} $_LOGICLIB_TEMP "Update" "?#@!"
|
||||||
|
StrCmp "$_LOGICLIB_TEMP" "?#@!" `${_f}` `${_t}`
|
||||||
|
!macroend
|
||||||
|
!define UnattendedMode `"" UnattendedMode ""`
|
||||||
|
|
||||||
|
!macro _ForcedMode _a _b _t _f
|
||||||
|
!insertmacro _LOGICLIB_TEMP
|
||||||
|
${StdUtils.GetParameter} $_LOGICLIB_TEMP "Force" "?#@!"
|
||||||
|
StrCmp "$_LOGICLIB_TEMP" "?#@!" `${_f}` `${_t}`
|
||||||
|
!macroend
|
||||||
|
!define ForcedMode `"" ForcedMode ""`
|
||||||
|
|
||||||
|
!macro _ValidFileName _a _b _t _f
|
||||||
|
!insertmacro _LOGICLIB_TEMP
|
||||||
|
${StdUtils.ValidFileName} $_LOGICLIB_TEMP `${_b}`
|
||||||
|
StrCmp "$_LOGICLIB_TEMP" "ok" `${_t}` `${_f}`
|
||||||
|
!macroend
|
||||||
|
!define ValidFileName `"" ValidFileName`
|
||||||
|
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Installer initialization
|
;Installer initialization
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
@ -358,8 +384,7 @@ Function .onInit
|
|||||||
|
|
||||||
; --------
|
; --------
|
||||||
|
|
||||||
${StdUtils.GetParameter} $R0 "Update" "?#@"
|
${IfNot} ${UnattendedMode}
|
||||||
${If} "$R0" == "?#@"
|
|
||||||
!insertmacro MUI_LANGDLL_DISPLAY
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
@ -389,8 +414,7 @@ Function un.onInit
|
|||||||
Quit
|
Quit
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${StdUtils.GetParameter} $R0 "Force" "?"
|
${IfNot} ${ForcedMode}
|
||||||
${If} "$R0" == "?"
|
|
||||||
!insertmacro MUI_LANGDLL_DISPLAY
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
@ -461,7 +485,10 @@ FunctionEnd
|
|||||||
!macro GetExecutableName OutVar
|
!macro GetExecutableName OutVar
|
||||||
${StdUtils.GetParameter} ${OutVar} "Update" ""
|
${StdUtils.GetParameter} ${OutVar} "Update" ""
|
||||||
${StdUtils.TrimStr} ${OutVar}
|
${StdUtils.TrimStr} ${OutVar}
|
||||||
${IfThen} "${OutVar}" == "" ${|} StrCpy ${OutVar} "LameXP.exe" ${|}
|
${If} "${OutVar}" == ""
|
||||||
|
${OrIfNot} ${ValidFileName} "${OutVar}"
|
||||||
|
StrCpy ${OutVar} "LameXP.exe"
|
||||||
|
${EndIf}
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
!macro DisableNextButton TmpVar
|
!macro DisableNextButton TmpVar
|
||||||
@ -469,6 +496,11 @@ FunctionEnd
|
|||||||
EnableWindow ${TmpVar} 0
|
EnableWindow ${TmpVar} 0
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
|
!macro DisableBackButton TmpVar
|
||||||
|
GetDlgItem ${TmpVar} $HWNDPARENT 3
|
||||||
|
EnableWindow ${TmpVar} 0
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Install Files
|
;Install Files
|
||||||
@ -591,8 +623,7 @@ Section "-Finished"
|
|||||||
${EndIf}
|
${EndIf}
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
${StdUtils.GetParameter} $R0 "Update" "?#@"
|
${IfThen} ${UnattendedMode} ${|} SetAutoClose true ${|}
|
||||||
${IfNotThen} "$R0" == "?#@" ${|} SetAutoClose true ${|}
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
|
||||||
@ -690,9 +721,8 @@ SectionEnd
|
|||||||
;Check For Update Mode
|
;Check For Update Mode
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
Function SkipIfUpdate
|
Function SkipIfUnattended
|
||||||
${StdUtils.GetParameter} $R0 "Update" "?#@"
|
${IfThen} ${UnattendedMode} ${|} Abort ${|}
|
||||||
${IfNotThen} "$R0" == "?#@" ${|} Abort ${|}
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function CheckForUpdate
|
Function CheckForUpdate
|
||||||
@ -712,8 +742,7 @@ Function CheckForUpdate
|
|||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function un.CheckForcedUninstall
|
Function un.CheckForcedUninstall
|
||||||
${StdUtils.GetParameter} $R0 "Force" "?#@"
|
${IfThen} ${ForcedMode} ${|} Abort ${|}
|
||||||
${IfNotThen} "$R0" == "?#@" ${|} Abort ${|}
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
|
||||||
@ -723,11 +752,10 @@ FunctionEnd
|
|||||||
|
|
||||||
Function CheckForPreRelease
|
Function CheckForPreRelease
|
||||||
!ifdef LAMEXP_IS_PRERELEASE
|
!ifdef LAMEXP_IS_PRERELEASE
|
||||||
${StdUtils.GetParameter} $R0 "Update" "?#@"
|
${IfNot} ${UnattendedMode}
|
||||||
StrCmp $R0 "?#@" 0 SkipPrereleaseWarning
|
|
||||||
MessageBox MB_TOPMOST|MB_ICONEXCLAMATION|MB_OKCANCEL "$(LAMEXP_LANG_PRERELEASE_WARNING)" /SD IDOK IDOK +2
|
MessageBox MB_TOPMOST|MB_ICONEXCLAMATION|MB_OKCANCEL "$(LAMEXP_LANG_PRERELEASE_WARNING)" /SD IDOK IDOK +2
|
||||||
Quit
|
Quit
|
||||||
SkipPrereleaseWarning:
|
${EndIf}
|
||||||
!endif
|
!endif
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
@ -738,17 +766,23 @@ FunctionEnd
|
|||||||
|
|
||||||
!macro _LockedListShow uinst
|
!macro _LockedListShow uinst
|
||||||
!insertmacro MUI_HEADER_TEXT "$(LAMEXP_LANG_LOCKEDLIST_HEADER)" "$(LAMEXP_LANG_LOCKEDLIST_TEXT)"
|
!insertmacro MUI_HEADER_TEXT "$(LAMEXP_LANG_LOCKEDLIST_HEADER)" "$(LAMEXP_LANG_LOCKEDLIST_TEXT)"
|
||||||
InitPluginsDir
|
${If} ${UnattendedMode}
|
||||||
|
!insertmacro DisableBackButton $R0
|
||||||
|
${EndIf}
|
||||||
${If} ${RunningX64}
|
${If} ${RunningX64}
|
||||||
|
InitPluginsDir
|
||||||
File /oname=$PLUGINSDIR\LockedList64.dll `${NSISDIR}\Plugins\LockedList64.dll`
|
File /oname=$PLUGINSDIR\LockedList64.dll `${NSISDIR}\Plugins\LockedList64.dll`
|
||||||
${EndIf}
|
${EndIf}
|
||||||
!insertmacro GetExecutableName $R0
|
!insertmacro GetExecutableName $R0
|
||||||
LockedList::AddFolder "$INSTDIR"
|
|
||||||
LockedList::AddModule "\$R0"
|
LockedList::AddModule "\$R0"
|
||||||
|
${If} "$R0" != "LameXP.exe"
|
||||||
|
LockedList::AddModule "\LameXP.exe"
|
||||||
|
${EndIf}
|
||||||
LockedList::AddModule "\Uninstall.exe"
|
LockedList::AddModule "\Uninstall.exe"
|
||||||
!if ${uinst} < 1
|
!if ${uinst} < 1
|
||||||
LockedList::AddModule "\Au_.exe"
|
LockedList::AddModule "\Au_.exe"
|
||||||
!endif
|
!endif
|
||||||
|
LockedList::AddFolder "$INSTDIR"
|
||||||
LockedList::Dialog /autonext /heading "$(LAMEXP_LANG_LOCKEDLIST_HEADING)" /noprograms "$(LAMEXP_LANG_LOCKEDLIST_NOPROG)" /searching "$(LAMEXP_LANG_LOCKEDLIST_SEARCH)" /colheadings "$(LAMEXP_LANG_LOCKEDLIST_COLHDR1)" "$(LAMEXP_LANG_LOCKEDLIST_COLHDR2)"
|
LockedList::Dialog /autonext /heading "$(LAMEXP_LANG_LOCKEDLIST_HEADING)" /noprograms "$(LAMEXP_LANG_LOCKEDLIST_NOPROG)" /searching "$(LAMEXP_LANG_LOCKEDLIST_SEARCH)" /colheadings "$(LAMEXP_LANG_LOCKEDLIST_COLHDR1)" "$(LAMEXP_LANG_LOCKEDLIST_COLHDR2)"
|
||||||
Pop $R0
|
Pop $R0
|
||||||
!macroend
|
!macroend
|
||||||
@ -779,8 +813,7 @@ Function ShowReadmeFunction
|
|||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function .onInstSuccess
|
Function .onInstSuccess
|
||||||
${StdUtils.GetParameter} $R0 "Update" "?#@"
|
${If} ${UnattendedMode}
|
||||||
${IfNot} "$R0" == "?#@"
|
|
||||||
!insertmacro GetExecutableName $R0
|
!insertmacro GetExecutableName $R0
|
||||||
${StdUtils.ExecShellAsUser} $R1 "$INSTDIR\$R0" "open" "--first-run"
|
${StdUtils.ExecShellAsUser} $R1 "$INSTDIR\$R0" "open" "--first-run"
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#define VER_LAMEXP_MINOR_LO 2
|
#define VER_LAMEXP_MINOR_LO 2
|
||||||
#define VER_LAMEXP_TYPE Alpha
|
#define VER_LAMEXP_TYPE Alpha
|
||||||
#define VER_LAMEXP_PATCH 8
|
#define VER_LAMEXP_PATCH 8
|
||||||
#define VER_LAMEXP_BUILD 1760
|
#define VER_LAMEXP_BUILD 1762
|
||||||
#define VER_LAMEXP_CONFG 1700
|
#define VER_LAMEXP_CONFG 1700
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user