You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

211 lines
6.6 KiB

1 month ago
  1. x64:
  2. firstOrDefaultFilePatterns:
  3. - '**/*'
  4. - '!**/node_modules'
  5. - '!build{,/**/*}'
  6. - '!dist{,/**/*}'
  7. - '!**/*.{iml,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,suo,xproj,cc,d.ts,pdb}'
  8. - '!**/._*'
  9. - '!**/electron-builder.{yaml,yml,json,json5,toml}'
  10. - '!**/{.git,.hg,.svn,CVS,RCS,SCCS,__pycache__,.DS_Store,thumbs.db,.gitignore,.gitkeep,.gitattributes,.npmignore,.idea,.vs,.flowconfig,.jshintrc,.eslintrc,.circleci,.yarn-integrity,.yarn-metadata.json,yarn-error.log,yarn.lock,package-lock.json,npm-debug.log,appveyor.yml,.travis.yml,circle.yml,.nyc_output}'
  11. - '!.yarn{,/**/*}'
  12. - '!.editorconfig'
  13. - '!.yarnrc.yml'
  14. nodeModuleFilePatterns: []
  15. nsis:
  16. script: |-
  17. !include "D:\work\electorn\node_modules\app-builder-lib\templates\nsis\include\StdUtils.nsh"
  18. !addincludedir "D:\work\electorn\node_modules\app-builder-lib\templates\nsis\include"
  19. !macro _isUpdated _a _b _t _f
  20. ${StdUtils.TestParameter} $R9 "updated"
  21. StrCmp "$R9" "true" `${_t}` `${_f}`
  22. !macroend
  23. !define isUpdated `"" isUpdated ""`
  24. !macro _isForceRun _a _b _t _f
  25. ${StdUtils.TestParameter} $R9 "force-run"
  26. StrCmp "$R9" "true" `${_t}` `${_f}`
  27. !macroend
  28. !define isForceRun `"" isForceRun ""`
  29. !macro _isKeepShortcuts _a _b _t _f
  30. ${StdUtils.TestParameter} $R9 "keep-shortcuts"
  31. StrCmp "$R9" "true" `${_t}` `${_f}`
  32. !macroend
  33. !define isKeepShortcuts `"" isKeepShortcuts ""`
  34. !macro _isNoDesktopShortcut _a _b _t _f
  35. ${StdUtils.TestParameter} $R9 "no-desktop-shortcut"
  36. StrCmp "$R9" "true" `${_t}` `${_f}`
  37. !macroend
  38. !define isNoDesktopShortcut `"" isNoDesktopShortcut ""`
  39. !macro _isDeleteAppData _a _b _t _f
  40. ${StdUtils.TestParameter} $R9 "delete-app-data"
  41. StrCmp "$R9" "true" `${_t}` `${_f}`
  42. !macroend
  43. !define isDeleteAppData `"" isDeleteAppData ""`
  44. !macro _isForAllUsers _a _b _t _f
  45. ${StdUtils.TestParameter} $R9 "allusers"
  46. StrCmp "$R9" "true" `${_t}` `${_f}`
  47. !macroend
  48. !define isForAllUsers `"" isForAllUsers ""`
  49. !macro _isForCurrentUser _a _b _t _f
  50. ${StdUtils.TestParameter} $R9 "currentuser"
  51. StrCmp "$R9" "true" `${_t}` `${_f}`
  52. !macroend
  53. !define isForCurrentUser `"" isForCurrentUser ""`
  54. !macro addLangs
  55. !insertmacro MUI_LANGUAGE "English"
  56. !insertmacro MUI_LANGUAGE "German"
  57. !insertmacro MUI_LANGUAGE "French"
  58. !insertmacro MUI_LANGUAGE "SpanishInternational"
  59. !insertmacro MUI_LANGUAGE "SimpChinese"
  60. !insertmacro MUI_LANGUAGE "TradChinese"
  61. !insertmacro MUI_LANGUAGE "Japanese"
  62. !insertmacro MUI_LANGUAGE "Korean"
  63. !insertmacro MUI_LANGUAGE "Italian"
  64. !insertmacro MUI_LANGUAGE "Dutch"
  65. !insertmacro MUI_LANGUAGE "Danish"
  66. !insertmacro MUI_LANGUAGE "Swedish"
  67. !insertmacro MUI_LANGUAGE "Norwegian"
  68. !insertmacro MUI_LANGUAGE "Finnish"
  69. !insertmacro MUI_LANGUAGE "Russian"
  70. !insertmacro MUI_LANGUAGE "Portuguese"
  71. !insertmacro MUI_LANGUAGE "PortugueseBR"
  72. !insertmacro MUI_LANGUAGE "Polish"
  73. !insertmacro MUI_LANGUAGE "Ukrainian"
  74. !insertmacro MUI_LANGUAGE "Czech"
  75. !insertmacro MUI_LANGUAGE "Slovak"
  76. !insertmacro MUI_LANGUAGE "Hungarian"
  77. !insertmacro MUI_LANGUAGE "Arabic"
  78. !insertmacro MUI_LANGUAGE "Turkish"
  79. !insertmacro MUI_LANGUAGE "Thai"
  80. !insertmacro MUI_LANGUAGE "Vietnamese"
  81. !macroend
  82. !include "C:\Users\iflyt\AppData\Local\Temp\t-9hI68z\0-messages.nsh"
  83. !addplugindir /x86-unicode "C:\Users\iflyt\AppData\Local\electron-builder\Cache\nsis\nsis-resources-3.4.1\plugins\x86-unicode"
  84. Var newStartMenuLink
  85. Var oldStartMenuLink
  86. Var newDesktopLink
  87. Var oldDesktopLink
  88. Var oldShortcutName
  89. Var oldMenuDirectory
  90. !include "common.nsh"
  91. !include "MUI2.nsh"
  92. !include "multiUser.nsh"
  93. !include "allowOnlyOneInstallerInstance.nsh"
  94. !ifdef INSTALL_MODE_PER_ALL_USERS
  95. !ifdef BUILD_UNINSTALLER
  96. RequestExecutionLevel user
  97. !else
  98. RequestExecutionLevel admin
  99. !endif
  100. !else
  101. RequestExecutionLevel user
  102. !endif
  103. !ifdef BUILD_UNINSTALLER
  104. SilentInstall silent
  105. !else
  106. Var appExe
  107. Var launchLink
  108. !endif
  109. !ifdef ONE_CLICK
  110. !include "oneClick.nsh"
  111. !else
  112. !include "assistedInstaller.nsh"
  113. !endif
  114. !insertmacro addLangs
  115. !ifmacrodef customHeader
  116. !insertmacro customHeader
  117. !endif
  118. Function .onInit
  119. SetOutPath $INSTDIR
  120. ${LogSet} on
  121. !ifmacrodef preInit
  122. !insertmacro preInit
  123. !endif
  124. !ifdef DISPLAY_LANG_SELECTOR
  125. !insertmacro MUI_LANGDLL_DISPLAY
  126. !endif
  127. !ifdef BUILD_UNINSTALLER
  128. WriteUninstaller "${UNINSTALLER_OUT_FILE}"
  129. !insertmacro quitSuccess
  130. !else
  131. !insertmacro check64BitAndSetRegView
  132. !ifdef ONE_CLICK
  133. !insertmacro ALLOW_ONLY_ONE_INSTALLER_INSTANCE
  134. !else
  135. ${IfNot} ${UAC_IsInnerInstance}
  136. !insertmacro ALLOW_ONLY_ONE_INSTALLER_INSTANCE
  137. ${EndIf}
  138. !endif
  139. !insertmacro initMultiUser
  140. !ifmacrodef customInit
  141. !insertmacro customInit
  142. !endif
  143. !ifmacrodef addLicenseFiles
  144. InitPluginsDir
  145. !insertmacro addLicenseFiles
  146. !endif
  147. !endif
  148. FunctionEnd
  149. !ifndef BUILD_UNINSTALLER
  150. !include "installUtil.nsh"
  151. !endif
  152. Section "install"
  153. !ifndef BUILD_UNINSTALLER
  154. # If we're running a silent upgrade of a per-machine installation, elevate so extracting the new app will succeed.
  155. # For a non-silent install, the elevation will be triggered when the install mode is selected in the UI,
  156. # but that won't be executed when silent.
  157. !ifndef INSTALL_MODE_PER_ALL_USERS
  158. !ifndef ONE_CLICK
  159. ${if} $hasPerMachineInstallation == "1" # set in onInit by initMultiUser
  160. ${andIf} ${Silent}
  161. ${ifNot} ${UAC_IsAdmin}
  162. ShowWindow $HWNDPARENT ${SW_HIDE}
  163. !insertmacro UAC_RunElevated
  164. ${Switch} $0
  165. ${Case} 0
  166. ${Break}
  167. ${Case} 1223 ;user aborted
  168. ${Break}
  169. ${Default}
  170. MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Unable to elevate, error $0"
  171. ${Break}
  172. ${EndSwitch}
  173. Quit
  174. ${else}
  175. !insertmacro setInstallModePerAllUsers
  176. ${endIf}
  177. ${endIf}
  178. !endif
  179. !endif
  180. !include "installSection.nsh"
  181. !endif
  182. SectionEnd
  183. !ifdef BUILD_UNINSTALLER
  184. !include "uninstaller.nsh"
  185. !endif