mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-23 08:57:34 +09:00
Mypal portable mode
This commit is contained in:
parent
32c50fd018
commit
633ef1c426
24 changed files with 299 additions and 25 deletions
|
|
@ -40,6 +40,7 @@ Var AddDesktopSC
|
|||
Var InstallMaintenanceService
|
||||
Var PageName
|
||||
Var PreventRebootRequired
|
||||
Var PrtChkb
|
||||
|
||||
; By defining NO_STARTMENU_DIR an installer that doesn't provide an option for
|
||||
; an application's Start Menu PROGRAMS directory and doesn't define the
|
||||
|
|
@ -289,6 +290,15 @@ Section "-Application" APP_IDX
|
|||
"$(ERROR_CREATE_DIRECTORY_PREFIX)" \
|
||||
"$(ERROR_CREATE_DIRECTORY_SUFFIX)"
|
||||
|
||||
${If} $InstallType == ${INSTALLTYPE_PORTABLE}
|
||||
${If} $PrtChkb == 1
|
||||
FileOpen $0 "$INSTDIR\browser\pmprt.mod" w
|
||||
FileClose $0
|
||||
${Else}
|
||||
FileOpen $0 "$INSTDIR\browser\pmundprt.mod" w
|
||||
FileClose $0
|
||||
${EndIf}
|
||||
${Else}
|
||||
; Register DLLs
|
||||
; XXXrstrong - AccessibleMarshal.dll can be used by multiple applications but
|
||||
; is only registered for the last application installed. When the last
|
||||
|
|
@ -538,6 +548,7 @@ Section "-Application" APP_IDX
|
|||
${EndIf}
|
||||
${EndUnless}
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
; Cleanup operations to perform at the end of the installation.
|
||||
|
|
@ -856,6 +867,12 @@ Function leaveOptions
|
|||
${MUI_INSTALLOPTIONS_READ} $R0 "options.ini" "Field 3" "State"
|
||||
StrCmp $R0 "1" +1 +2
|
||||
StrCpy $InstallType ${INSTALLTYPE_CUSTOM}
|
||||
${MUI_INSTALLOPTIONS_READ} $R0 "options.ini" "Field 6" "State"
|
||||
StrCmp $R0 "1" +1 +2
|
||||
StrCpy $InstallType ${INSTALLTYPE_PORTABLE}
|
||||
${MUI_INSTALLOPTIONS_READ} $R0 "options.ini" "Field 7" "State"
|
||||
StrCmp $R0 "1" +1 +2
|
||||
StrCpy $PrtChkb 1
|
||||
|
||||
${LeaveOptionsCommon}
|
||||
|
||||
|
|
@ -945,6 +962,7 @@ Function preSummary
|
|||
DeleteINISec "$PLUGINSDIR\summary.ini" "Field 4"
|
||||
|
||||
; Check if it is possible to write to HKLM
|
||||
${If} $InstallType != ${INSTALLTYPE_PORTABLE}
|
||||
ClearErrors
|
||||
WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" "Write Test"
|
||||
${Unless} ${Errors}
|
||||
|
|
@ -991,6 +1009,7 @@ Function preSummary
|
|||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Left "0"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Right "-1"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
!insertmacro MUI_HEADER_TEXT "$(SUMMARY_PAGE_TITLE)" "$(SUMMARY_PAGE_SUBTITLE)"
|
||||
|
||||
|
|
@ -1113,7 +1132,7 @@ Function .onInit
|
|||
!insertmacro InitInstallOptionsFile "shortcuts.ini"
|
||||
!insertmacro InitInstallOptionsFile "summary.ini"
|
||||
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Settings" NumFields "5"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Settings" NumFields "7"
|
||||
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Type "label"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Text "$(OPTIONS_SUMMARY)"
|
||||
|
|
@ -1139,6 +1158,14 @@ Function .onInit
|
|||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 3" Bottom "65"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 3" State "0"
|
||||
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Type "RadioButton"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Text "$(OPTION_PORTABLE_RADIO)"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Left "0"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Right "-1"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Top "85"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Bottom "95"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" State "0"
|
||||
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 4" Type "label"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 4" Text "$(OPTION_STANDARD_DESC)"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 4" Left "15"
|
||||
|
|
@ -1153,6 +1180,14 @@ Function .onInit
|
|||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Top "67"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Bottom "87"
|
||||
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" Type "checkbox"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" Text "$(OPTION_PORTABLE_DESC)"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" Left "15"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" Right "-1"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" Top "97"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" Bottom "117"
|
||||
WriteINIStr "$PLUGINSDIR\options.ini" "Field 7" State "0"
|
||||
|
||||
; Setup the shortcuts.ini file for the Custom Shortcuts Page
|
||||
; Don't offer to install the quick launch shortcut on Windows 7
|
||||
${If} ${AtLeastWin7}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue