builder-debug.yml 7.3 KB

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