Advertisement
Alek7990

Untitled

Mar 19th, 2014
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 187.28 KB | None | 0 0
  1. MakeNSIS v2.46.5-Unicode - Copyright 1995-2009 Contributors
  2. See the file COPYING for license details.
  3. Credits can be found in the Users Manual.
  4.  
  5. Command line defined: "PACKAGE=E:\PortableApps\JustGesturePortable"
  6. Command line defined: "NamePortable=Just Gesture"
  7. Command line defined: "AppID=JustGesturePortable"
  8. Command line defined: "Version=2.2.0.0E:"
  9. Changing directory to: "E:\PortableApps\PortableApps.comLauncher\Other\Source"
  10.  
  11. Processing script file: "E:\PortableApps\PortableApps.comLauncher\Other\Source\PortableApps.comLauncher.nsi"
  12. Processing plugin dlls: "E:\PortableApps\NSISPortable\App\NSIS\Plugins\*.dll"
  13. - AdvSplash::show
  14. - Banner::destroy
  15. - Banner::getWindow
  16. - Banner::show
  17. - BgImage::AddImage
  18. - BgImage::AddText
  19. - BgImage::Clear
  20. - BgImage::Destroy
  21. - BgImage::Redraw
  22. - BgImage::SetBg
  23. - BgImage::SetReturn
  24. - BgImage::Sound
  25. - Dialer::AttemptConnect
  26. - Dialer::AutodialHangup
  27. - Dialer::AutodialOnline
  28. - Dialer::AutodialUnattended
  29. - Dialer::GetConnectedState
  30. - EmbeddedLists::Dialog
  31. - EmbeddedLists::InitDialog
  32. - EmbeddedLists::Show
  33. - EnumINI::KeyExist
  34. - EnumINI::Section
  35. - EnumINI::SectionExist
  36. - EnumINI::SectionNames
  37. - FindProcDLL::FindProc
  38. - InstallOptions::dialog
  39. - InstallOptions::initDialog
  40. - InstallOptions::show
  41. - KillProcDLL::KillProc
  42. - LangDLL::LangDialog
  43. - Math::Script
  44. - MoreInfo::GetComments
  45. - MoreInfo::GetCompanyName
  46. - MoreInfo::GetFileDescription
  47. - MoreInfo::GetFileVersion
  48. - MoreInfo::GetInternalName
  49. - MoreInfo::GetLegalCopyright
  50. - MoreInfo::GetLegalTrademarks
  51. - MoreInfo::GetOSUserinterfaceLanguage
  52. - MoreInfo::GetOriginalFilename
  53. - MoreInfo::GetPrivateBuild
  54. - MoreInfo::GetProductName
  55. - MoreInfo::GetProductVersion
  56. - MoreInfo::GetSpecialBuild
  57. - MoreInfo::GetUserDefined
  58. - NSISdl::download
  59. - NSISdl::download_quiet
  60. - RealProgress::AddProgress
  61. - RealProgress::DetailProgress
  62. - RealProgress::FileProgress
  63. - RealProgress::GetProgress
  64. - RealProgress::GradualProgress
  65. - RealProgress::SetProgress
  66. - RealProgress::Unload
  67. - RealProgress::UseProgressBar
  68. - SelfDel::Del
  69. - Splash::show
  70. - StartMenu::Init
  71. - StartMenu::Select
  72. - StartMenu::Show
  73. - System::Alloc
  74. - System::Call
  75. - System::Copy
  76. - System::Free
  77. - System::Get
  78. - System::Int64Op
  79. - System::Store
  80. - System::StrAlloc
  81. - TypeLib::GetLibVersion
  82. - TypeLib::Register
  83. - TypeLib::UnRegister
  84. - UserInfo::GetAccountType
  85. - UserInfo::GetName
  86. - UserInfo::GetOriginalAccountType
  87. - VPatch::GetFileCRC32
  88. - VPatch::GetFileMD5
  89. - VPatch::vpatchfile
  90. - dialogsEx::FileBox
  91. - dialogsEx::FolderBox
  92. - dialogsEx::InputBox
  93. - dialogsEx::InputRegBox
  94. - execDos::exec
  95. - execDos::isdone
  96. - execDos::wait
  97. - inetc::get
  98. - inetc::head
  99. - inetc::post
  100. - inetc::put
  101. - md5dll::GetFileMD5
  102. - md5dll::GetMD5
  103. - md5dll::GetMD5File
  104. - md5dll::GetMD5Random
  105. - md5dll::GetMD5String
  106. - newadvsplash::hwnd
  107. - newadvsplash::play
  108. - newadvsplash::show
  109. - newadvsplash::stop
  110. - newtextreplace::_FillReadBuffer
  111. - newtextreplace::_FindInFile
  112. - newtextreplace::_FreeReadBuffer
  113. - newtextreplace::_ReplaceInFile
  114. - newtextreplace::_Unload
  115. - nsDialogs::Create
  116. - nsDialogs::CreateControl
  117. - nsDialogs::CreateItem
  118. - nsDialogs::CreateTimer
  119. - nsDialogs::GetUserData
  120. - nsDialogs::KillTimer
  121. - nsDialogs::OnBack
  122. - nsDialogs::OnChange
  123. - nsDialogs::OnClick
  124. - nsDialogs::OnNotify
  125. - nsDialogs::SelectFileDialog
  126. - nsDialogs::SelectFolderDialog
  127. - nsDialogs::SetRTL
  128. - nsDialogs::SetUserData
  129. - nsDialogs::Show
  130. - nsExec::Exec
  131. - nsExec::ExecToLog
  132. - nsExec::ExecToStack
  133. - registry::_Close
  134. - registry::_CopyKey
  135. - registry::_CopyValue
  136. - registry::_CreateKey
  137. - registry::_DeleteKey
  138. - registry::_DeleteKeyEmpty
  139. - registry::_DeleteValue
  140. - registry::_Find
  141. - registry::_HexToStr
  142. - registry::_HexToStrUTF16LE
  143. - registry::_KeyExists
  144. - registry::_MoveKey
  145. - registry::_MoveValue
  146. - registry::_Open
  147. - registry::_Read
  148. - registry::_ReadExtra
  149. - registry::_RestoreKey
  150. - registry::_SaveKey
  151. - registry::_StrToHex
  152. - registry::_StrToHexUTF16LE
  153. - registry::_Unload
  154. - registry::_Write
  155. - registry::_WriteExtra
  156. - w7tbp::Start
  157.  
  158. (If you get a compile error with !searchparse, please upgrade to Unicode NSIS 2.46 or later and try again.) (RequireLatestNSIS.nsh:11)
  159. Including required files... (macro:!echo:3)
  160. - UAC::_
  161. - newtextreplace::_FillReadBuffer
  162. - newtextreplace::_FindInFile
  163. - newtextreplace::_FreeReadBuffer
  164. - newtextreplace::_ReplaceInFile
  165. - newtextreplace::_Unload
  166. - xml::_CloneNode
  167. - xml::_Coordinate
  168. - xml::_CreateNode
  169. - xml::_CreateText
  170. - xml::_CurrentAttribute
  171. - xml::_DeclarationEncoding
  172. - xml::_DeclarationStandalone
  173. - xml::_DeclarationVersion
  174. - xml::_ElementPath
  175. - xml::_FindCloseElement
  176. - xml::_FindNextElement
  177. - xml::_FirstAttribute
  178. - xml::_FirstChild
  179. - xml::_FirstChildElement
  180. - xml::_FreeNode
  181. - xml::_GetAttribute
  182. - xml::_GetNodeValue
  183. - xml::_GetText
  184. - xml::_GotoHandle
  185. - xml::_GotoPath
  186. - xml::_InsertAfterNode
  187. - xml::_InsertBeforeNode
  188. - xml::_InsertEndChild
  189. - xml::_IsCDATA
  190. - xml::_LastAttribute
  191. - xml::_LastChild
  192. - xml::_LoadFile
  193. - xml::_NextAttribute
  194. - xml::_NextSibling
  195. - xml::_NextSiblingElement
  196. - xml::_NoChildren
  197. - xml::_NodeHandle
  198. - xml::_NodeType
  199. - xml::_Parent
  200. - xml::_PreviousAttribute
  201. - xml::_PreviousSibling
  202. - xml::_RemoveAllChild
  203. - xml::_RemoveAttribute
  204. - xml::_RemoveNode
  205. - xml::_ReplaceNode
  206. - xml::_RootElement
  207. - xml::_SaveFile
  208. - xml::_SetAttribute
  209. - xml::_SetAttributeName
  210. - xml::_SetAttributeValue
  211. - xml::_SetCDATA
  212. - xml::_SetCondenseWhiteSpace
  213. - xml::_SetEncoding
  214. - xml::_SetNodeValue
  215. - xml::_SetText
  216. - xml::_Unload
  217. - xml::_XPathAttribute
  218. - xml::_XPathNode
  219. - xml::_XPathString
  220. Loading language strings... (macro:!echo:3)
  221. Initialising variables and macros... (macro:!echo:3)
  222. Loading segments... (macro:!echo:3)
  223. warning: !include: could not find: "E:\PortableApps\JustGesturePortable\App\AppInfo\Launcher\Custom.nsh" (Segments.nsh:122)
  224. warning: !include: could not find: "E:\PortableApps\JustGesturePortable\App\AppInfo\Launcher\Debug.nsh" (Debug.nsh:87)
  225. Specifying program details and setting options... (macro:!echo:3)
  226. Function: ".onInit"
  227. !insertmacro: RunSegment
  228. !insertmacro: end of RunSegment
  229. !insertmacro: RunSegment
  230. !insertmacro: !getdebug
  231. !insertmacro: end of !getdebug
  232. !insertmacro: Core.nsh_.onInit
  233. !insertmacro: GetBaseNameCall
  234. !insertmacro: end of GetBaseNameCall
  235. StrCpy $LauncherFile "$EXEDIR\App\AppInfo\Launcher\$BaseName.ini" () ()
  236. ClearErrors
  237. ReadINIStr $AppID [Details]:AppID from $EXEDIR\App\AppInfo\appinfo.ini
  238. ReadINIStr $AppNamePortable [Details]:Name from $EXEDIR\App\AppInfo\appinfo.ini
  239. !insertmacro: _If
  240. !insertmacro: end of _If
  241. StrCpy $AppNamePortable "PortableApps.com Launcher" () ()
  242. StrCpy $MissingFileOrPath "$EXEDIR\App\AppInfo\appinfo.ini" () ()
  243. MessageBox: 16: "$(LauncherFileNotFound)"
  244. Quit
  245. !insertmacro: _EndIf
  246. !insertmacro: end of _EndIf
  247. !insertmacro: ReadLauncherConfig
  248. ReadINIStr $AppName [Launch]:AppName from $LauncherFile
  249. !insertmacro: end of ReadLauncherConfig
  250. !insertmacro: _If
  251. !insertmacro: end of _If
  252. StrCpy $0 "$AppNamePortable" () (-9)
  253. !insertmacro: _If
  254. !insertmacro: end of _If
  255. StrCpy $AppName "$AppNamePortable" (-9) ()
  256. !insertmacro: _Else
  257. !insertmacro: end of _Else
  258. StrCpy $1 "$AppNamePortable" () (-18)
  259. !insertmacro: _If
  260. !insertmacro: end of _If
  261. StrCpy $AppName "$AppNamePortable" (-18) ()
  262. !insertmacro: _Else
  263. !insertmacro: end of _Else
  264. StrCpy $AppName "$AppNamePortable" () ()
  265. !insertmacro: _EndIf
  266. !insertmacro: end of _EndIf
  267. !insertmacro: _EndIf
  268. !insertmacro: end of _EndIf
  269. !insertmacro: _EndIf
  270. !insertmacro: end of _EndIf
  271. File: "System.dll"->"$PLUGINSDIR\System.dll" 11264 bytes
  272. Plugin Command: Call kernel32::GetCurrentProcess()i.s
  273. Plugin Command: Call kernel32::IsWow64Process(is,*i.r0)
  274. !insertmacro: _If
  275. !insertmacro: end of _If
  276. StrCpy $Bits "32" () ()
  277. !insertmacro: _Else
  278. !insertmacro: end of _Else
  279. StrCpy $Bits "64" () ()
  280. !insertmacro: _EndIf
  281. !insertmacro: end of _EndIf
  282. !insertmacro: end of Core.nsh_.onInit
  283. !insertmacro: end of RunSegment
  284. !insertmacro: RunSegment
  285. !insertmacro: !getdebug
  286. !insertmacro: end of !getdebug
  287. !insertmacro: Temp.nsh_.onInit
  288. ClearErrors
  289. ReadEnvStr: PAL:_TEMP->$TMP
  290. !insertmacro: _If
  291. !insertmacro: end of _If
  292. StrCpy $TMP "$TEMP" () ()
  293. !insertmacro: _Else
  294. !insertmacro: end of _Else
  295. !insertmacro: SetEnvironmentVariable
  296. !insertmacro: DebugMsg
  297. !insertmacro: !getdebug
  298. !insertmacro: end of !getdebug
  299. !insertmacro: end of DebugMsg
  300. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,ts)
  301. !insertmacro: end of SetEnvironmentVariable
  302. !insertmacro: SetEnvironmentVariable
  303. !insertmacro: DebugMsg
  304. !insertmacro: !getdebug
  305. !insertmacro: end of !getdebug
  306. !insertmacro: end of DebugMsg
  307. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,ts)
  308. !insertmacro: end of SetEnvironmentVariable
  309. !insertmacro: _EndIf
  310. !insertmacro: end of _EndIf
  311. !insertmacro: end of Temp.nsh_.onInit
  312. !insertmacro: end of RunSegment
  313. !insertmacro: RunSegment
  314. !insertmacro: !getdebug
  315. !insertmacro: end of !getdebug
  316. !insertmacro: Language.nsh_.onInit
  317. ReadEnvStr: PortableApps.comLocaleID->$0
  318. !insertmacro: _Switch
  319. !insertmacro: end of _Switch
  320. !insertmacro: LanguageCases
  321. !include: "C:\Users\petko\AppData\Local\Temp\nst9F2F.tmp"
  322. !insertmacro: _Case
  323. !insertmacro: end of _Case
  324. !insertmacro: _Case
  325. !insertmacro: end of _Case
  326. !insertmacro: _Case
  327. !insertmacro: end of _Case
  328. !insertmacro: _Case
  329. !insertmacro: end of _Case
  330. !insertmacro: _Case
  331. !insertmacro: end of _Case
  332. !insertmacro: _Case
  333. !insertmacro: end of _Case
  334. !insertmacro: _Case
  335. !insertmacro: end of _Case
  336. !insertmacro: _Case
  337. !insertmacro: end of _Case
  338. !insertmacro: _Case
  339. !insertmacro: end of _Case
  340. !insertmacro: _Case
  341. !insertmacro: end of _Case
  342. !insertmacro: _Case
  343. !insertmacro: end of _Case
  344. !insertmacro: _Case
  345. !insertmacro: end of _Case
  346. !insertmacro: _Case
  347. !insertmacro: end of _Case
  348. !insertmacro: _Case
  349. !insertmacro: end of _Case
  350. !insertmacro: _Case
  351. !insertmacro: end of _Case
  352. !insertmacro: _Case
  353. !insertmacro: end of _Case
  354. !insertmacro: _Case
  355. !insertmacro: end of _Case
  356. !insertmacro: _Case
  357. !insertmacro: end of _Case
  358. !insertmacro: _Case
  359. !insertmacro: end of _Case
  360. !insertmacro: _Case
  361. !insertmacro: end of _Case
  362. !insertmacro: _Case
  363. !insertmacro: end of _Case
  364. !insertmacro: _Case
  365. !insertmacro: end of _Case
  366. !insertmacro: _Case
  367. !insertmacro: end of _Case
  368. !insertmacro: _Case
  369. !insertmacro: end of _Case
  370. !include: closed: "C:\Users\petko\AppData\Local\Temp\nst9F2F.tmp"
  371. !delfile: "C:\Users\petko\AppData\Local\Temp\nst9F2F.tmp"
  372. !delfile: deleted "C:\Users\petko\AppData\Local\Temp\nst9F2F.tmp"
  373. !undef: "LangAutoDetectFile"
  374. !insertmacro: end of LanguageCases
  375. !insertmacro: DebugMsg
  376. !insertmacro: !getdebug
  377. !insertmacro: end of !getdebug
  378. !insertmacro: end of DebugMsg
  379. StrCpy $LANGUAGE "$0" () ()
  380. !insertmacro: _Goto
  381. !insertmacro: end of _Goto
  382. !insertmacro: _EndSwitch
  383. !insertmacro: end of _EndSwitch
  384. !insertmacro: end of Language.nsh_.onInit
  385. !insertmacro: end of RunSegment
  386. !insertmacro: RunSegment
  387. !insertmacro: !getdebug
  388. !insertmacro: end of !getdebug
  389. !insertmacro: OperatingSystem.nsh_.onInit
  390. !insertmacro: _OperatingSystem_CheckOS
  391. ClearErrors
  392. !insertmacro: ReadLauncherConfig
  393. ReadINIStr $0 [Launch]:MinOS from $LauncherFile
  394. !insertmacro: end of ReadLauncherConfig
  395. !insertmacro: _Select
  396. !insertmacro: end of _Select
  397. !insertmacro: _Case
  398. !insertmacro: end of _Case
  399. !insertmacro: _IfNotThen
  400. !insertmacro: end of _IfNotThen
  401. !insertmacro: _Case
  402. !insertmacro: end of _Case
  403. !insertmacro: _IfNotThen
  404. !insertmacro: end of _IfNotThen
  405. !insertmacro: _Case
  406. !insertmacro: end of _Case
  407. !insertmacro: _IfNotThen
  408. !insertmacro: end of _IfNotThen
  409. !insertmacro: _Case
  410. !insertmacro: end of _Case
  411. !insertmacro: _IfNotThen
  412. !insertmacro: end of _IfNotThen
  413. !insertmacro: _Case
  414. !insertmacro: end of _Case
  415. !insertmacro: _IfNotThen
  416. !insertmacro: end of _IfNotThen
  417. !insertmacro: _Case
  418. !insertmacro: end of _Case
  419. !insertmacro: _IfNotThen
  420. !insertmacro: end of _IfNotThen
  421. !insertmacro: _Case
  422. !insertmacro: end of _Case
  423. !insertmacro: _IfNotThen
  424. !insertmacro: end of _IfNotThen
  425. !insertmacro: _CaseElse
  426. !insertmacro: end of _CaseElse
  427. !insertmacro: _If
  428. !insertmacro: end of _If
  429. !insertmacro: InvalidValueError
  430. MessageBox: 16: "Error: invalid value '$0' for [Launch]:MinOS. Please refer to the Manual for valid values."
  431. !insertmacro: end of InvalidValueError
  432. !insertmacro: _EndIf
  433. !insertmacro: end of _EndIf
  434. !insertmacro: _EndSelect
  435. !insertmacro: end of _EndSelect
  436. !insertmacro: _If
  437. !insertmacro: end of _If
  438. !insertmacro: _If
  439. !insertmacro: end of _If
  440. StrCpy $1 "2000" () ()
  441. !insertmacro: _ElseIf
  442. !insertmacro: end of _ElseIf
  443. StrCpy $1 "XP" () ()
  444. !insertmacro: _ElseIf
  445. !insertmacro: end of _ElseIf
  446. StrCpy $1 "2003" () ()
  447. !insertmacro: _ElseIf
  448. !insertmacro: end of _ElseIf
  449. StrCpy $1 "Vista" () ()
  450. !insertmacro: _ElseIf
  451. !insertmacro: end of _ElseIf
  452. StrCpy $1 "2008" () ()
  453. !insertmacro: _ElseIf
  454. !insertmacro: end of _ElseIf
  455. StrCpy $1 "7" () ()
  456. !insertmacro: _ElseIf
  457. !insertmacro: end of _ElseIf
  458. StrCpy $1 "2008 R2" () ()
  459. !insertmacro: _Else
  460. !insertmacro: end of _Else
  461. StrCpy $1 "?" () ()
  462. !insertmacro: _EndIf
  463. !insertmacro: end of _EndIf
  464. MessageBox: 327696: "$(LauncherIncompatibleMinOS)"
  465. Quit
  466. !insertmacro: _EndIf
  467. !insertmacro: end of _EndIf
  468. !insertmacro: end of _OperatingSystem_CheckOS
  469. !insertmacro: _OperatingSystem_CheckOS
  470. ClearErrors
  471. !insertmacro: ReadLauncherConfig
  472. ReadINIStr $0 [Launch]:MaxOS from $LauncherFile
  473. !insertmacro: end of ReadLauncherConfig
  474. !insertmacro: _Select
  475. !insertmacro: end of _Select
  476. !insertmacro: _Case
  477. !insertmacro: end of _Case
  478. !insertmacro: _IfNotThen
  479. !insertmacro: end of _IfNotThen
  480. !insertmacro: _Case
  481. !insertmacro: end of _Case
  482. !insertmacro: _IfNotThen
  483. !insertmacro: end of _IfNotThen
  484. !insertmacro: _Case
  485. !insertmacro: end of _Case
  486. !insertmacro: _IfNotThen
  487. !insertmacro: end of _IfNotThen
  488. !insertmacro: _Case
  489. !insertmacro: end of _Case
  490. !insertmacro: _IfNotThen
  491. !insertmacro: end of _IfNotThen
  492. !insertmacro: _Case
  493. !insertmacro: end of _Case
  494. !insertmacro: _IfNotThen
  495. !insertmacro: end of _IfNotThen
  496. !insertmacro: _Case
  497. !insertmacro: end of _Case
  498. !insertmacro: _IfNotThen
  499. !insertmacro: end of _IfNotThen
  500. !insertmacro: _Case
  501. !insertmacro: end of _Case
  502. !insertmacro: _IfNotThen
  503. !insertmacro: end of _IfNotThen
  504. !insertmacro: _CaseElse
  505. !insertmacro: end of _CaseElse
  506. !insertmacro: _If
  507. !insertmacro: end of _If
  508. !insertmacro: InvalidValueError
  509. MessageBox: 16: "Error: invalid value '$0' for [Launch]:MaxOS. Please refer to the Manual for valid values."
  510. !insertmacro: end of InvalidValueError
  511. !insertmacro: _EndIf
  512. !insertmacro: end of _EndIf
  513. !insertmacro: _EndSelect
  514. !insertmacro: end of _EndSelect
  515. !insertmacro: _If
  516. !insertmacro: end of _If
  517. !insertmacro: _If
  518. !insertmacro: end of _If
  519. StrCpy $1 "2000" () ()
  520. !insertmacro: _ElseIf
  521. !insertmacro: end of _ElseIf
  522. StrCpy $1 "XP" () ()
  523. !insertmacro: _ElseIf
  524. !insertmacro: end of _ElseIf
  525. StrCpy $1 "2003" () ()
  526. !insertmacro: _ElseIf
  527. !insertmacro: end of _ElseIf
  528. StrCpy $1 "Vista" () ()
  529. !insertmacro: _ElseIf
  530. !insertmacro: end of _ElseIf
  531. StrCpy $1 "2008" () ()
  532. !insertmacro: _ElseIf
  533. !insertmacro: end of _ElseIf
  534. StrCpy $1 "7" () ()
  535. !insertmacro: _ElseIf
  536. !insertmacro: end of _ElseIf
  537. StrCpy $1 "2008 R2" () ()
  538. !insertmacro: _Else
  539. !insertmacro: end of _Else
  540. StrCpy $1 "?" () ()
  541. !insertmacro: _EndIf
  542. !insertmacro: end of _EndIf
  543. MessageBox: 327696: "$(LauncherIncompatibleMaxOS)"
  544. Quit
  545. !insertmacro: _EndIf
  546. !insertmacro: end of _EndIf
  547. !insertmacro: end of _OperatingSystem_CheckOS
  548. !insertmacro: end of OperatingSystem.nsh_.onInit
  549. !insertmacro: end of RunSegment
  550. !insertmacro: RunSegment
  551. !insertmacro: !getdebug
  552. !insertmacro: end of !getdebug
  553. !insertmacro: RunAsAdmin.nsh_.onInit
  554. ClearErrors
  555. !insertmacro: ReadLauncherConfig
  556. ReadINIStr $RunAsAdmin [Launch]:RunAsAdmin from $LauncherFile
  557. !insertmacro: end of ReadLauncherConfig
  558. !insertmacro: _If
  559. !insertmacro: end of _If
  560. !insertmacro: _And
  561. !insertmacro: end of _And
  562. !insertmacro: _And
  563. !insertmacro: end of _And
  564. !insertmacro: _If
  565. !insertmacro: end of _If
  566. MessageBox: 16: "To use [Launch]:RunAsAdmin=compile-force, you must regenerate the launcher. Continuing with 'force'."
  567. StrCpy $RunAsAdmin "force" () ()
  568. !insertmacro: _Else
  569. !insertmacro: end of _Else
  570. !insertmacro: InvalidValueError
  571. MessageBox: 16: "Error: invalid value '$RunAsAdmin' for [Launch]:RunAsAdmin. Please refer to the Manual for valid values."
  572. !insertmacro: end of InvalidValueError
  573. !insertmacro: _EndIf
  574. !insertmacro: end of _EndIf
  575. !insertmacro: _EndIf
  576. !insertmacro: end of _EndIf
  577. !insertmacro: RunAsAdmin_OSOverride
  578. !insertmacro: _If
  579. !insertmacro: end of _If
  580. ClearErrors
  581. !insertmacro: ReadLauncherConfig
  582. ReadINIStr $0 [Launch]:RunAsAdmin2000 from $LauncherFile
  583. !insertmacro: end of ReadLauncherConfig
  584. !insertmacro: _If
  585. !insertmacro: end of _If
  586. !insertmacro: _Or
  587. !insertmacro: end of _Or
  588. StrCpy $RunAsAdmin "$0" () ()
  589. !insertmacro: _ElseIf
  590. !insertmacro: end of _ElseIf
  591. !insertmacro: InvalidValueError
  592. MessageBox: 16: "Error: invalid value '$0' for [Launch]:RunAsAdmin2000. Please refer to the Manual for valid values."
  593. !insertmacro: end of InvalidValueError
  594. !insertmacro: _EndIf
  595. !insertmacro: end of _EndIf
  596. !insertmacro: _EndIf
  597. !insertmacro: end of _EndIf
  598. !insertmacro: end of RunAsAdmin_OSOverride
  599. !insertmacro: RunAsAdmin_OSOverride
  600. !insertmacro: _If
  601. !insertmacro: end of _If
  602. ClearErrors
  603. !insertmacro: ReadLauncherConfig
  604. ReadINIStr $0 [Launch]:RunAsAdminXP from $LauncherFile
  605. !insertmacro: end of ReadLauncherConfig
  606. !insertmacro: _If
  607. !insertmacro: end of _If
  608. !insertmacro: _Or
  609. !insertmacro: end of _Or
  610. StrCpy $RunAsAdmin "$0" () ()
  611. !insertmacro: _ElseIf
  612. !insertmacro: end of _ElseIf
  613. !insertmacro: InvalidValueError
  614. MessageBox: 16: "Error: invalid value '$0' for [Launch]:RunAsAdminXP. Please refer to the Manual for valid values."
  615. !insertmacro: end of InvalidValueError
  616. !insertmacro: _EndIf
  617. !insertmacro: end of _EndIf
  618. !insertmacro: _EndIf
  619. !insertmacro: end of _EndIf
  620. !insertmacro: end of RunAsAdmin_OSOverride
  621. !insertmacro: RunAsAdmin_OSOverride
  622. !insertmacro: _If
  623. !insertmacro: end of _If
  624. ClearErrors
  625. !insertmacro: ReadLauncherConfig
  626. ReadINIStr $0 [Launch]:RunAsAdmin2003 from $LauncherFile
  627. !insertmacro: end of ReadLauncherConfig
  628. !insertmacro: _If
  629. !insertmacro: end of _If
  630. !insertmacro: _Or
  631. !insertmacro: end of _Or
  632. StrCpy $RunAsAdmin "$0" () ()
  633. !insertmacro: _ElseIf
  634. !insertmacro: end of _ElseIf
  635. !insertmacro: InvalidValueError
  636. MessageBox: 16: "Error: invalid value '$0' for [Launch]:RunAsAdmin2003. Please refer to the Manual for valid values."
  637. !insertmacro: end of InvalidValueError
  638. !insertmacro: _EndIf
  639. !insertmacro: end of _EndIf
  640. !insertmacro: _EndIf
  641. !insertmacro: end of _EndIf
  642. !insertmacro: end of RunAsAdmin_OSOverride
  643. !insertmacro: RunAsAdmin_OSOverride
  644. !insertmacro: _If
  645. !insertmacro: end of _If
  646. ClearErrors
  647. !insertmacro: ReadLauncherConfig
  648. ReadINIStr $0 [Launch]:RunAsAdminVista from $LauncherFile
  649. !insertmacro: end of ReadLauncherConfig
  650. !insertmacro: _If
  651. !insertmacro: end of _If
  652. !insertmacro: _Or
  653. !insertmacro: end of _Or
  654. StrCpy $RunAsAdmin "$0" () ()
  655. !insertmacro: _ElseIf
  656. !insertmacro: end of _ElseIf
  657. !insertmacro: InvalidValueError
  658. MessageBox: 16: "Error: invalid value '$0' for [Launch]:RunAsAdminVista. Please refer to the Manual for valid values."
  659. !insertmacro: end of InvalidValueError
  660. !insertmacro: _EndIf
  661. !insertmacro: end of _EndIf
  662. !insertmacro: _EndIf
  663. !insertmacro: end of _EndIf
  664. !insertmacro: end of RunAsAdmin_OSOverride
  665. !insertmacro: RunAsAdmin_OSOverride
  666. !insertmacro: _If
  667. !insertmacro: end of _If
  668. ClearErrors
  669. !insertmacro: ReadLauncherConfig
  670. ReadINIStr $0 [Launch]:RunAsAdmin2008 from $LauncherFile
  671. !insertmacro: end of ReadLauncherConfig
  672. !insertmacro: _If
  673. !insertmacro: end of _If
  674. !insertmacro: _Or
  675. !insertmacro: end of _Or
  676. StrCpy $RunAsAdmin "$0" () ()
  677. !insertmacro: _ElseIf
  678. !insertmacro: end of _ElseIf
  679. !insertmacro: InvalidValueError
  680. MessageBox: 16: "Error: invalid value '$0' for [Launch]:RunAsAdmin2008. Please refer to the Manual for valid values."
  681. !insertmacro: end of InvalidValueError
  682. !insertmacro: _EndIf
  683. !insertmacro: end of _EndIf
  684. !insertmacro: _EndIf
  685. !insertmacro: end of _EndIf
  686. !insertmacro: end of RunAsAdmin_OSOverride
  687. !insertmacro: RunAsAdmin_OSOverride
  688. !insertmacro: _If
  689. !insertmacro: end of _If
  690. ClearErrors
  691. !insertmacro: ReadLauncherConfig
  692. ReadINIStr $0 [Launch]:RunAsAdmin7 from $LauncherFile
  693. !insertmacro: end of ReadLauncherConfig
  694. !insertmacro: _If
  695. !insertmacro: end of _If
  696. !insertmacro: _Or
  697. !insertmacro: end of _Or
  698. StrCpy $RunAsAdmin "$0" () ()
  699. !insertmacro: _ElseIf
  700. !insertmacro: end of _ElseIf
  701. !insertmacro: InvalidValueError
  702. MessageBox: 16: "Error: invalid value '$0' for [Launch]:RunAsAdmin7. Please refer to the Manual for valid values."
  703. !insertmacro: end of InvalidValueError
  704. !insertmacro: _EndIf
  705. !insertmacro: end of _EndIf
  706. !insertmacro: _EndIf
  707. !insertmacro: end of _EndIf
  708. !insertmacro: end of RunAsAdmin_OSOverride
  709. !insertmacro: RunAsAdmin_OSOverride
  710. !insertmacro: _If
  711. !insertmacro: end of _If
  712. ClearErrors
  713. !insertmacro: ReadLauncherConfig
  714. ReadINIStr $0 [Launch]:RunAsAdmin2008R2 from $LauncherFile
  715. !insertmacro: end of ReadLauncherConfig
  716. !insertmacro: _If
  717. !insertmacro: end of _If
  718. !insertmacro: _Or
  719. !insertmacro: end of _Or
  720. StrCpy $RunAsAdmin "$0" () ()
  721. !insertmacro: _ElseIf
  722. !insertmacro: end of _ElseIf
  723. !insertmacro: InvalidValueError
  724. MessageBox: 16: "Error: invalid value '$0' for [Launch]:RunAsAdmin2008R2. Please refer to the Manual for valid values."
  725. !insertmacro: end of InvalidValueError
  726. !insertmacro: _EndIf
  727. !insertmacro: end of _EndIf
  728. !insertmacro: _EndIf
  729. !insertmacro: end of _EndIf
  730. !insertmacro: end of RunAsAdmin_OSOverride
  731. !insertmacro: _If
  732. !insertmacro: end of _If
  733. !insertmacro: _Or
  734. !insertmacro: end of _Or
  735. !insertmacro: DebugMsg
  736. !insertmacro: !getdebug
  737. !insertmacro: end of !getdebug
  738. !insertmacro: end of DebugMsg
  739. !insertmacro: DebugMsg
  740. !insertmacro: !getdebug
  741. !insertmacro: end of !getdebug
  742. !insertmacro: end of DebugMsg
  743. !insertmacro: UAC_RunElevated
  744. File: "UAC.dll"->"$PLUGINSDIR\UAC.dll" 13312 bytes
  745. Plugin Command: _ 0
  746. !insertmacro: end of UAC_RunElevated
  747. !insertmacro: !getdebug
  748. !insertmacro: end of !getdebug
  749. !insertmacro: _Switch
  750. !insertmacro: end of _Switch
  751. !insertmacro: _Case
  752. !insertmacro: end of _Case
  753. !insertmacro: _IfThen
  754. !insertmacro: end of _IfThen
  755. !insertmacro: _If
  756. !insertmacro: end of _If
  757. !insertmacro: _Goto
  758. !insertmacro: end of _Goto
  759. !insertmacro: _EndIf
  760. !insertmacro: end of _EndIf
  761. !insertmacro: _If
  762. !insertmacro: end of _If
  763. !insertmacro: _If
  764. !insertmacro: end of _If
  765. MessageBox: 327733: "$(LauncherRequiresAdmin)
  766.  
  767.  
  768.  
  769. $(LauncherNotAdminTryAgain)" (on IDRETRY goto Elevate)
  770. Quit
  771. !insertmacro: _ElseIf
  772. !insertmacro: end of _ElseIf
  773. MessageBox: 327730: "$(LauncherNotAdminLimitedFunctionality)
  774.  
  775.  
  776.  
  777. $(LauncherNotAdminLimitedFunctionalityTryAgain)" (on IDRETRY goto Elevate)
  778. Quit
  779. !insertmacro: _EndIf
  780. !insertmacro: end of _EndIf
  781. !insertmacro: _EndIf
  782. !insertmacro: end of _EndIf
  783. !insertmacro: CaseUACCodeAlert
  784. !insertmacro: _Case
  785. !insertmacro: end of _Case
  786. !insertmacro: _If
  787. !insertmacro: end of _If
  788. MessageBox: 327696: "$(LauncherRequiresAdmin)"
  789. Quit
  790. !insertmacro: _ElseIf
  791. !insertmacro: end of _ElseIf
  792. MessageBox: 327744: "$(LauncherNotAdminLimitedFunctionality)"
  793. !insertmacro: _EndIf
  794. !insertmacro: end of _EndIf
  795. !insertmacro: _Goto
  796. !insertmacro: end of _Goto
  797. !insertmacro: end of CaseUACCodeAlert
  798. !insertmacro: CaseUACCodeAlert
  799. !insertmacro: _Case
  800. !insertmacro: end of _Case
  801. !insertmacro: _If
  802. !insertmacro: end of _If
  803. MessageBox: 327696: "$(LauncherAdminLogonServiceNotRunning)"
  804. Quit
  805. !insertmacro: _ElseIf
  806. !insertmacro: end of _ElseIf
  807. MessageBox: 327744: "$(LauncherNotAdminLimitedFunctionality)"
  808. !insertmacro: _EndIf
  809. !insertmacro: end of _EndIf
  810. !insertmacro: _Goto
  811. !insertmacro: end of _Goto
  812. !insertmacro: end of CaseUACCodeAlert
  813. !insertmacro: CaseUACCodeAlert
  814. !insertmacro: _CaseElse
  815. !insertmacro: end of _CaseElse
  816. !insertmacro: _If
  817. !insertmacro: end of _If
  818. MessageBox: 327696: "$(LauncherAdminError)
  819.  
  820. $(LauncherRequiresAdmin)"
  821. Quit
  822. !insertmacro: _ElseIf
  823. !insertmacro: end of _ElseIf
  824. MessageBox: 327744: "$(LauncherAdminError)
  825.  
  826. $(LauncherNotAdminLimitedFunctionality)"
  827. !insertmacro: _EndIf
  828. !insertmacro: end of _EndIf
  829. !insertmacro: _Goto
  830. !insertmacro: end of _Goto
  831. !insertmacro: end of CaseUACCodeAlert
  832. !insertmacro: _EndSwitch
  833. !insertmacro: end of _EndSwitch
  834. !insertmacro: _EndIf
  835. !insertmacro: end of _EndIf
  836. !insertmacro: end of RunAsAdmin.nsh_.onInit
  837. !insertmacro: end of RunSegment
  838. FunctionEnd
  839. Function: "Init"
  840. !insertmacro: RunSegment
  841. !insertmacro: end of RunSegment
  842. !insertmacro: RunSegment
  843. !insertmacro: !getdebug
  844. !insertmacro: end of !getdebug
  845. !insertmacro: Core.nsh_Init
  846. StrCpy $LauncherFile "$EXEDIR\App\AppInfo\Launcher\$BaseName.ini" () ()
  847. !insertmacro: _If
  848. !insertmacro: end of _If
  849. InitPluginsDir
  850. CopyFiles: (silent) "$LauncherFile" -> "$PLUGINSDIR\launcher.ini", size=0KB
  851. StrCpy $LauncherFile "$PLUGINSDIR\launcher.ini" () ()
  852. !insertmacro: _Else
  853. !insertmacro: end of _Else
  854. StrCpy $MissingFileOrPath "$LauncherFile" () ()
  855. MessageBox: 16: "$(LauncherFileNotFound)"
  856. Quit
  857. !insertmacro: _EndIf
  858. !insertmacro: end of _EndIf
  859. !insertmacro: GetParametersCall
  860. !insertmacro: end of GetParametersCall
  861. StrCpy $ProgramExecutable "" () ()
  862. !insertmacro: _If
  863. !insertmacro: end of _If
  864. !insertmacro: _If
  865. !insertmacro: end of _If
  866. !insertmacro: ReadLauncherConfig
  867. ReadINIStr $ProgramExecutable [Launch]:ProgramExecutableWhenParameters64 from $LauncherFile
  868. !insertmacro: end of ReadLauncherConfig
  869. !insertmacro: _EndIf
  870. !insertmacro: end of _EndIf
  871. !insertmacro: _If
  872. !insertmacro: end of _If
  873. !insertmacro: ReadLauncherConfig
  874. ReadINIStr $ProgramExecutable [Launch]:ProgramExecutable64 from $LauncherFile
  875. !insertmacro: end of ReadLauncherConfig
  876. !insertmacro: _EndIf
  877. !insertmacro: end of _EndIf
  878. !insertmacro: _EndIf
  879. !insertmacro: end of _EndIf
  880. !insertmacro: _If
  881. !insertmacro: end of _If
  882. !insertmacro: _And
  883. !insertmacro: end of _And
  884. !insertmacro: ReadLauncherConfig
  885. ReadINIStr $ProgramExecutable [Launch]:ProgramExecutableWhenParameters from $LauncherFile
  886. !insertmacro: end of ReadLauncherConfig
  887. !insertmacro: _EndIf
  888. !insertmacro: end of _EndIf
  889. !insertmacro: _If
  890. !insertmacro: end of _If
  891. !insertmacro: ReadLauncherConfig
  892. ReadINIStr $ProgramExecutable [Launch]:ProgramExecutable from $LauncherFile
  893. !insertmacro: end of ReadLauncherConfig
  894. !insertmacro: _EndIf
  895. !insertmacro: end of _EndIf
  896. !insertmacro: _If
  897. !insertmacro: end of _If
  898. MessageBox: 16: "$EXEDIR\App\AppInfo\Launcher\$BaseName.ini is missing [Launch]:ProgramExecutable - what am I to launch?"
  899. Quit
  900. !insertmacro: _EndIf
  901. !insertmacro: end of _EndIf
  902. !insertmacro: end of Core.nsh_Init
  903. !insertmacro: end of RunSegment
  904. !insertmacro: RunSegment
  905. !insertmacro: !getdebug
  906. !insertmacro: end of !getdebug
  907. !insertmacro: PathChecks.nsh_Init
  908. !insertmacro: _If
  909. !insertmacro: end of _If
  910. StrCpy $0 "$PROGRAMFILES32" () ()
  911. !insertmacro: _ElseIf
  912. !insertmacro: end of _ElseIf
  913. StrCpy $0 "$PROGRAMFILES64" () ()
  914. !insertmacro: _Else
  915. !insertmacro: end of _Else
  916. StrCpy $0 "" () ()
  917. !insertmacro: _EndIf
  918. !insertmacro: end of _EndIf
  919. !insertmacro: _If
  920. !insertmacro: end of _If
  921. ReadEnvStr: IPromiseNotToComplainWhenPortableAppsDontWorkRightInProgramFiles->$1
  922. !insertmacro: _If
  923. !insertmacro: end of _If
  924. !insertmacro: DebugMsg
  925. !insertmacro: !getdebug
  926. !insertmacro: end of !getdebug
  927. !insertmacro: end of DebugMsg
  928. !insertmacro: _Else
  929. !insertmacro: end of _Else
  930. MessageBox: 16: "$(LauncherProgramFiles)"
  931. Quit
  932. !insertmacro: _EndIf
  933. !insertmacro: end of _EndIf
  934. !insertmacro: _EndIf
  935. !insertmacro: end of _EndIf
  936. StrCpy $1 "nounc" () ()
  937. !insertmacro: _IfThen
  938. !insertmacro: end of _IfThen
  939. ClearErrors
  940. !insertmacro: ReadLauncherConfig
  941. ReadINIStr $0 [Launch]:SupportsUNC from $LauncherFile
  942. !insertmacro: end of ReadLauncherConfig
  943. !insertmacro: _If
  944. !insertmacro: end of _If
  945. !insertmacro: _If
  946. !insertmacro: end of _If
  947. MessageBox: 16: "$(LauncherNoUNCSupport)"
  948. Quit
  949. !insertmacro: _EndIf
  950. !insertmacro: end of _EndIf
  951. !insertmacro: _ElseIf
  952. !insertmacro: end of _ElseIf
  953. !insertmacro: _Or
  954. !insertmacro: end of _Or
  955. !insertmacro: _If
  956. !insertmacro: end of _If
  957. !insertmacro: _And
  958. !insertmacro: end of _And
  959. Quit
  960. !insertmacro: _EndIf
  961. !insertmacro: end of _EndIf
  962. !insertmacro: _ElseIf
  963. !insertmacro: end of _ElseIf
  964. Nop
  965. !insertmacro: _Else
  966. !insertmacro: end of _Else
  967. !insertmacro: InvalidValueError
  968. MessageBox: 16: "Error: invalid value '$0' for [Launch]:SupportsUNC. Please refer to the Manual for valid values."
  969. !insertmacro: end of InvalidValueError
  970. !insertmacro: _EndIf
  971. !insertmacro: end of _EndIf
  972. ClearErrors
  973. !insertmacro: ReadLauncherConfig
  974. ReadINIStr $0 [Launch]:NoSpacesInPath from $LauncherFile
  975. !insertmacro: end of ReadLauncherConfig
  976. !insertmacro: _If
  977. !insertmacro: end of _If
  978. !insertmacro: WordFindCall
  979. !insertmacro: end of WordFindCall
  980. !insertmacro: _If
  981. !insertmacro: end of _If
  982. MessageBox: 16: "$(LauncherNoSpaces)"
  983. Quit
  984. !insertmacro: _EndIf
  985. !insertmacro: end of _EndIf
  986. !insertmacro: _ElseIf
  987. !insertmacro: end of _ElseIf
  988. !insertmacro: _And
  989. !insertmacro: end of _And
  990. !insertmacro: InvalidValueError
  991. MessageBox: 16: "Error: invalid value '$0' for [Launch]:NoSpacesInPath. Please refer to the Manual for valid values."
  992. !insertmacro: end of InvalidValueError
  993. !insertmacro: _EndIf
  994. !insertmacro: end of _EndIf
  995. !insertmacro: end of PathChecks.nsh_Init
  996. !insertmacro: end of RunSegment
  997. !insertmacro: RunSegment
  998. !insertmacro: !getdebug
  999. !insertmacro: end of !getdebug
  1000. !insertmacro: Settings.nsh_Init
  1001. !insertmacro: _If
  1002. !insertmacro: end of _If
  1003. !insertmacro: DebugMsg
  1004. !insertmacro: !getdebug
  1005. !insertmacro: end of !getdebug
  1006. !insertmacro: end of DebugMsg
  1007. CreateDirectory: "$EXEDIR\Data\settings"
  1008. !insertmacro: _If
  1009. !insertmacro: end of _If
  1010. !insertmacro: DebugMsg
  1011. !insertmacro: !getdebug
  1012. !insertmacro: end of !getdebug
  1013. !insertmacro: end of DebugMsg
  1014. CopyFiles: (silent) "$EXEDIR\App\DefaultData\*.*" -> "$EXEDIR\Data", size=0KB
  1015. !insertmacro: _EndIf
  1016. !insertmacro: end of _EndIf
  1017. !insertmacro: _EndIf
  1018. !insertmacro: end of _EndIf
  1019. !insertmacro: end of Settings.nsh_Init
  1020. !insertmacro: end of RunSegment
  1021. !insertmacro: RunSegment
  1022. !insertmacro: !getdebug
  1023. !insertmacro: end of !getdebug
  1024. !insertmacro: DriveLetter.nsh_Init
  1025. ReadINIStr $LastDrive [$AppIDSettings]:LastDrive from $EXEDIR\Data\settings\$AppIDSettings.ini
  1026. !insertmacro: GetRootCall
  1027. !insertmacro: end of GetRootCall
  1028. !insertmacro: _IfThen
  1029. !insertmacro: end of _IfThen
  1030. !insertmacro: DebugMsg
  1031. !insertmacro: !getdebug
  1032. !insertmacro: end of !getdebug
  1033. !insertmacro: end of DebugMsg
  1034. StrCpy $0 "$CurrentDrive" (1) ()
  1035. StrCpy $1 "$LastDrive" (1) ()
  1036. !insertmacro: SetEnvironmentVariable
  1037. !insertmacro: DebugMsg
  1038. !insertmacro: !getdebug
  1039. !insertmacro: end of !getdebug
  1040. !insertmacro: end of DebugMsg
  1041. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,ts)
  1042. !insertmacro: end of SetEnvironmentVariable
  1043. !insertmacro: SetEnvironmentVariable
  1044. !insertmacro: DebugMsg
  1045. !insertmacro: !getdebug
  1046. !insertmacro: end of !getdebug
  1047. !insertmacro: end of DebugMsg
  1048. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,ts)
  1049. !insertmacro: end of SetEnvironmentVariable
  1050. !insertmacro: SetEnvironmentVariable
  1051. !insertmacro: DebugMsg
  1052. !insertmacro: !getdebug
  1053. !insertmacro: end of !getdebug
  1054. !insertmacro: end of DebugMsg
  1055. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,tr0)
  1056. !insertmacro: end of SetEnvironmentVariable
  1057. !insertmacro: SetEnvironmentVariable
  1058. !insertmacro: DebugMsg
  1059. !insertmacro: !getdebug
  1060. !insertmacro: end of !getdebug
  1061. !insertmacro: end of DebugMsg
  1062. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,tr1)
  1063. !insertmacro: end of SetEnvironmentVariable
  1064. !insertmacro: end of DriveLetter.nsh_Init
  1065. !insertmacro: end of RunSegment
  1066. !insertmacro: RunSegment
  1067. !insertmacro: !getdebug
  1068. !insertmacro: end of !getdebug
  1069. !insertmacro: DirectoryMoving.nsh_Init
  1070. !insertmacro: GetRootCall
  1071. !insertmacro: end of GetRootCall
  1072. StrLen $0 "$0"
  1073. StrCpy $CurrentDirectory "$EXEDIR" () ($0)
  1074. !insertmacro: _If
  1075. !insertmacro: end of _If
  1076. StrCpy $CurrentDirectory "\" () ()
  1077. !insertmacro: _EndIf
  1078. !insertmacro: end of _EndIf
  1079. ReadINIStr $LastDirectory [$AppIDSettings]:LastDirectory from $EXEDIR\Data\settings\$AppIDSettings.ini
  1080. !insertmacro: _IfThen
  1081. !insertmacro: end of _IfThen
  1082. !insertmacro: _If
  1083. !insertmacro: end of _If
  1084. !insertmacro: DebugMsg
  1085. !insertmacro: !getdebug
  1086. !insertmacro: end of !getdebug
  1087. !insertmacro: end of DebugMsg
  1088. ClearErrors
  1089. !insertmacro: ReadLauncherConfig
  1090. ReadINIStr $0 [Launch]:DirectoryMoveOK from $LauncherFile
  1091. !insertmacro: end of ReadLauncherConfig
  1092. !insertmacro: _If
  1093. !insertmacro: end of _If
  1094. MessageBox: 16: "$(LauncherDirectoryMoveNotAllowed)"
  1095. Quit
  1096. !insertmacro: _ElseIf
  1097. !insertmacro: end of _ElseIf
  1098. !insertmacro: _Or
  1099. !insertmacro: end of _Or
  1100. !insertmacro: _If
  1101. !insertmacro: end of _If
  1102. Quit
  1103. !insertmacro: _EndIf
  1104. !insertmacro: end of _EndIf
  1105. !insertmacro: _ElseIf
  1106. !insertmacro: end of _ElseIf
  1107. Nop
  1108. !insertmacro: _Else
  1109. !insertmacro: end of _Else
  1110. !insertmacro: InvalidValueError
  1111. MessageBox: 16: "Error: invalid value '$0' for [Launch]:DirectoryMoveOK. Please refer to the Manual for valid values."
  1112. !insertmacro: end of InvalidValueError
  1113. !insertmacro: _EndIf
  1114. !insertmacro: end of _EndIf
  1115. !insertmacro: _EndIf
  1116. !insertmacro: end of _EndIf
  1117. !insertmacro: SetEnvironmentVariablesPathCall
  1118. Push: PAL:PackagePartialDir
  1119. Push: $CurrentDirectory
  1120. !insertmacro: CallArtificialFunction2
  1121. !define: "CallArtificialFunction2_TYPE"="inst"
  1122. Call ":.SetEnvironmentVariablesPath_inst"
  1123. Goto: SetEnvironmentVariablesPath_inst_DONE
  1124. !define: "SetEnvironmentVariablesPath_inst_DEFINED"=""
  1125. !insertmacro: SetEnvironmentVariablesPath_
  1126. Exch($R0,0)
  1127. Exch(st(1),0)
  1128. Exch($R1,0)
  1129. Push: $R2
  1130. Push: $R3
  1131. Push: $R7
  1132. Push: $R8
  1133. Push: $R9
  1134. !insertmacro: SetEnvironmentVariable
  1135. !insertmacro: DebugMsg
  1136. !insertmacro: !getdebug
  1137. !insertmacro: end of !getdebug
  1138. !insertmacro: end of DebugMsg
  1139. Plugin Command: Call Kernel32::SetEnvironmentVariable(tR1,tR0)
  1140. !insertmacro: end of SetEnvironmentVariable
  1141. !insertmacro: WordReplaceCall
  1142. !insertmacro: end of WordReplaceCall
  1143. !insertmacro: SetEnvironmentVariable
  1144. !insertmacro: DebugMsg
  1145. !insertmacro: !getdebug
  1146. !insertmacro: end of !getdebug
  1147. !insertmacro: end of DebugMsg
  1148. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,tR2)
  1149. !insertmacro: end of SetEnvironmentVariable
  1150. !insertmacro: WordReplaceCall
  1151. !insertmacro: end of WordReplaceCall
  1152. !insertmacro: SetEnvironmentVariable
  1153. !insertmacro: DebugMsg
  1154. !insertmacro: !getdebug
  1155. !insertmacro: end of !getdebug
  1156. !insertmacro: end of DebugMsg
  1157. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,tR3)
  1158. !insertmacro: end of SetEnvironmentVariable
  1159. StrCpy $R3 "" () ()
  1160. StrLen $R7 "$R2"
  1161. IntOp: $R7=$R7-1
  1162. !insertmacro: _For
  1163. !insertmacro: end of _For
  1164. StrCpy $R9 "$R2" (1) ($R8)
  1165. !insertmacro: _If
  1166. !insertmacro: end of _If
  1167. !insertmacro: _Or
  1168. !insertmacro: end of _Or
  1169. !insertmacro: _Or
  1170. !insertmacro: end of _Or
  1171. !insertmacro: _Or
  1172. !insertmacro: end of _Or
  1173. !insertmacro: _Or
  1174. !insertmacro: end of _Or
  1175. !insertmacro: _Or
  1176. !insertmacro: end of _Or
  1177. !insertmacro: _Or
  1178. !insertmacro: end of _Or
  1179. !insertmacro: _Or
  1180. !insertmacro: end of _Or
  1181. !insertmacro: _Or
  1182. !insertmacro: end of _Or
  1183. !insertmacro: _Or
  1184. !insertmacro: end of _Or
  1185. !insertmacro: _Or
  1186. !insertmacro: end of _Or
  1187. !insertmacro: _Or
  1188. !insertmacro: end of _Or
  1189. !insertmacro: _Or
  1190. !insertmacro: end of _Or
  1191. !insertmacro: _Or
  1192. !insertmacro: end of _Or
  1193. !insertmacro: _Or
  1194. !insertmacro: end of _Or
  1195. !insertmacro: _Or
  1196. !insertmacro: end of _Or
  1197. !insertmacro: _Or
  1198. !insertmacro: end of _Or
  1199. !insertmacro: _Or
  1200. !insertmacro: end of _Or
  1201. !insertmacro: _Or
  1202. !insertmacro: end of _Or
  1203. !insertmacro: _Or
  1204. !insertmacro: end of _Or
  1205. !insertmacro: _Or
  1206. !insertmacro: end of _Or
  1207. !insertmacro: _Or
  1208. !insertmacro: end of _Or
  1209. !insertmacro: _Or
  1210. !insertmacro: end of _Or
  1211. !insertmacro: _Or
  1212. !insertmacro: end of _Or
  1213. !insertmacro: _Or
  1214. !insertmacro: end of _Or
  1215. !insertmacro: _Or
  1216. !insertmacro: end of _Or
  1217. !insertmacro: _Or
  1218. !insertmacro: end of _Or
  1219. StrCpy $R3 "$R3$R9" () ()
  1220. !insertmacro: _Else
  1221. !insertmacro: end of _Else
  1222. StrCpy $R3 "$R3/$R9" () ()
  1223. !insertmacro: _EndIf
  1224. !insertmacro: end of _EndIf
  1225. !insertmacro: _Loop
  1226. !insertmacro: end of _Loop
  1227. !insertmacro: SetEnvironmentVariable
  1228. !insertmacro: DebugMsg
  1229. !insertmacro: !getdebug
  1230. !insertmacro: end of !getdebug
  1231. !insertmacro: end of DebugMsg
  1232. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,tR3)
  1233. !insertmacro: end of SetEnvironmentVariable
  1234. Pop: $R9
  1235. Pop: $R8
  1236. Pop: $R7
  1237. Pop: $R3
  1238. Pop: $R2
  1239. Pop: $R1
  1240. Pop: $R0
  1241. !insertmacro: end of SetEnvironmentVariablesPath_
  1242. Return
  1243. !undef: "CallArtificialFunction2_TYPE"
  1244. !insertmacro: end of CallArtificialFunction2
  1245. !insertmacro: end of SetEnvironmentVariablesPathCall
  1246. !insertmacro: SetEnvironmentVariablesPathCall
  1247. Push: PAL:LastPackagePartialDir
  1248. Push: $LastDirectory
  1249. !insertmacro: CallArtificialFunction2
  1250. !define: "CallArtificialFunction2_TYPE"="inst"
  1251. Call ":.SetEnvironmentVariablesPath_inst"
  1252. !undef: "CallArtificialFunction2_TYPE"
  1253. !insertmacro: end of CallArtificialFunction2
  1254. !insertmacro: end of SetEnvironmentVariablesPathCall
  1255. !insertmacro: end of DirectoryMoving.nsh_Init
  1256. !insertmacro: end of RunSegment
  1257. !insertmacro: RunSegment
  1258. !insertmacro: !getdebug
  1259. !insertmacro: end of !getdebug
  1260. !insertmacro: Variables.nsh_Init
  1261. StrCpy $AppDirectory "$EXEDIR\App" () ()
  1262. StrCpy $DataDirectory "$EXEDIR\Data" () ()
  1263. !insertmacro: SetEnvironmentVariablesPathCall
  1264. Push: PAL:AppDir
  1265. Push: $AppDirectory
  1266. !insertmacro: CallArtificialFunction2
  1267. !define: "CallArtificialFunction2_TYPE"="inst"
  1268. Call ":.SetEnvironmentVariablesPath_inst"
  1269. !undef: "CallArtificialFunction2_TYPE"
  1270. !insertmacro: end of CallArtificialFunction2
  1271. !insertmacro: end of SetEnvironmentVariablesPathCall
  1272. !insertmacro: SetEnvironmentVariablesPathCall
  1273. Push: PAL:DataDir
  1274. Push: $DataDirectory
  1275. !insertmacro: CallArtificialFunction2
  1276. !define: "CallArtificialFunction2_TYPE"="inst"
  1277. Call ":.SetEnvironmentVariablesPath_inst"
  1278. !undef: "CallArtificialFunction2_TYPE"
  1279. !insertmacro: end of CallArtificialFunction2
  1280. !insertmacro: end of SetEnvironmentVariablesPathCall
  1281. !insertmacro: GetParentUNC
  1282. !insertmacro: GetRootCall
  1283. !insertmacro: end of GetRootCall
  1284. !insertmacro: _If
  1285. !insertmacro: end of _If
  1286. !insertmacro: GetParentCall
  1287. !insertmacro: end of GetParentCall
  1288. !insertmacro: _EndIf
  1289. !insertmacro: end of _EndIf
  1290. !insertmacro: end of GetParentUNC
  1291. !insertmacro: SetEnvironmentVariablesPathCall
  1292. Push: PAL:PortableAppsDir
  1293. Push: $PortableAppsDirectory
  1294. !insertmacro: CallArtificialFunction2
  1295. !define: "CallArtificialFunction2_TYPE"="inst"
  1296. Call ":.SetEnvironmentVariablesPath_inst"
  1297. !undef: "CallArtificialFunction2_TYPE"
  1298. !insertmacro: end of CallArtificialFunction2
  1299. !insertmacro: end of SetEnvironmentVariablesPathCall
  1300. !insertmacro: GetParentUNC
  1301. !insertmacro: GetRootCall
  1302. !insertmacro: end of GetRootCall
  1303. !insertmacro: _If
  1304. !insertmacro: end of _If
  1305. !insertmacro: GetParentCall
  1306. !insertmacro: end of GetParentCall
  1307. !insertmacro: _EndIf
  1308. !insertmacro: end of _EndIf
  1309. !insertmacro: end of GetParentUNC
  1310. !insertmacro: SetEnvironmentVariablesPathCall
  1311. Push: PAL:PortableAppsBaseDir
  1312. Push: $PortableAppsBaseDirectory
  1313. !insertmacro: CallArtificialFunction2
  1314. !define: "CallArtificialFunction2_TYPE"="inst"
  1315. Call ":.SetEnvironmentVariablesPath_inst"
  1316. !undef: "CallArtificialFunction2_TYPE"
  1317. !insertmacro: end of CallArtificialFunction2
  1318. !insertmacro: end of SetEnvironmentVariablesPathCall
  1319. ClearErrors
  1320. ReadINIStr $LastPortableAppsBaseDirectory [PortableApps.comLauncherLastRunEnvironment]:PAL:LastPortableAppsBaseDir from $DataDirectory\settings\$AppIDSettings.ini
  1321. !insertmacro: _If
  1322. !insertmacro: end of _If
  1323. !insertmacro: SetEnvironmentVariablesPathCall
  1324. Push: PAL:LastPortableAppsBaseDir
  1325. Push: $LastPortableAppsBaseDirectory
  1326. !insertmacro: CallArtificialFunction2
  1327. !define: "CallArtificialFunction2_TYPE"="inst"
  1328. Call ":.SetEnvironmentVariablesPath_inst"
  1329. !undef: "CallArtificialFunction2_TYPE"
  1330. !insertmacro: end of CallArtificialFunction2
  1331. !insertmacro: end of SetEnvironmentVariablesPathCall
  1332. !insertmacro: _EndIf
  1333. !insertmacro: end of _EndIf
  1334. ReadEnvStr: PortableApps.comDocuments->$0
  1335. !insertmacro: _If
  1336. !insertmacro: end of _If
  1337. !insertmacro: _Or
  1338. !insertmacro: end of _Or
  1339. StrCpy $0 "$CurrentDrive\Documents" () ()
  1340. !insertmacro: _EndIf
  1341. !insertmacro: end of _EndIf
  1342. !insertmacro: SetEnvironmentVariablesPathCall
  1343. Push: PortableApps.comDocuments
  1344. Push: $0
  1345. !insertmacro: CallArtificialFunction2
  1346. !define: "CallArtificialFunction2_TYPE"="inst"
  1347. Call ":.SetEnvironmentVariablesPath_inst"
  1348. !undef: "CallArtificialFunction2_TYPE"
  1349. !insertmacro: end of CallArtificialFunction2
  1350. !insertmacro: end of SetEnvironmentVariablesPathCall
  1351. ReadEnvStr: PortableApps.comPictures->$1
  1352. !insertmacro: _If
  1353. !insertmacro: end of _If
  1354. !insertmacro: _Or
  1355. !insertmacro: end of _Or
  1356. StrCpy $1 "$0\Pictures" () ()
  1357. !insertmacro: _EndIf
  1358. !insertmacro: end of _EndIf
  1359. !insertmacro: SetEnvironmentVariablesPathCall
  1360. Push: PortableApps.comPictures
  1361. Push: $1
  1362. !insertmacro: CallArtificialFunction2
  1363. !define: "CallArtificialFunction2_TYPE"="inst"
  1364. Call ":.SetEnvironmentVariablesPath_inst"
  1365. !undef: "CallArtificialFunction2_TYPE"
  1366. !insertmacro: end of CallArtificialFunction2
  1367. !insertmacro: end of SetEnvironmentVariablesPathCall
  1368. ReadEnvStr: PortableApps.comMusic->$1
  1369. !insertmacro: _If
  1370. !insertmacro: end of _If
  1371. !insertmacro: _Or
  1372. !insertmacro: end of _Or
  1373. StrCpy $1 "$0\Music" () ()
  1374. !insertmacro: _EndIf
  1375. !insertmacro: end of _EndIf
  1376. !insertmacro: SetEnvironmentVariablesPathCall
  1377. Push: PortableApps.comMusic
  1378. Push: $1
  1379. !insertmacro: CallArtificialFunction2
  1380. !define: "CallArtificialFunction2_TYPE"="inst"
  1381. Call ":.SetEnvironmentVariablesPath_inst"
  1382. !undef: "CallArtificialFunction2_TYPE"
  1383. !insertmacro: end of CallArtificialFunction2
  1384. !insertmacro: end of SetEnvironmentVariablesPathCall
  1385. ReadEnvStr: PortableApps.comVideos->$1
  1386. !insertmacro: _If
  1387. !insertmacro: end of _If
  1388. !insertmacro: _Or
  1389. !insertmacro: end of _Or
  1390. StrCpy $1 "$0\Videos" () ()
  1391. !insertmacro: _EndIf
  1392. !insertmacro: end of _EndIf
  1393. !insertmacro: SetEnvironmentVariablesPathCall
  1394. Push: PortableApps.comVideos
  1395. Push: $1
  1396. !insertmacro: CallArtificialFunction2
  1397. !define: "CallArtificialFunction2_TYPE"="inst"
  1398. Call ":.SetEnvironmentVariablesPath_inst"
  1399. !undef: "CallArtificialFunction2_TYPE"
  1400. !insertmacro: end of CallArtificialFunction2
  1401. !insertmacro: end of SetEnvironmentVariablesPathCall
  1402. SetShellVarContext: all
  1403. !insertmacro: SetEnvironmentVariablesPathCall
  1404. Push: ALLUSERSAPPDATA
  1405. Push: $APPDATA
  1406. !insertmacro: CallArtificialFunction2
  1407. !define: "CallArtificialFunction2_TYPE"="inst"
  1408. Call ":.SetEnvironmentVariablesPath_inst"
  1409. !undef: "CallArtificialFunction2_TYPE"
  1410. !insertmacro: end of CallArtificialFunction2
  1411. !insertmacro: end of SetEnvironmentVariablesPathCall
  1412. SetShellVarContext: current
  1413. !insertmacro: SetEnvironmentVariablesPathFromEnvironmentVariable
  1414. Push: $R0
  1415. ReadEnvStr: ALLUSERSPROFILE->$R0
  1416. !insertmacro: SetEnvironmentVariablesPathCall
  1417. Push: ALLUSERSPROFILE
  1418. Push: $R0
  1419. !insertmacro: CallArtificialFunction2
  1420. !define: "CallArtificialFunction2_TYPE"="inst"
  1421. Call ":.SetEnvironmentVariablesPath_inst"
  1422. !undef: "CallArtificialFunction2_TYPE"
  1423. !insertmacro: end of CallArtificialFunction2
  1424. !insertmacro: end of SetEnvironmentVariablesPathCall
  1425. Pop: $R0
  1426. !insertmacro: end of SetEnvironmentVariablesPathFromEnvironmentVariable
  1427. !insertmacro: SetEnvironmentVariablesPathFromEnvironmentVariable
  1428. Push: $R0
  1429. ReadEnvStr: USERPROFILE->$R0
  1430. !insertmacro: SetEnvironmentVariablesPathCall
  1431. Push: USERPROFILE
  1432. Push: $R0
  1433. !insertmacro: CallArtificialFunction2
  1434. !define: "CallArtificialFunction2_TYPE"="inst"
  1435. Call ":.SetEnvironmentVariablesPath_inst"
  1436. !undef: "CallArtificialFunction2_TYPE"
  1437. !insertmacro: end of CallArtificialFunction2
  1438. !insertmacro: end of SetEnvironmentVariablesPathCall
  1439. Pop: $R0
  1440. !insertmacro: end of SetEnvironmentVariablesPathFromEnvironmentVariable
  1441. !insertmacro: SetEnvironmentVariablesPathCall
  1442. Push: LOCALAPPDATA
  1443. Push: $LOCALAPPDATA
  1444. !insertmacro: CallArtificialFunction2
  1445. !define: "CallArtificialFunction2_TYPE"="inst"
  1446. Call ":.SetEnvironmentVariablesPath_inst"
  1447. !undef: "CallArtificialFunction2_TYPE"
  1448. !insertmacro: end of CallArtificialFunction2
  1449. !insertmacro: end of SetEnvironmentVariablesPathCall
  1450. !insertmacro: SetEnvironmentVariablesPathCall
  1451. Push: APPDATA
  1452. Push: $APPDATA
  1453. !insertmacro: CallArtificialFunction2
  1454. !define: "CallArtificialFunction2_TYPE"="inst"
  1455. Call ":.SetEnvironmentVariablesPath_inst"
  1456. !undef: "CallArtificialFunction2_TYPE"
  1457. !insertmacro: end of CallArtificialFunction2
  1458. !insertmacro: end of SetEnvironmentVariablesPathCall
  1459. !insertmacro: SetEnvironmentVariablesPathCall
  1460. Push: DOCUMENTS
  1461. Push: $DOCUMENTS
  1462. !insertmacro: CallArtificialFunction2
  1463. !define: "CallArtificialFunction2_TYPE"="inst"
  1464. Call ":.SetEnvironmentVariablesPath_inst"
  1465. !undef: "CallArtificialFunction2_TYPE"
  1466. !insertmacro: end of CallArtificialFunction2
  1467. !insertmacro: end of SetEnvironmentVariablesPathCall
  1468. !insertmacro: end of Variables.nsh_Init
  1469. !insertmacro: end of RunSegment
  1470. !insertmacro: RunSegment
  1471. !insertmacro: !getdebug
  1472. !insertmacro: end of !getdebug
  1473. !insertmacro: Language.nsh_Init
  1474. ReadEnvStr: PortableApps.comLanguageCode->$0
  1475. ReadEnvStr: PAL:_IgnoreLanguage->$1
  1476. !insertmacro: _If
  1477. !insertmacro: end of _If
  1478. !insertmacro: _Or
  1479. !insertmacro: end of _Or
  1480. !insertmacro: DebugMsg
  1481. !insertmacro: !getdebug
  1482. !insertmacro: end of !getdebug
  1483. !insertmacro: end of DebugMsg
  1484. StrCpy $9 "pap-missing" () ()
  1485. !insertmacro: SetEnvironmentVariable
  1486. !insertmacro: DebugMsg
  1487. !insertmacro: !getdebug
  1488. !insertmacro: end of !getdebug
  1489. !insertmacro: end of DebugMsg
  1490. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,ts)
  1491. !insertmacro: end of SetEnvironmentVariable
  1492. !insertmacro: _EndIf
  1493. !insertmacro: end of _EndIf
  1494. !insertmacro: SetEnvironmentVariableDefault
  1495. Push: $R9
  1496. ReadEnvStr: PortableApps.comLanguageCode->$R9
  1497. !insertmacro: _If
  1498. !insertmacro: end of _If
  1499. Pop: $R9
  1500. !insertmacro: SetEnvironmentVariable
  1501. !insertmacro: DebugMsg
  1502. !insertmacro: !getdebug
  1503. !insertmacro: end of !getdebug
  1504. !insertmacro: end of DebugMsg
  1505. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,ts)
  1506. !insertmacro: end of SetEnvironmentVariable
  1507. !insertmacro: _Else
  1508. !insertmacro: end of _Else
  1509. Pop: $R9
  1510. !insertmacro: _EndIf
  1511. !insertmacro: end of _EndIf
  1512. !insertmacro: end of SetEnvironmentVariableDefault
  1513. !insertmacro: SetEnvironmentVariableDefault
  1514. Push: $R9
  1515. ReadEnvStr: PortableApps.comLocaleCode2->$R9
  1516. !insertmacro: _If
  1517. !insertmacro: end of _If
  1518. Pop: $R9
  1519. !insertmacro: SetEnvironmentVariable
  1520. !insertmacro: DebugMsg
  1521. !insertmacro: !getdebug
  1522. !insertmacro: end of !getdebug
  1523. !insertmacro: end of DebugMsg
  1524. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,ts)
  1525. !insertmacro: end of SetEnvironmentVariable
  1526. !insertmacro: _Else
  1527. !insertmacro: end of _Else
  1528. Pop: $R9
  1529. !insertmacro: _EndIf
  1530. !insertmacro: end of _EndIf
  1531. !insertmacro: end of SetEnvironmentVariableDefault
  1532. !insertmacro: SetEnvironmentVariableDefault
  1533. Push: $R9
  1534. ReadEnvStr: PortableApps.comLocaleCode3->$R9
  1535. !insertmacro: _If
  1536. !insertmacro: end of _If
  1537. Pop: $R9
  1538. !insertmacro: SetEnvironmentVariable
  1539. !insertmacro: DebugMsg
  1540. !insertmacro: !getdebug
  1541. !insertmacro: end of !getdebug
  1542. !insertmacro: end of DebugMsg
  1543. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,ts)
  1544. !insertmacro: end of SetEnvironmentVariable
  1545. !insertmacro: _Else
  1546. !insertmacro: end of _Else
  1547. Pop: $R9
  1548. !insertmacro: _EndIf
  1549. !insertmacro: end of _EndIf
  1550. !insertmacro: end of SetEnvironmentVariableDefault
  1551. !insertmacro: SetEnvironmentVariableDefault
  1552. Push: $R9
  1553. ReadEnvStr: PortableApps.comLocaleglibc->$R9
  1554. !insertmacro: _If
  1555. !insertmacro: end of _If
  1556. Pop: $R9
  1557. !insertmacro: SetEnvironmentVariable
  1558. !insertmacro: DebugMsg
  1559. !insertmacro: !getdebug
  1560. !insertmacro: end of !getdebug
  1561. !insertmacro: end of DebugMsg
  1562. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,ts)
  1563. !insertmacro: end of SetEnvironmentVariable
  1564. !insertmacro: _Else
  1565. !insertmacro: end of _Else
  1566. Pop: $R9
  1567. !insertmacro: _EndIf
  1568. !insertmacro: end of _EndIf
  1569. !insertmacro: end of SetEnvironmentVariableDefault
  1570. !insertmacro: SetEnvironmentVariableDefault
  1571. Push: $R9
  1572. ReadEnvStr: PortableApps.comLocaleID->$R9
  1573. !insertmacro: _If
  1574. !insertmacro: end of _If
  1575. Pop: $R9
  1576. !insertmacro: SetEnvironmentVariable
  1577. !insertmacro: DebugMsg
  1578. !insertmacro: !getdebug
  1579. !insertmacro: end of !getdebug
  1580. !insertmacro: end of DebugMsg
  1581. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,ts)
  1582. !insertmacro: end of SetEnvironmentVariable
  1583. !insertmacro: _Else
  1584. !insertmacro: end of _Else
  1585. Pop: $R9
  1586. !insertmacro: _EndIf
  1587. !insertmacro: end of _EndIf
  1588. !insertmacro: end of SetEnvironmentVariableDefault
  1589. !insertmacro: SetEnvironmentVariableDefault
  1590. Push: $R9
  1591. ReadEnvStr: PortableApps.comLocaleWinName->$R9
  1592. !insertmacro: _If
  1593. !insertmacro: end of _If
  1594. Pop: $R9
  1595. !insertmacro: SetEnvironmentVariable
  1596. !insertmacro: DebugMsg
  1597. !insertmacro: !getdebug
  1598. !insertmacro: end of !getdebug
  1599. !insertmacro: end of DebugMsg
  1600. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,ts)
  1601. !insertmacro: end of SetEnvironmentVariable
  1602. !insertmacro: _Else
  1603. !insertmacro: end of _Else
  1604. Pop: $R9
  1605. !insertmacro: _EndIf
  1606. !insertmacro: end of _EndIf
  1607. !insertmacro: end of SetEnvironmentVariableDefault
  1608. ReadEnvStr: PortableApps.comLocaleName->$0
  1609. !insertmacro: _If
  1610. !insertmacro: end of _If
  1611. ReadEnvStr: PortableApps.comLocaleWinName->$0
  1612. StrCpy $0 "$0" () (5)
  1613. !insertmacro: SetEnvironmentVariable
  1614. !insertmacro: DebugMsg
  1615. !insertmacro: !getdebug
  1616. !insertmacro: end of !getdebug
  1617. !insertmacro: end of DebugMsg
  1618. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,tr0)
  1619. !insertmacro: end of SetEnvironmentVariable
  1620. !insertmacro: _EndIf
  1621. !insertmacro: end of _EndIf
  1622. !insertmacro: _If
  1623. !insertmacro: end of _If
  1624. ClearErrors
  1625. !insertmacro: ReadLauncherConfig
  1626. ReadINIStr $0 [LanguageFile]:Type from $LauncherFile
  1627. !insertmacro: end of ReadLauncherConfig
  1628. !insertmacro: ReadLauncherConfig
  1629. ReadINIStr $1 [LanguageFile]:File from $LauncherFile
  1630. !insertmacro: end of ReadLauncherConfig
  1631. !insertmacro: ParseLocations
  1632. !insertmacro: !getdebug
  1633. !insertmacro: end of !getdebug
  1634. ExpandEnvStrings: $1->$1
  1635. !insertmacro: DebugMsg
  1636. !insertmacro: !getdebug
  1637. !insertmacro: end of !getdebug
  1638. !insertmacro: end of DebugMsg
  1639. !insertmacro: end of ParseLocations
  1640. !insertmacro: _If
  1641. !insertmacro: end of _If
  1642. !insertmacro: _And
  1643. !insertmacro: end of _And
  1644. StrCpy $8 "" () ()
  1645. !insertmacro: _If
  1646. !insertmacro: end of _If
  1647. !insertmacro: ReadLauncherConfig
  1648. ReadINIStr $2 [LanguageFile]:Entry from $LauncherFile
  1649. !insertmacro: end of ReadLauncherConfig
  1650. !insertmacro: _If
  1651. !insertmacro: end of _If
  1652. !insertmacro: ReadLauncherConfig
  1653. ReadINIStr $4 [LanguageFile]:CaseSensitive from $LauncherFile
  1654. !insertmacro: end of ReadLauncherConfig
  1655. !insertmacro: _If
  1656. !insertmacro: end of _If
  1657. !insertmacro: _If
  1658. !insertmacro: end of _If
  1659. !insertmacro: DebugMsg
  1660. !insertmacro: !getdebug
  1661. !insertmacro: end of !getdebug
  1662. !insertmacro: end of DebugMsg
  1663. !insertmacro: ConfigReadSCall
  1664. !insertmacro: end of ConfigReadSCall
  1665. !insertmacro: _Else
  1666. !insertmacro: end of _Else
  1667. !insertmacro: _If
  1668. !insertmacro: end of _If
  1669. !insertmacro: _And
  1670. !insertmacro: end of _And
  1671. !insertmacro: InvalidValueError
  1672. MessageBox: 16: "Error: invalid value '$4' for [LanguageFile]:CaseSensitive. Please refer to the Manual for valid values."
  1673. !insertmacro: end of InvalidValueError
  1674. !insertmacro: _EndIf
  1675. !insertmacro: end of _EndIf
  1676. !insertmacro: DebugMsg
  1677. !insertmacro: !getdebug
  1678. !insertmacro: end of !getdebug
  1679. !insertmacro: end of DebugMsg
  1680. !insertmacro: ConfigReadCall
  1681. !insertmacro: end of ConfigReadCall
  1682. !insertmacro: _EndIf
  1683. !insertmacro: end of _EndIf
  1684. !insertmacro: _EndIf
  1685. !insertmacro: end of _EndIf
  1686. !insertmacro: _EndIf
  1687. !insertmacro: end of _EndIf
  1688. !insertmacro: _ElseIf
  1689. !insertmacro: end of _ElseIf
  1690. !insertmacro: ReadLauncherConfig
  1691. ReadINIStr $2 [LanguageFile]:Section from $LauncherFile
  1692. !insertmacro: end of ReadLauncherConfig
  1693. !insertmacro: ReadLauncherConfig
  1694. ReadINIStr $3 [LanguageFile]:Key from $LauncherFile
  1695. !insertmacro: end of ReadLauncherConfig
  1696. !insertmacro: _If
  1697. !insertmacro: end of _If
  1698. !insertmacro: DebugMsg
  1699. !insertmacro: !getdebug
  1700. !insertmacro: end of !getdebug
  1701. !insertmacro: end of DebugMsg
  1702. ReadINIStr $8 [$2]:$3 from $1
  1703. !insertmacro: _EndIf
  1704. !insertmacro: end of _EndIf
  1705. !insertmacro: _ElseIf
  1706. !insertmacro: end of _ElseIf
  1707. !insertmacro: _Or
  1708. !insertmacro: end of _Or
  1709. !insertmacro: XML_WarnNotActivated
  1710. MessageBox: 16: "To use XML features of the Launcher you must set [Activate]:XML=true and then regenerate the launcher. Continuing, but [LanguageFile] will not be used."
  1711. !insertmacro: end of XML_WarnNotActivated
  1712. !insertmacro: _Else
  1713. !insertmacro: end of _Else
  1714. !insertmacro: InvalidValueError
  1715. MessageBox: 16: "Error: invalid value '$0' for [LanguageFile]:Type. Please refer to the Manual for valid values."
  1716. !insertmacro: end of InvalidValueError
  1717. !insertmacro: _EndIf
  1718. !insertmacro: end of _EndIf
  1719. !insertmacro: _If
  1720. !insertmacro: end of _If
  1721. !insertmacro: DebugMsg
  1722. !insertmacro: !getdebug
  1723. !insertmacro: end of !getdebug
  1724. !insertmacro: end of DebugMsg
  1725. !insertmacro: _Else
  1726. !insertmacro: end of _Else
  1727. ClearErrors
  1728. !insertmacro: ReadLauncherConfig
  1729. ReadINIStr $0 [LanguageFile]:TrimRight from $LauncherFile
  1730. !insertmacro: end of ReadLauncherConfig
  1731. !insertmacro: _If
  1732. !insertmacro: end of _If
  1733. StrLen $1 "$0"
  1734. StrCpy $2 "$8" () (-$1)
  1735. !insertmacro: _If
  1736. !insertmacro: end of _If
  1737. StrCpy $8 "$8" (-$1) ()
  1738. !insertmacro: _EndIf
  1739. !insertmacro: end of _EndIf
  1740. !insertmacro: _EndIf
  1741. !insertmacro: end of _EndIf
  1742. !insertmacro: DebugMsg
  1743. !insertmacro: !getdebug
  1744. !insertmacro: end of !getdebug
  1745. !insertmacro: end of DebugMsg
  1746. !insertmacro: SetEnvironmentVariable
  1747. !insertmacro: DebugMsg
  1748. !insertmacro: !getdebug
  1749. !insertmacro: end of !getdebug
  1750. !insertmacro: end of DebugMsg
  1751. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,tr8)
  1752. !insertmacro: end of SetEnvironmentVariable
  1753. !insertmacro: _EndIf
  1754. !insertmacro: end of _EndIf
  1755. !insertmacro: _EndIf
  1756. !insertmacro: end of _EndIf
  1757. !insertmacro: _EndIf
  1758. !insertmacro: end of _EndIf
  1759. ClearErrors
  1760. ReadEnvStr: PAL:LanguageCustom->$8
  1761. !insertmacro: _If
  1762. !insertmacro: end of _If
  1763. !insertmacro: ReadLauncherConfig
  1764. ReadINIStr $0 [Language]:Base from $LauncherFile
  1765. !insertmacro: end of ReadLauncherConfig
  1766. !insertmacro: _If
  1767. !insertmacro: end of _If
  1768. !insertmacro: ParseLocations
  1769. !insertmacro: !getdebug
  1770. !insertmacro: end of !getdebug
  1771. ExpandEnvStrings: $0->$0
  1772. !insertmacro: DebugMsg
  1773. !insertmacro: !getdebug
  1774. !insertmacro: end of !getdebug
  1775. !insertmacro: end of DebugMsg
  1776. !insertmacro: end of ParseLocations
  1777. ClearErrors
  1778. !insertmacro: ReadLauncherConfig
  1779. ReadINIStr $1 [LanguageStrings]:$0 from $LauncherFile
  1780. !insertmacro: end of ReadLauncherConfig
  1781. !insertmacro: _If
  1782. !insertmacro: end of _If
  1783. ClearErrors
  1784. !insertmacro: ReadLauncherConfig
  1785. ReadINIStr $1 [Language]:Default from $LauncherFile
  1786. !insertmacro: end of ReadLauncherConfig
  1787. !insertmacro: _If
  1788. !insertmacro: end of _If
  1789. !insertmacro: ParseLocations
  1790. !insertmacro: !getdebug
  1791. !insertmacro: end of !getdebug
  1792. ExpandEnvStrings: $1->$1
  1793. !insertmacro: DebugMsg
  1794. !insertmacro: !getdebug
  1795. !insertmacro: end of !getdebug
  1796. !insertmacro: end of DebugMsg
  1797. !insertmacro: end of ParseLocations
  1798. !insertmacro: _Else
  1799. !insertmacro: end of _Else
  1800. StrCpy $1 "$0" () ()
  1801. !insertmacro: _EndIf
  1802. !insertmacro: end of _EndIf
  1803. !insertmacro: _EndIf
  1804. !insertmacro: end of _EndIf
  1805. !insertmacro: SetEnvironmentVariable
  1806. !insertmacro: DebugMsg
  1807. !insertmacro: !getdebug
  1808. !insertmacro: end of !getdebug
  1809. !insertmacro: end of DebugMsg
  1810. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,tr1)
  1811. !insertmacro: end of SetEnvironmentVariable
  1812. !insertmacro: ReadLauncherConfig
  1813. ReadINIStr $2 [Language]:CheckIfExists from $LauncherFile
  1814. !insertmacro: end of ReadLauncherConfig
  1815. !insertmacro: _If
  1816. !insertmacro: end of _If
  1817. !insertmacro: ParseLocations
  1818. !insertmacro: !getdebug
  1819. !insertmacro: end of !getdebug
  1820. ExpandEnvStrings: $2->$2
  1821. !insertmacro: DebugMsg
  1822. !insertmacro: !getdebug
  1823. !insertmacro: end of !getdebug
  1824. !insertmacro: end of DebugMsg
  1825. !insertmacro: end of ParseLocations
  1826. !insertmacro: _If
  1827. !insertmacro: end of _If
  1828. !insertmacro: ReadLauncherConfig
  1829. ReadINIStr $1 [Language]:DefaultIfNotExists from $LauncherFile
  1830. !insertmacro: end of ReadLauncherConfig
  1831. !insertmacro: ParseLocations
  1832. !insertmacro: !getdebug
  1833. !insertmacro: end of !getdebug
  1834. ExpandEnvStrings: $1->$1
  1835. !insertmacro: DebugMsg
  1836. !insertmacro: !getdebug
  1837. !insertmacro: end of !getdebug
  1838. !insertmacro: end of DebugMsg
  1839. !insertmacro: end of ParseLocations
  1840. !insertmacro: DebugMsg
  1841. !insertmacro: !getdebug
  1842. !insertmacro: end of !getdebug
  1843. !insertmacro: end of DebugMsg
  1844. !insertmacro: SetEnvironmentVariable
  1845. !insertmacro: DebugMsg
  1846. !insertmacro: !getdebug
  1847. !insertmacro: end of !getdebug
  1848. !insertmacro: end of DebugMsg
  1849. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,tr1)
  1850. !insertmacro: end of SetEnvironmentVariable
  1851. !insertmacro: _EndIf
  1852. !insertmacro: end of _EndIf
  1853. !insertmacro: _EndIf
  1854. !insertmacro: end of _EndIf
  1855. !insertmacro: _EndIf
  1856. !insertmacro: end of _EndIf
  1857. !insertmacro: _EndIf
  1858. !insertmacro: end of _EndIf
  1859. !insertmacro: end of Language.nsh_Init
  1860. !insertmacro: end of RunSegment
  1861. !insertmacro: RunSegment
  1862. !insertmacro: !getdebug
  1863. !insertmacro: end of !getdebug
  1864. !insertmacro: Registry.nsh_Init
  1865. ClearErrors
  1866. !insertmacro: ReadLauncherConfig
  1867. ReadINIStr $UsesRegistry [Activate]:Registry from $LauncherFile
  1868. !insertmacro: end of ReadLauncherConfig
  1869. !insertmacro: _If
  1870. !insertmacro: end of _If
  1871. !insertmacro: DebugMsg
  1872. !insertmacro: !getdebug
  1873. !insertmacro: end of !getdebug
  1874. !insertmacro: end of DebugMsg
  1875. !insertmacro: _ElseIf
  1876. !insertmacro: end of _ElseIf
  1877. !insertmacro: _And
  1878. !insertmacro: end of _And
  1879. !insertmacro: InvalidValueError
  1880. MessageBox: 16: "Error: invalid value '$UsesRegistry' for [Activate]:Registry. Please refer to the Manual for valid values."
  1881. !insertmacro: end of InvalidValueError
  1882. !insertmacro: _EndIf
  1883. !insertmacro: end of _EndIf
  1884. !insertmacro: end of Registry.nsh_Init
  1885. !insertmacro: end of RunSegment
  1886. !insertmacro: RunSegment
  1887. !insertmacro: !getdebug
  1888. !insertmacro: end of !getdebug
  1889. !insertmacro: Java.nsh_Init
  1890. ClearErrors
  1891. !insertmacro: ReadLauncherConfig
  1892. ReadINIStr $JavaMode [Activate]:Java from $LauncherFile
  1893. !insertmacro: end of ReadLauncherConfig
  1894. !insertmacro: _If
  1895. !insertmacro: end of _If
  1896. !insertmacro: _Or
  1897. !insertmacro: end of _Or
  1898. StrCpy $JavaDirectory "$PortableAppsDirectory\CommonFiles\Java" () ()
  1899. !insertmacro: _If
  1900. !insertmacro: end of _If
  1901. ClearErrors
  1902. ReadRegStr $0 HKLM\Software\JavaSoft\Java Runtime Environment\CurrentVersion
  1903. ReadRegStr $JavaDirectory HKLM\Software\JavaSoft\Java Runtime Environment\$0\JavaHome
  1904. !insertmacro: _If
  1905. !insertmacro: end of _If
  1906. !insertmacro: _Or
  1907. !insertmacro: end of _Or
  1908. !insertmacro: _And
  1909. !insertmacro: end of _And
  1910. ClearErrors
  1911. ReadEnvStr: JAVA_HOME->$JavaDirectory
  1912. !insertmacro: _If
  1913. !insertmacro: end of _If
  1914. !insertmacro: _Or
  1915. !insertmacro: end of _Or
  1916. !insertmacro: _And
  1917. !insertmacro: end of _And
  1918. ClearErrors
  1919. SearchPath $JavaDirectory java.exe
  1920. !insertmacro: _If
  1921. !insertmacro: end of _If
  1922. !insertmacro: GetParentCall
  1923. !insertmacro: end of GetParentCall
  1924. !insertmacro: GetParentCall
  1925. !insertmacro: end of GetParentCall
  1926. !insertmacro: _Else
  1927. !insertmacro: end of _Else
  1928. StrCpy $JavaDirectory "$WINDIR\Java" () ()
  1929. !insertmacro: _If
  1930. !insertmacro: end of _If
  1931. !insertmacro: _And
  1932. !insertmacro: end of _And
  1933. StrCpy $JavaDirectory "$PortableAppsDirectory\CommonFiles\Java" () ()
  1934. !insertmacro: DebugMsg
  1935. !insertmacro: !getdebug
  1936. !insertmacro: end of !getdebug
  1937. !insertmacro: end of DebugMsg
  1938. !insertmacro: _EndIf
  1939. !insertmacro: end of _EndIf
  1940. !insertmacro: _EndIf
  1941. !insertmacro: end of _EndIf
  1942. !insertmacro: _EndIf
  1943. !insertmacro: end of _EndIf
  1944. !insertmacro: _EndIf
  1945. !insertmacro: end of _EndIf
  1946. !insertmacro: _EndIf
  1947. !insertmacro: end of _EndIf
  1948. !insertmacro: _If
  1949. !insertmacro: end of _If
  1950. !insertmacro: _If
  1951. !insertmacro: end of _If
  1952. MessageBox: 16: "$(LauncherNoJava)"
  1953. Quit
  1954. !insertmacro: _EndIf
  1955. !insertmacro: end of _EndIf
  1956. !insertmacro: _IfThen
  1957. !insertmacro: end of _IfThen
  1958. !insertmacro: _IfThen
  1959. !insertmacro: end of _IfThen
  1960. !insertmacro: _If
  1961. !insertmacro: end of _If
  1962. !insertmacro: _And
  1963. !insertmacro: end of _And
  1964. MessageBox: 16: "$(LauncherNoJava)"
  1965. Quit
  1966. !insertmacro: _EndIf
  1967. !insertmacro: end of _EndIf
  1968. !insertmacro: _EndIf
  1969. !insertmacro: end of _EndIf
  1970. !insertmacro: DebugMsg
  1971. !insertmacro: !getdebug
  1972. !insertmacro: end of !getdebug
  1973. !insertmacro: end of DebugMsg
  1974. !insertmacro: SetEnvironmentVariablesPathCall
  1975. Push: JAVA_HOME
  1976. Push: $JavaDirectory
  1977. !insertmacro: CallArtificialFunction2
  1978. !define: "CallArtificialFunction2_TYPE"="inst"
  1979. Call ":.SetEnvironmentVariablesPath_inst"
  1980. !undef: "CallArtificialFunction2_TYPE"
  1981. !insertmacro: end of CallArtificialFunction2
  1982. !insertmacro: end of SetEnvironmentVariablesPathCall
  1983. !insertmacro: _ElseIf
  1984. !insertmacro: end of _ElseIf
  1985. !insertmacro: InvalidValueError
  1986. MessageBox: 16: "Error: invalid value '$JavaMode' for [Activate]:Java. Please refer to the Manual for valid values."
  1987. !insertmacro: end of InvalidValueError
  1988. !insertmacro: _EndIf
  1989. !insertmacro: end of _EndIf
  1990. !insertmacro: end of Java.nsh_Init
  1991. !insertmacro: end of RunSegment
  1992. !insertmacro: RunSegment
  1993. !insertmacro: !getdebug
  1994. !insertmacro: end of !getdebug
  1995. !insertmacro: RunLocally.nsh_Init
  1996. !insertmacro: ReadUserConfig
  1997. !insertmacro: ConfigReadCall
  1998. !insertmacro: end of ConfigReadCall
  1999. !insertmacro: end of ReadUserConfig
  2000. !insertmacro: end of RunLocally.nsh_Init
  2001. !insertmacro: end of RunSegment
  2002. !insertmacro: RunSegment
  2003. !insertmacro: !getdebug
  2004. !insertmacro: end of !getdebug
  2005. !insertmacro: Temp.nsh_Init
  2006. ClearErrors
  2007. !insertmacro: ReadLauncherConfig
  2008. ReadINIStr $UsesContainedTempDirectory [Launch]:CleanTemp from $LauncherFile
  2009. !insertmacro: end of ReadLauncherConfig
  2010. !insertmacro: _If
  2011. !insertmacro: end of _If
  2012. !insertmacro: _And
  2013. !insertmacro: end of _And
  2014. !insertmacro: _And
  2015. !insertmacro: end of _And
  2016. !insertmacro: InvalidValueError
  2017. MessageBox: 16: "Error: invalid value '$UsesContainedTempDirectory' for [Launch]:CleanTemp. Please refer to the Manual for valid values."
  2018. !insertmacro: end of InvalidValueError
  2019. !insertmacro: _EndIf
  2020. !insertmacro: end of _EndIf
  2021. !insertmacro: end of Temp.nsh_Init
  2022. !insertmacro: end of RunSegment
  2023. !insertmacro: RunSegment
  2024. !insertmacro: !getdebug
  2025. !insertmacro: end of !getdebug
  2026. !insertmacro: InstanceManagement.nsh_Init
  2027. Plugin Command: Call kernel32::CreateMutex(i0,i0,t"PortableApps.comLauncher$AppID-$BaseName")?e
  2028. Pop: $0
  2029. !insertmacro: _If
  2030. !insertmacro: end of _If
  2031. ClearErrors
  2032. !insertmacro: ReadLauncherConfig
  2033. ReadINIStr $0 [Launch]:SinglePortableAppInstance from $LauncherFile
  2034. !insertmacro: end of ReadLauncherConfig
  2035. !insertmacro: _If
  2036. !insertmacro: end of _If
  2037. !insertmacro: DebugMsg
  2038. !insertmacro: !getdebug
  2039. !insertmacro: end of !getdebug
  2040. !insertmacro: end of DebugMsg
  2041. Quit
  2042. !insertmacro: _ElseIf
  2043. !insertmacro: end of _ElseIf
  2044. !insertmacro: _And
  2045. !insertmacro: end of _And
  2046. !insertmacro: InvalidValueError
  2047. MessageBox: 16: "Error: invalid value '$0' for [Launch]:SinglePortableAppInstance. Please refer to the Manual for valid values."
  2048. !insertmacro: end of InvalidValueError
  2049. !insertmacro: _EndIf
  2050. !insertmacro: end of _EndIf
  2051. !insertmacro: DebugMsg
  2052. !insertmacro: !getdebug
  2053. !insertmacro: end of !getdebug
  2054. !insertmacro: end of DebugMsg
  2055. StrCpy $SecondaryLaunch "true" () ()
  2056. StrCpy $WaitForProgram "false" () ()
  2057. StrCpy $DisableSplashScreen "true" () ()
  2058. !insertmacro: _EndIf
  2059. !insertmacro: end of _EndIf
  2060. !insertmacro: _If
  2061. !insertmacro: end of _If
  2062. !insertmacro: _And
  2063. !insertmacro: end of _And
  2064. StrCpy $MissingFileOrPath "App\$ProgramExecutable" () ()
  2065. MessageBox: 16: "$(LauncherFileNotFound)"
  2066. Quit
  2067. !insertmacro: _EndIf
  2068. !insertmacro: end of _EndIf
  2069. ClearErrors
  2070. !insertmacro: ReadLauncherConfig
  2071. ReadINIStr $0 [Launch]:SingleAppInstance from $LauncherFile
  2072. !insertmacro: end of ReadLauncherConfig
  2073. !insertmacro: _If
  2074. !insertmacro: end of _If
  2075. !insertmacro: _Or
  2076. !insertmacro: end of _Or
  2077. !insertmacro: _If
  2078. !insertmacro: end of _If
  2079. !insertmacro: GetFileNameCall
  2080. !insertmacro: end of GetFileNameCall
  2081. !insertmacro: _InstanceManagement_QuitIfRunning
  2082. !insertmacro: _If
  2083. !insertmacro: end of _If
  2084. !insertmacro: _And
  2085. !insertmacro: end of _And
  2086. MessageBox: 16: "$(LauncherAlreadyRunning)"
  2087. Quit
  2088. !insertmacro: _EndIf
  2089. !insertmacro: end of _EndIf
  2090. !insertmacro: end of _InstanceManagement_QuitIfRunning
  2091. !insertmacro: _EndIf
  2092. !insertmacro: end of _EndIf
  2093. !insertmacro: _ElseIf
  2094. !insertmacro: end of _ElseIf
  2095. !insertmacro: InvalidValueError
  2096. MessageBox: 16: "Error: invalid value '$0' for [Launch]:SingleAppInstance. Please refer to the Manual for valid values."
  2097. !insertmacro: end of InvalidValueError
  2098. !insertmacro: _EndIf
  2099. !insertmacro: end of _EndIf
  2100. ClearErrors
  2101. !insertmacro: ReadLauncherConfig
  2102. ReadINIStr $0 [Launch]:CloseEXE from $LauncherFile
  2103. !insertmacro: end of ReadLauncherConfig
  2104. !insertmacro: _If
  2105. !insertmacro: end of _If
  2106. !insertmacro: _InstanceManagement_QuitIfRunning
  2107. !insertmacro: _If
  2108. !insertmacro: end of _If
  2109. !insertmacro: _And
  2110. !insertmacro: end of _And
  2111. MessageBox: 16: "$(LauncherAlreadyRunning)"
  2112. Quit
  2113. !insertmacro: _EndIf
  2114. !insertmacro: end of _EndIf
  2115. !insertmacro: end of _InstanceManagement_QuitIfRunning
  2116. !insertmacro: _EndIf
  2117. !insertmacro: end of _EndIf
  2118. !insertmacro: _If
  2119. !insertmacro: end of _If
  2120. ClearErrors
  2121. !insertmacro: ReadLauncherConfig
  2122. ReadINIStr $WaitForProgram [Launch]:WaitForProgram from $LauncherFile
  2123. !insertmacro: end of ReadLauncherConfig
  2124. !insertmacro: _If
  2125. !insertmacro: end of _If
  2126. !insertmacro: _And
  2127. !insertmacro: end of _And
  2128. !insertmacro: _And
  2129. !insertmacro: end of _And
  2130. !insertmacro: InvalidValueError
  2131. MessageBox: 16: "Error: invalid value '$WaitForProgram' for [Launch]:WaitForProgram. Please refer to the Manual for valid values."
  2132. !insertmacro: end of InvalidValueError
  2133. !insertmacro: _EndIf
  2134. !insertmacro: end of _EndIf
  2135. !insertmacro: _EndIf
  2136. !insertmacro: end of _EndIf
  2137. !insertmacro: end of InstanceManagement.nsh_Init
  2138. !insertmacro: end of RunSegment
  2139. !insertmacro: RunSegment
  2140. !insertmacro: !getdebug
  2141. !insertmacro: end of !getdebug
  2142. !insertmacro: SplashScreen.nsh_Init
  2143. !insertmacro: _If
  2144. !insertmacro: end of _If
  2145. !insertmacro: ReadUserConfig
  2146. !insertmacro: ConfigReadCall
  2147. !insertmacro: end of ConfigReadCall
  2148. !insertmacro: end of ReadUserConfig
  2149. ClearErrors
  2150. !insertmacro: ReadLauncherConfig
  2151. ReadINIStr $0 [Launch]:SplashTime from $LauncherFile
  2152. !insertmacro: end of ReadLauncherConfig
  2153. !insertmacro: _If
  2154. !insertmacro: end of _If
  2155. !insertmacro: _And
  2156. !insertmacro: end of _And
  2157. !insertmacro: _And
  2158. !insertmacro: end of _And
  2159. !insertmacro: InvalidValueError
  2160. MessageBox: 16: "Error: invalid value '$0' for [Launch]:SplashTime. Please refer to the Manual for valid values."
  2161. !insertmacro: end of InvalidValueError
  2162. !insertmacro: _EndIf
  2163. !insertmacro: end of _EndIf
  2164. !insertmacro: _IfNotThen
  2165. !insertmacro: end of _IfNotThen
  2166. !insertmacro: CheckForPlatformSplashDisable
  2167. StrCmp "$DisableSplashScreen" "true" equal=_CFPSDEnd, nonequal=
  2168. Push: $0
  2169. Push: $1
  2170. Push: $R0
  2171. StrCpy $0 "$DisableSplashScreen" () ()
  2172. ReadEnvStr: PortableApps.comDisableSplash->$1
  2173. StrCmp "$1" "true" equal=, nonequal=_CFPSDStackEnd
  2174. !insertmacro: GetParentCall
  2175. !insertmacro: end of GetParentCall
  2176. IfFileExists: "$1\PortableApps.com\PortableAppsPlatform.exe" ? : _CFPSDStackEnd
  2177. File: "MoreInfo.dll"->"$PLUGINSDIR\MoreInfo.dll" 7168 bytes
  2178. Plugin Command: GetProductName $1\PortableApps.com\PortableAppsPlatform.exe
  2179. Pop: $R0
  2180. StrCmp "$R0" "PortableApps.com Platform" equal=, nonequal=_CFPSDStackEnd
  2181. File: "MoreInfo.dll"->"$PLUGINSDIR\MoreInfo.dll" 0/7168 bytes
  2182. Plugin Command: GetCompanyName $1\PortableApps.com\PortableAppsPlatform.exe
  2183. Pop: $R0
  2184. StrCmp "$R0" "PortableApps.com" equal=, nonequal=_CFPSDStackEnd
  2185. FindProc output=$R0 process_name=PortableAppsPlatform.exe
  2186. IntCmp $R0:1 equal=, < _CFPSDStackEnd, > _CFPSDStackEnd
  2187. StrCpy $0 "true" () ()
  2188. Pop: $R0
  2189. Pop: $1
  2190. Exch($0,0)
  2191. Pop: $DisableSplashScreen
  2192. !insertmacro: end of CheckForPlatformSplashDisable
  2193. !insertmacro: _If
  2194. !insertmacro: end of _If
  2195. !insertmacro: _IfThen
  2196. !insertmacro: end of _IfThen
  2197. File: "newadvsplash.dll"->"$PLUGINSDIR\newadvsplash.dll" 8704 bytes
  2198. Plugin Command: show $0 0 0 -1 /L $EXEDIR\App\AppInfo\Launcher\splash.jpg
  2199. !insertmacro: _EndIf
  2200. !insertmacro: end of _EndIf
  2201. !insertmacro: _EndIf
  2202. !insertmacro: end of _EndIf
  2203. !insertmacro: end of SplashScreen.nsh_Init
  2204. !insertmacro: end of RunSegment
  2205. !insertmacro: RunSegment
  2206. !insertmacro: !getdebug
  2207. !insertmacro: end of !getdebug
  2208. !insertmacro: RefreshShellIcons.nsh_Init
  2209. ClearErrors
  2210. !insertmacro: ReadLauncherConfig
  2211. ReadINIStr $RefreshShellIcons [Launch]:RefreshShellIcons from $LauncherFile
  2212. !insertmacro: end of ReadLauncherConfig
  2213. !insertmacro: _If
  2214. !insertmacro: end of _If
  2215. !insertmacro: _And
  2216. !insertmacro: end of _And
  2217. !insertmacro: _And
  2218. !insertmacro: end of _And
  2219. !insertmacro: _And
  2220. !insertmacro: end of _And
  2221. !insertmacro: InvalidValueError
  2222. MessageBox: 16: "Error: invalid value '$RefreshShellIcons' for [Launch]:RefreshShellIcons. Please refer to the Manual for valid values."
  2223. !insertmacro: end of InvalidValueError
  2224. !insertmacro: _EndIf
  2225. !insertmacro: end of _EndIf
  2226. !insertmacro: end of RefreshShellIcons.nsh_Init
  2227. !insertmacro: end of RunSegment
  2228. FunctionEnd
  2229. Function: "Pre"
  2230. !insertmacro: RunSegment
  2231. !insertmacro: end of RunSegment
  2232. !insertmacro: RunSegment
  2233. !insertmacro: !getdebug
  2234. !insertmacro: end of !getdebug
  2235. !insertmacro: RunLocally.nsh_Pre
  2236. !insertmacro: _If
  2237. !insertmacro: end of _If
  2238. !insertmacro: DebugMsg
  2239. !insertmacro: !getdebug
  2240. !insertmacro: end of !getdebug
  2241. !insertmacro: end of DebugMsg
  2242. ClearErrors
  2243. !insertmacro: ReadLauncherConfig
  2244. ReadINIStr $0 [LiveMode]:CopyApp from $LauncherFile
  2245. !insertmacro: end of ReadLauncherConfig
  2246. !insertmacro: _If
  2247. !insertmacro: end of _If
  2248. !insertmacro: _Or
  2249. !insertmacro: end of _Or
  2250. !insertmacro: _If
  2251. !insertmacro: end of _If
  2252. !insertmacro: DebugMsg
  2253. !insertmacro: !getdebug
  2254. !insertmacro: end of !getdebug
  2255. !insertmacro: end of DebugMsg
  2256. CreateDirectory: "$TMP\$AppIDLive"
  2257. CopyFiles: (silent) "$EXEDIR\App" -> "$TMP\$AppIDLive", size=0KB
  2258. !insertmacro: _EndIf
  2259. !insertmacro: end of _EndIf
  2260. StrCpy $AppDirectory "$TMP\$AppIDLive\App" () ()
  2261. !insertmacro: _ElseIf
  2262. !insertmacro: end of _ElseIf
  2263. !insertmacro: InvalidValueError
  2264. MessageBox: 16: "Error: invalid value '$0' for [LiveMode]:CopyApp. Please refer to the Manual for valid values."
  2265. !insertmacro: end of InvalidValueError
  2266. !insertmacro: _EndIf
  2267. !insertmacro: end of _EndIf
  2268. !insertmacro: _If
  2269. !insertmacro: end of _If
  2270. !insertmacro: DebugMsg
  2271. !insertmacro: !getdebug
  2272. !insertmacro: end of !getdebug
  2273. !insertmacro: end of DebugMsg
  2274. CreateDirectory: "$TMP\$AppIDLive"
  2275. CopyFiles: (silent) "$EXEDIR\Data" -> "$TMP\$AppIDLive", size=0KB
  2276. !insertmacro: _EndIf
  2277. !insertmacro: end of _EndIf
  2278. StrCpy $DataDirectory "$TMP\$AppIDLive\Data" () ()
  2279. !insertmacro: _If
  2280. !insertmacro: end of _If
  2281. !insertmacro: SetFileAttributesDirectoryNormal
  2282. Push: $TMP\$AppIDLive
  2283. Call "SetFileAttributesDirectoryNormal"
  2284. !insertmacro: end of SetFileAttributesDirectoryNormal
  2285. !insertmacro: _EndIf
  2286. !insertmacro: end of _EndIf
  2287. !insertmacro: SetEnvironmentVariablesPathCall
  2288. Push: PAL:AppDir
  2289. Push: $AppDirectory
  2290. !insertmacro: CallArtificialFunction2
  2291. !define: "CallArtificialFunction2_TYPE"="inst"
  2292. Call ":.SetEnvironmentVariablesPath_inst"
  2293. !undef: "CallArtificialFunction2_TYPE"
  2294. !insertmacro: end of CallArtificialFunction2
  2295. !insertmacro: end of SetEnvironmentVariablesPathCall
  2296. !insertmacro: SetEnvironmentVariablesPathCall
  2297. Push: PAL:DataDir
  2298. Push: $DataDirectory
  2299. !insertmacro: CallArtificialFunction2
  2300. !define: "CallArtificialFunction2_TYPE"="inst"
  2301. Call ":.SetEnvironmentVariablesPath_inst"
  2302. !undef: "CallArtificialFunction2_TYPE"
  2303. !insertmacro: end of CallArtificialFunction2
  2304. !insertmacro: end of SetEnvironmentVariablesPathCall
  2305. !insertmacro: _If
  2306. !insertmacro: end of _If
  2307. StrCpy $WaitForProgram "true" () ()
  2308. !insertmacro: _EndIf
  2309. !insertmacro: end of _EndIf
  2310. !insertmacro: _EndIf
  2311. !insertmacro: end of _EndIf
  2312. CreateDirectory: "$DataDirectory"
  2313. !insertmacro: end of RunLocally.nsh_Pre
  2314. !insertmacro: end of RunSegment
  2315. !insertmacro: RunSegment
  2316. !insertmacro: !getdebug
  2317. !insertmacro: end of !getdebug
  2318. !insertmacro: Temp.nsh_Pre
  2319. !insertmacro: _If
  2320. !insertmacro: end of _If
  2321. ClearErrors
  2322. !insertmacro: _If
  2323. !insertmacro: end of _If
  2324. StrCpy $TempDirectory "$DataDirectory\Temp" () ()
  2325. !insertmacro: _Else
  2326. !insertmacro: end of _Else
  2327. StrCpy $TempDirectory "$TMP\$AppIDTemp" () ()
  2328. !insertmacro: _EndIf
  2329. !insertmacro: end of _EndIf
  2330. !insertmacro: DebugMsg
  2331. !insertmacro: !getdebug
  2332. !insertmacro: end of !getdebug
  2333. !insertmacro: end of DebugMsg
  2334. !insertmacro: _If
  2335. !insertmacro: end of _If
  2336. !insertmacro: _And
  2337. !insertmacro: end of _And
  2338. RMDir: /r "$TempDirectory"
  2339. !insertmacro: _EndIf
  2340. !insertmacro: end of _EndIf
  2341. CreateDirectory: "$TempDirectory"
  2342. !insertmacro: _Else
  2343. !insertmacro: end of _Else
  2344. StrCpy $TempDirectory "$TMP" () ()
  2345. !insertmacro: _EndIf
  2346. !insertmacro: end of _EndIf
  2347. !insertmacro: DebugMsg
  2348. !insertmacro: !getdebug
  2349. !insertmacro: end of !getdebug
  2350. !insertmacro: end of DebugMsg
  2351. !insertmacro: SetEnvironmentVariablesPathCall
  2352. Push: TEMP
  2353. Push: $TempDirectory
  2354. !insertmacro: CallArtificialFunction2
  2355. !define: "CallArtificialFunction2_TYPE"="inst"
  2356. Call ":.SetEnvironmentVariablesPath_inst"
  2357. !undef: "CallArtificialFunction2_TYPE"
  2358. !insertmacro: end of CallArtificialFunction2
  2359. !insertmacro: end of SetEnvironmentVariablesPathCall
  2360. !insertmacro: SetEnvironmentVariable
  2361. !insertmacro: DebugMsg
  2362. !insertmacro: !getdebug
  2363. !insertmacro: end of !getdebug
  2364. !insertmacro: end of DebugMsg
  2365. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,ts)
  2366. !insertmacro: end of SetEnvironmentVariable
  2367. !insertmacro: SetEnvironmentVariable
  2368. !insertmacro: DebugMsg
  2369. !insertmacro: !getdebug
  2370. !insertmacro: end of !getdebug
  2371. !insertmacro: end of DebugMsg
  2372. Plugin Command: Call Kernel32::SetEnvironmentVariable(ts,ts)
  2373. !insertmacro: end of SetEnvironmentVariable
  2374. !insertmacro: end of Temp.nsh_Pre
  2375. !insertmacro: end of RunSegment
  2376. !insertmacro: RunSegment
  2377. !insertmacro: !getdebug
  2378. !insertmacro: end of !getdebug
  2379. !insertmacro: Environment.nsh_Pre
  2380. !insertmacro: ForEachINIPair
  2381. !define: "_ForEachINIPair_Open"=""
  2382. !insertmacro: _If
  2383. !insertmacro: end of _If
  2384. FileOpen: $LauncherFile as r -> $_FEIP_FileHandle
  2385. !insertmacro: _Else
  2386. !insertmacro: end of _Else
  2387. FileSeek: fp=$_FEIP_FileHandle, ofs=0, mode=SET, output=
  2388. !insertmacro: _EndIf
  2389. !insertmacro: end of _EndIf
  2390. !insertmacro: _Do
  2391. !insertmacro: end of _Do
  2392. ClearErrors
  2393. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  2394. !insertmacro: TrimNewLinesCall
  2395. !insertmacro: end of TrimNewLinesCall
  2396. !insertmacro: _If
  2397. !insertmacro: end of _If
  2398. !insertmacro: _Or
  2399. !insertmacro: end of _Or
  2400. !insertmacro: _Goto
  2401. !insertmacro: end of _Goto
  2402. !insertmacro: _EndIf
  2403. !insertmacro: end of _EndIf
  2404. !insertmacro: _Loop
  2405. !insertmacro: end of _Loop
  2406. !insertmacro: _If
  2407. !insertmacro: end of _If
  2408. !insertmacro: _Do
  2409. !insertmacro: end of _Do
  2410. ClearErrors
  2411. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  2412. StrCpy $_FEIP_LineLength "$_FEIP_Line" (1) ()
  2413. !insertmacro: _If
  2414. !insertmacro: end of _If
  2415. !insertmacro: _Or
  2416. !insertmacro: end of _Or
  2417. !insertmacro: _Goto
  2418. !insertmacro: end of _Goto
  2419. !insertmacro: _EndIf
  2420. !insertmacro: end of _EndIf
  2421. !insertmacro: _If
  2422. !insertmacro: end of _If
  2423. !insertmacro: _Goto
  2424. !insertmacro: end of _Goto
  2425. !insertmacro: _EndIf
  2426. !insertmacro: end of _EndIf
  2427. StrLen $_FEIP_LineLength "$_FEIP_Line"
  2428. StrCpy $_FEIP_CharNum "0" () ()
  2429. !insertmacro: _Do
  2430. !insertmacro: end of _Do
  2431. StrCpy $_FEIP_Char "$_FEIP_Line" (1) ($_FEIP_CharNum)
  2432. !insertmacro: _IfThen
  2433. !insertmacro: end of _IfThen
  2434. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  2435. !insertmacro: _Loop
  2436. !insertmacro: end of _Loop
  2437. !insertmacro: TrimNewLinesCall
  2438. !insertmacro: end of TrimNewLinesCall
  2439. !insertmacro: _If
  2440. !insertmacro: end of _If
  2441. StrCpy $0 "$_FEIP_Line" ($_FEIP_CharNum) ()
  2442. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  2443. StrCpy $1 "$_FEIP_Line" () ($_FEIP_CharNum)
  2444. !insertmacro: TrimWhiteCall
  2445. Push: $0
  2446. !insertmacro: CallArtificialFunction
  2447. !define: "CallArtificialFunction_TYPE"="inst"
  2448. Call ":.TrimWhite_inst"
  2449. Goto: TrimWhite_inst_DONE
  2450. !define: "TrimWhite_inst_DEFINED"=""
  2451. !insertmacro: TrimWhite_
  2452. Exch($R1,0)
  2453. Push: $R2
  2454. StrCpy $R2 "$R1" (1) ()
  2455. StrCmp "$R2" " " equal=+2, nonequal=
  2456. StrCmp "$R2" " " equal=0, nonequal=+3
  2457. StrCpy $R1 "$R1" () (1)
  2458. Goto: -4
  2459. StrCpy $R2 "$R1" (1) (-1)
  2460. StrCmp "$R2" " " equal=+2, nonequal=
  2461. StrCmp "$R2" " " equal=0, nonequal=+3
  2462. StrCpy $R1 "$R1" (-1) ()
  2463. Goto: -4
  2464. Pop: $R2
  2465. Exch($R1,0)
  2466. !insertmacro: end of TrimWhite_
  2467. Return
  2468. !undef: "CallArtificialFunction_TYPE"
  2469. !insertmacro: end of CallArtificialFunction
  2470. Pop: $0
  2471. !insertmacro: end of TrimWhiteCall
  2472. !insertmacro: TrimWhiteCall
  2473. Push: $1
  2474. !insertmacro: CallArtificialFunction
  2475. !define: "CallArtificialFunction_TYPE"="inst"
  2476. Call ":.TrimWhite_inst"
  2477. !undef: "CallArtificialFunction_TYPE"
  2478. !insertmacro: end of CallArtificialFunction
  2479. Pop: $1
  2480. !insertmacro: end of TrimWhiteCall
  2481. StrCpy $_FEIP_CharNum "$1" (1) ()
  2482. StrCpy $_FEIP_Char "$1" () (-1)
  2483. !insertmacro: _If
  2484. !insertmacro: end of _If
  2485. !insertmacro: _If
  2486. !insertmacro: end of _If
  2487. !insertmacro: _Or
  2488. !insertmacro: end of _Or
  2489. StrCpy $1 "$1" (-1) (1)
  2490. !insertmacro: _EndIf
  2491. !insertmacro: end of _EndIf
  2492. !insertmacro: _EndIf
  2493. !insertmacro: end of _EndIf
  2494. !insertmacro: end of ForEachINIPair
  2495. !insertmacro: ParseLocations
  2496. !insertmacro: !getdebug
  2497. !insertmacro: end of !getdebug
  2498. ExpandEnvStrings: $1->$1
  2499. !insertmacro: DebugMsg
  2500. !insertmacro: !getdebug
  2501. !insertmacro: end of !getdebug
  2502. !insertmacro: end of DebugMsg
  2503. !insertmacro: end of ParseLocations
  2504. !insertmacro: DebugMsg
  2505. !insertmacro: !getdebug
  2506. !insertmacro: end of !getdebug
  2507. !insertmacro: end of DebugMsg
  2508. Plugin Command: Call Kernel32::SetEnvironmentVariable(tr0,tr1)
  2509. !insertmacro: NextINIPair
  2510. !undef: "_ForEachINIPair_Open"
  2511. !insertmacro: _EndIf
  2512. !insertmacro: end of _EndIf
  2513. !insertmacro: _Loop
  2514. !insertmacro: end of _Loop
  2515. !insertmacro: _EndIf
  2516. !insertmacro: end of _EndIf
  2517. !insertmacro: end of NextINIPair
  2518. !insertmacro: end of Environment.nsh_Pre
  2519. !insertmacro: end of RunSegment
  2520. !insertmacro: RunSegment
  2521. !insertmacro: !getdebug
  2522. !insertmacro: end of !getdebug
  2523. !insertmacro: ExecString.nsh_Pre
  2524. !insertmacro: DebugMsg
  2525. !insertmacro: !getdebug
  2526. !insertmacro: end of !getdebug
  2527. !insertmacro: end of DebugMsg
  2528. !insertmacro: _If
  2529. !insertmacro: end of _If
  2530. StrCpy $ExecString ""$AppDirectory\$ProgramExecutable"" () ()
  2531. !insertmacro: _Else
  2532. !insertmacro: end of _Else
  2533. StrCpy $ExecString ""$JavaDirectory\bin\$ProgramExecutable"" () ()
  2534. !insertmacro: _EndIf
  2535. !insertmacro: end of _EndIf
  2536. !insertmacro: DebugMsg
  2537. !insertmacro: !getdebug
  2538. !insertmacro: end of !getdebug
  2539. !insertmacro: end of DebugMsg
  2540. ClearErrors
  2541. !insertmacro: ReadLauncherConfig
  2542. ReadINIStr $0 [Launch]:CommandLineArguments from $LauncherFile
  2543. !insertmacro: end of ReadLauncherConfig
  2544. !insertmacro: _If
  2545. !insertmacro: end of _If
  2546. !insertmacro: DebugMsg
  2547. !insertmacro: !getdebug
  2548. !insertmacro: end of !getdebug
  2549. !insertmacro: end of DebugMsg
  2550. !insertmacro: ParseLocations
  2551. !insertmacro: !getdebug
  2552. !insertmacro: end of !getdebug
  2553. ExpandEnvStrings: $0->$0
  2554. !insertmacro: DebugMsg
  2555. !insertmacro: !getdebug
  2556. !insertmacro: end of !getdebug
  2557. !insertmacro: end of DebugMsg
  2558. !insertmacro: end of ParseLocations
  2559. StrCpy $ExecString "$ExecString $0" () ()
  2560. !insertmacro: _EndIf
  2561. !insertmacro: end of _EndIf
  2562. !insertmacro: GetParametersCall
  2563. !insertmacro: end of GetParametersCall
  2564. !insertmacro: _If
  2565. !insertmacro: end of _If
  2566. !insertmacro: DebugMsg
  2567. !insertmacro: !getdebug
  2568. !insertmacro: end of !getdebug
  2569. !insertmacro: end of DebugMsg
  2570. ClearErrors
  2571. !insertmacro: ReadLauncherConfig
  2572. ReadINIStr $1 [Launch]:WorkingDirectory from $LauncherFile
  2573. !insertmacro: end of ReadLauncherConfig
  2574. !insertmacro: _If
  2575. !insertmacro: end of _If
  2576. StrCpy $ExecString "$ExecString $0" () ()
  2577. !insertmacro: _Else
  2578. !insertmacro: end of _Else
  2579. ClearErrors
  2580. GetFullPathName: $0->$1 (19839508)
  2581. !insertmacro: _If
  2582. !insertmacro: end of _If
  2583. StrCpy $ExecString "$ExecString $0" () ()
  2584. !insertmacro: _Else
  2585. !insertmacro: end of _Else
  2586. !insertmacro: DebugMsg
  2587. !insertmacro: !getdebug
  2588. !insertmacro: end of !getdebug
  2589. !insertmacro: end of DebugMsg
  2590. StrCpy $ExecString "$ExecString $1" () ()
  2591. !insertmacro: _EndIf
  2592. !insertmacro: end of _EndIf
  2593. !insertmacro: _EndIf
  2594. !insertmacro: end of _EndIf
  2595. !insertmacro: _EndIf
  2596. !insertmacro: end of _EndIf
  2597. !insertmacro: ReadUserConfig
  2598. !insertmacro: ConfigReadCall
  2599. !insertmacro: end of ConfigReadCall
  2600. !insertmacro: end of ReadUserConfig
  2601. !insertmacro: _If
  2602. !insertmacro: end of _If
  2603. !insertmacro: DebugMsg
  2604. !insertmacro: !getdebug
  2605. !insertmacro: end of !getdebug
  2606. !insertmacro: end of DebugMsg
  2607. !insertmacro: ParseLocations
  2608. !insertmacro: !getdebug
  2609. !insertmacro: end of !getdebug
  2610. ExpandEnvStrings: $0->$0
  2611. !insertmacro: DebugMsg
  2612. !insertmacro: !getdebug
  2613. !insertmacro: end of !getdebug
  2614. !insertmacro: end of DebugMsg
  2615. !insertmacro: end of ParseLocations
  2616. StrCpy $ExecString "$ExecString $0" () ()
  2617. !insertmacro: _EndIf
  2618. !insertmacro: end of _EndIf
  2619. !insertmacro: DebugMsg
  2620. !insertmacro: !getdebug
  2621. !insertmacro: end of !getdebug
  2622. !insertmacro: end of DebugMsg
  2623. !insertmacro: end of ExecString.nsh_Pre
  2624. !insertmacro: end of RunSegment
  2625. FunctionEnd
  2626. Function: "PrePrimary"
  2627. !insertmacro: RunSegment
  2628. !insertmacro: end of RunSegment
  2629. !insertmacro: RunSegment
  2630. !insertmacro: !getdebug
  2631. !insertmacro: end of !getdebug
  2632. !insertmacro: DriveLetter.nsh_PrePrimary
  2633. WriteINIStr: [$AppIDSettings] LastDrive=$CurrentDrive in $DataDirectory\settings\$AppIDSettings.ini
  2634. !insertmacro: end of DriveLetter.nsh_PrePrimary
  2635. !insertmacro: end of RunSegment
  2636. !insertmacro: RunSegment
  2637. !insertmacro: !getdebug
  2638. !insertmacro: end of !getdebug
  2639. !insertmacro: Variables.nsh_PrePrimary
  2640. WriteINIStr: [PortableApps.comLauncherLastRunEnvironment] PAL:LastPortableAppsBaseDir=$PortableAppsBaseDirectory in $DataDirectory\settings\$AppIDSettings.ini
  2641. !insertmacro: end of Variables.nsh_PrePrimary
  2642. !insertmacro: end of RunSegment
  2643. !insertmacro: RunSegment
  2644. !insertmacro: !getdebug
  2645. !insertmacro: end of !getdebug
  2646. !insertmacro: DirectoryMoving.nsh_PrePrimary
  2647. WriteINIStr: [$AppIDSettings] LastDirectory=$CurrentDirectory in $DataDirectory\settings\$AppIDSettings.ini
  2648. !insertmacro: end of DirectoryMoving.nsh_PrePrimary
  2649. !insertmacro: end of RunSegment
  2650. !insertmacro: RunSegment
  2651. !insertmacro: !getdebug
  2652. !insertmacro: end of !getdebug
  2653. !insertmacro: FileWrite.nsh_PrePrimary
  2654. StrCpy $R0 "0" () ()
  2655. !insertmacro: _Do
  2656. !insertmacro: end of _Do
  2657. IntOp: $R0=$R0+1
  2658. ClearErrors
  2659. !insertmacro: ReadLauncherConfig
  2660. ReadINIStr $0 [FileWrite$R0]:Type from $LauncherFile
  2661. !insertmacro: end of ReadLauncherConfig
  2662. !insertmacro: ReadLauncherConfig
  2663. ReadINIStr $7 [FileWrite$R0]:File from $LauncherFile
  2664. !insertmacro: end of ReadLauncherConfig
  2665. !insertmacro: _IfThen
  2666. !insertmacro: end of _IfThen
  2667. !insertmacro: ParseLocations
  2668. !insertmacro: !getdebug
  2669. !insertmacro: end of !getdebug
  2670. ExpandEnvStrings: $7->$7
  2671. !insertmacro: DebugMsg
  2672. !insertmacro: !getdebug
  2673. !insertmacro: end of !getdebug
  2674. !insertmacro: end of DebugMsg
  2675. !insertmacro: end of ParseLocations
  2676. !insertmacro: _If
  2677. !insertmacro: end of _If
  2678. !insertmacro: ReadLauncherConfig
  2679. ReadINIStr $2 [FileWrite$R0]:Entry from $LauncherFile
  2680. !insertmacro: end of ReadLauncherConfig
  2681. !insertmacro: ReadLauncherConfig
  2682. ReadINIStr $3 [FileWrite$R0]:Value from $LauncherFile
  2683. !insertmacro: end of ReadLauncherConfig
  2684. !insertmacro: _IfThen
  2685. !insertmacro: end of _IfThen
  2686. !insertmacro: ParseLocations
  2687. !insertmacro: !getdebug
  2688. !insertmacro: end of !getdebug
  2689. ExpandEnvStrings: $3->$3
  2690. !insertmacro: DebugMsg
  2691. !insertmacro: !getdebug
  2692. !insertmacro: end of !getdebug
  2693. !insertmacro: end of DebugMsg
  2694. !insertmacro: end of ParseLocations
  2695. ClearErrors
  2696. !insertmacro: ReadLauncherConfig
  2697. ReadINIStr $4 [FileWrite$R0]:CaseSensitive from $LauncherFile
  2698. !insertmacro: end of ReadLauncherConfig
  2699. !insertmacro: _If
  2700. !insertmacro: end of _If
  2701. !insertmacro: _And
  2702. !insertmacro: end of _And
  2703. !insertmacro: _And
  2704. !insertmacro: end of _And
  2705. !insertmacro: InvalidValueError
  2706. MessageBox: 16: "Error: invalid value '$4' for [FileWrite$R0]:CaseSensitive. Please refer to the Manual for valid values."
  2707. !insertmacro: end of InvalidValueError
  2708. !insertmacro: _Goto
  2709. !insertmacro: end of _Goto
  2710. !insertmacro: _EndIf
  2711. !insertmacro: end of _EndIf
  2712. !insertmacro: _ElseIf
  2713. !insertmacro: end of _ElseIf
  2714. !insertmacro: ReadLauncherConfig
  2715. ReadINIStr $2 [FileWrite$R0]:Section from $LauncherFile
  2716. !insertmacro: end of ReadLauncherConfig
  2717. !insertmacro: ReadLauncherConfig
  2718. ReadINIStr $3 [FileWrite$R0]:Key from $LauncherFile
  2719. !insertmacro: end of ReadLauncherConfig
  2720. !insertmacro: ReadLauncherConfig
  2721. ReadINIStr $4 [FileWrite$R0]:Value from $LauncherFile
  2722. !insertmacro: end of ReadLauncherConfig
  2723. !insertmacro: _IfThen
  2724. !insertmacro: end of _IfThen
  2725. !insertmacro: ParseLocations
  2726. !insertmacro: !getdebug
  2727. !insertmacro: end of !getdebug
  2728. ExpandEnvStrings: $4->$4
  2729. !insertmacro: DebugMsg
  2730. !insertmacro: !getdebug
  2731. !insertmacro: end of !getdebug
  2732. !insertmacro: end of DebugMsg
  2733. !insertmacro: end of ParseLocations
  2734. !insertmacro: _ElseIf
  2735. !insertmacro: end of _ElseIf
  2736. !insertmacro: _Or
  2737. !insertmacro: end of _Or
  2738. !insertmacro: XML_WarnNotActivated
  2739. MessageBox: 16: "To use XML features of the Launcher you must set [Activate]:XML=true and then regenerate the launcher. Continuing, but [FileWrite$R0] will not be used."
  2740. !insertmacro: end of XML_WarnNotActivated
  2741. !insertmacro: _Goto
  2742. !insertmacro: end of _Goto
  2743. !insertmacro: _ElseIf
  2744. !insertmacro: end of _ElseIf
  2745. !insertmacro: ReadLauncherConfig
  2746. ReadINIStr $2 [FileWrite$R0]:Find from $LauncherFile
  2747. !insertmacro: end of ReadLauncherConfig
  2748. !insertmacro: ReadLauncherConfig
  2749. ReadINIStr $3 [FileWrite$R0]:Replace from $LauncherFile
  2750. !insertmacro: end of ReadLauncherConfig
  2751. !insertmacro: _IfThen
  2752. !insertmacro: end of _IfThen
  2753. !insertmacro: ParseLocations
  2754. !insertmacro: !getdebug
  2755. !insertmacro: end of !getdebug
  2756. ExpandEnvStrings: $2->$2
  2757. !insertmacro: DebugMsg
  2758. !insertmacro: !getdebug
  2759. !insertmacro: end of !getdebug
  2760. !insertmacro: end of DebugMsg
  2761. !insertmacro: end of ParseLocations
  2762. !insertmacro: ParseLocations
  2763. !insertmacro: !getdebug
  2764. !insertmacro: end of !getdebug
  2765. ExpandEnvStrings: $3->$3
  2766. !insertmacro: DebugMsg
  2767. !insertmacro: !getdebug
  2768. !insertmacro: end of !getdebug
  2769. !insertmacro: end of DebugMsg
  2770. !insertmacro: end of ParseLocations
  2771. ClearErrors
  2772. !insertmacro: ReadLauncherConfig
  2773. ReadINIStr $4 [FileWrite$R0]:CaseSensitive from $LauncherFile
  2774. !insertmacro: end of ReadLauncherConfig
  2775. StrCpy $5 "skip" () ()
  2776. !insertmacro: _If
  2777. !insertmacro: end of _If
  2778. !insertmacro: _If
  2779. !insertmacro: end of _If
  2780. StrCpy $5 "replace" () ()
  2781. !insertmacro: _EndIf
  2782. !insertmacro: end of _EndIf
  2783. !insertmacro: _Else
  2784. !insertmacro: end of _Else
  2785. !insertmacro: _If
  2786. !insertmacro: end of _If
  2787. !insertmacro: _And
  2788. !insertmacro: end of _And
  2789. !insertmacro: InvalidValueError
  2790. MessageBox: 16: "Error: invalid value '$4' for [FileWrite$R0]:CaseSensitive. Please refer to the Manual for valid values."
  2791. !insertmacro: end of InvalidValueError
  2792. !insertmacro: _EndIf
  2793. !insertmacro: end of _EndIf
  2794. !insertmacro: _If
  2795. !insertmacro: end of _If
  2796. StrCpy $5 "replace" () ()
  2797. !insertmacro: _EndIf
  2798. !insertmacro: end of _EndIf
  2799. !insertmacro: _EndIf
  2800. !insertmacro: end of _EndIf
  2801. !insertmacro: _If
  2802. !insertmacro: end of _If
  2803. !insertmacro: _Goto
  2804. !insertmacro: end of _Goto
  2805. !insertmacro: _EndIf
  2806. !insertmacro: end of _EndIf
  2807. !insertmacro: _Else
  2808. !insertmacro: end of _Else
  2809. !insertmacro: InvalidValueError
  2810. MessageBox: 16: "Error: invalid value '$0' for [FileWrite$R0]:Type. Please refer to the Manual for valid values."
  2811. !insertmacro: end of InvalidValueError
  2812. !insertmacro: _Goto
  2813. !insertmacro: end of _Goto
  2814. !insertmacro: _EndIf
  2815. !insertmacro: end of _EndIf
  2816. !insertmacro: ForEachPath
  2817. !define: "_ForEachPath_Open"=""
  2818. !insertmacro: SplitAfterWildCard
  2819. Push: $7
  2820. !insertmacro: CallArtificialFunction
  2821. !define: "CallArtificialFunction_TYPE"="inst"
  2822. Call ":.SplitAfterWildCard_inst"
  2823. Goto: SplitAfterWildCard_inst_DONE
  2824. !define: "SplitAfterWildCard_inst_DEFINED"=""
  2825. !insertmacro: SplitAfterWildCard_
  2826. Exch($0,0)
  2827. Push: $1
  2828. Push: $2
  2829. Push: $3
  2830. StrCpy $1 "-1" () ()
  2831. StrLen $3 "$0"
  2832. IntOp: $1=$1+1
  2833. StrCpy $2 "$0" (1) ($1)
  2834. StrCmpS "$2" "?" equal=_SAWC_Found_Loop, nonequal=
  2835. StrCmpS "$2" "*" equal=_SAWC_Found_Loop, nonequal=
  2836. IntCmp $3:$1 equal=_SAWC_NotFound, < , > _SAWC_Loop
  2837. IntOp: $1=$1+1
  2838. StrCpy $2 "$0" (1) ($1)
  2839. StrCmpS "$2" "\" equal=_SAWC_Found_End, nonequal=
  2840. IntCmp $3:$1 equal=0, < , > _SAWC_Found_Loop
  2841. StrCpy $1 "$0" ($1) ()
  2842. StrLen $3 "$1"
  2843. StrCpy $0 "$0" () ($3)
  2844. StrCpy $_FEP_FindHandle "" () ()
  2845. Goto: _SAWC_End
  2846. StrCpy $1 "$0" () ()
  2847. StrCpy $0 "" () ()
  2848. StrCpy $_FEP_FindHandle "0" () ()
  2849. Pop: $3
  2850. Pop: $2
  2851. Exch($1,0)
  2852. Exch(st(1),0)
  2853. Exch($0,0)
  2854. !insertmacro: end of SplitAfterWildCard_
  2855. Return
  2856. !undef: "CallArtificialFunction_TYPE"
  2857. !insertmacro: end of CallArtificialFunction
  2858. Pop: $_FEP_WildCardChild
  2859. Pop: $_FEP_WildCardPath
  2860. !insertmacro: end of SplitAfterWildCard
  2861. !insertmacro: GetParentCall
  2862. !insertmacro: end of GetParentCall
  2863. !insertmacro: GetFileExtCall
  2864. !insertmacro: end of GetFileExtCall
  2865. StrCpy $R4 "" () ()
  2866. !insertmacro: _Do
  2867. !insertmacro: end of _Do
  2868. ClearErrors
  2869. !insertmacro: _If
  2870. !insertmacro: end of _If
  2871. StrCpy $1 "$7" () ()
  2872. !insertmacro: _IfNotThen
  2873. !insertmacro: end of _IfNotThen
  2874. !insertmacro: _Else
  2875. !insertmacro: end of _Else
  2876. !insertmacro: _If
  2877. !insertmacro: end of _If
  2878. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  2879. !insertmacro: _Else
  2880. !insertmacro: end of _Else
  2881. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  2882. !insertmacro: _EndIf
  2883. !insertmacro: end of _EndIf
  2884. StrCpy $1 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  2885. !insertmacro: _EndIf
  2886. !insertmacro: end of _EndIf
  2887. !insertmacro: _If
  2888. !insertmacro: end of _If
  2889. !insertmacro: _IfThen
  2890. !insertmacro: end of _IfThen
  2891. !insertmacro: _Goto
  2892. !insertmacro: end of _Goto
  2893. !insertmacro: _EndIf
  2894. !insertmacro: end of _EndIf
  2895. !insertmacro: _If
  2896. !insertmacro: end of _If
  2897. !insertmacro: _And
  2898. !insertmacro: end of _And
  2899. Push: $0
  2900. !insertmacro: GetFileExtCall
  2901. !insertmacro: end of GetFileExtCall
  2902. !insertmacro: _If
  2903. !insertmacro: end of _If
  2904. !insertmacro: _Or
  2905. !insertmacro: end of _Or
  2906. !insertmacro: _And
  2907. !insertmacro: end of _And
  2908. !insertmacro: _Or
  2909. !insertmacro: end of _Or
  2910. Pop: $0
  2911. !insertmacro: GetFileNameCall
  2912. !insertmacro: end of GetFileNameCall
  2913. !insertmacro: end of ForEachPath
  2914. !insertmacro: _If
  2915. !insertmacro: end of _If
  2916. !insertmacro: _If
  2917. !insertmacro: end of _If
  2918. !insertmacro: DebugMsg
  2919. !insertmacro: !getdebug
  2920. !insertmacro: end of !getdebug
  2921. !insertmacro: end of DebugMsg
  2922. !insertmacro: ConfigWriteSCall
  2923. !insertmacro: end of ConfigWriteSCall
  2924. !insertmacro: _Else
  2925. !insertmacro: end of _Else
  2926. !insertmacro: DebugMsg
  2927. !insertmacro: !getdebug
  2928. !insertmacro: end of !getdebug
  2929. !insertmacro: end of DebugMsg
  2930. !insertmacro: ConfigWriteCall
  2931. !insertmacro: end of ConfigWriteCall
  2932. !insertmacro: _EndIf
  2933. !insertmacro: end of _EndIf
  2934. !insertmacro: _ElseIf
  2935. !insertmacro: end of _ElseIf
  2936. !insertmacro: DebugMsg
  2937. !insertmacro: !getdebug
  2938. !insertmacro: end of !getdebug
  2939. !insertmacro: end of DebugMsg
  2940. WriteINIStr: [$2] $3=$4 in $1
  2941. !insertmacro: _ElseIf
  2942. !insertmacro: end of _ElseIf
  2943. ClearErrors
  2944. !insertmacro: ReadLauncherConfig
  2945. ReadINIStr $5 [FileWrite$R0]:Encoding from $LauncherFile
  2946. !insertmacro: end of ReadLauncherConfig
  2947. !insertmacro: _If
  2948. !insertmacro: end of _If
  2949. FileOpen: $1 as r -> $9
  2950. FileReadByte: $9->$5
  2951. FileReadByte: $9->$6
  2952. IntOp: $5=$5<<8
  2953. IntOp: $5=$5+$6
  2954. !insertmacro: _IfThen
  2955. !insertmacro: end of _IfThen
  2956. FileClose: $9
  2957. !insertmacro: _ElseIf
  2958. !insertmacro: end of _ElseIf
  2959. !insertmacro: _And
  2960. !insertmacro: end of _And
  2961. !insertmacro: InvalidValueError
  2962. MessageBox: 16: "Error: invalid value '$5' for [FileWrite$R0]:Encoding. Please refer to the Manual for valid values."
  2963. !insertmacro: end of InvalidValueError
  2964. !insertmacro: _EndIf
  2965. !insertmacro: end of _EndIf
  2966. !insertmacro: !getdebug
  2967. !insertmacro: end of !getdebug
  2968. !insertmacro: _If
  2969. !insertmacro: end of _If
  2970. !insertmacro: _If
  2971. !insertmacro: end of _If
  2972. !insertmacro: ReplaceInFileUTF16LECS
  2973. Push: /U=1 /S=1
  2974. Push: $1
  2975. Push: $2
  2976. Push: $3
  2977. Call "ReplaceInFile"
  2978. !insertmacro: end of ReplaceInFileUTF16LECS
  2979. !insertmacro: _Else
  2980. !insertmacro: end of _Else
  2981. !insertmacro: ReplaceInFileUTF16LE
  2982. Push: /U=1 /S=0
  2983. Push: $1
  2984. Push: $2
  2985. Push: $3
  2986. Call "ReplaceInFile"
  2987. !insertmacro: end of ReplaceInFileUTF16LE
  2988. !insertmacro: _EndIf
  2989. !insertmacro: end of _EndIf
  2990. !insertmacro: _Else
  2991. !insertmacro: end of _Else
  2992. !insertmacro: _If
  2993. !insertmacro: end of _If
  2994. !insertmacro: ReplaceInFileCS
  2995. Push: /S=1
  2996. Push: $1
  2997. Push: $2
  2998. Push: $3
  2999. Call "ReplaceInFile"
  3000. !insertmacro: end of ReplaceInFileCS
  3001. !insertmacro: _Else
  3002. !insertmacro: end of _Else
  3003. !insertmacro: ReplaceInFile
  3004. Push: /S=0
  3005. Push: $1
  3006. Push: $2
  3007. Push: $3
  3008. Call "ReplaceInFile"
  3009. !insertmacro: end of ReplaceInFile
  3010. !insertmacro: _EndIf
  3011. !insertmacro: end of _EndIf
  3012. !insertmacro: _EndIf
  3013. !insertmacro: end of _EndIf
  3014. !insertmacro: _EndIf
  3015. !insertmacro: end of _EndIf
  3016. !insertmacro: NextPath
  3017. !undef: "_ForEachPath_Open"
  3018. !insertmacro: _Else
  3019. !insertmacro: end of _Else
  3020. Pop: $0
  3021. !insertmacro: _EndIf
  3022. !insertmacro: end of _EndIf
  3023. !insertmacro: _EndIf
  3024. !insertmacro: end of _EndIf
  3025. !insertmacro: _Loop
  3026. !insertmacro: end of _Loop
  3027. !insertmacro: _If
  3028. !insertmacro: end of _If
  3029. FindClose: $_FEP_FindHandle
  3030. StrCpy $_FEP_FindHandle "" () ()
  3031. !insertmacro: _EndIf
  3032. !insertmacro: end of _EndIf
  3033. !insertmacro: end of NextPath
  3034. !insertmacro: _Loop
  3035. !insertmacro: end of _Loop
  3036. !insertmacro: end of FileWrite.nsh_PrePrimary
  3037. !insertmacro: end of RunSegment
  3038. !insertmacro: RunSegment
  3039. !insertmacro: !getdebug
  3040. !insertmacro: end of !getdebug
  3041. !insertmacro: FilesMove.nsh_PrePrimary
  3042. !insertmacro: ForEachINIPair
  3043. !define: "_ForEachINIPair_Open"=""
  3044. !insertmacro: _If
  3045. !insertmacro: end of _If
  3046. FileOpen: $LauncherFile as r -> $_FEIP_FileHandle
  3047. !insertmacro: _Else
  3048. !insertmacro: end of _Else
  3049. FileSeek: fp=$_FEIP_FileHandle, ofs=0, mode=SET, output=
  3050. !insertmacro: _EndIf
  3051. !insertmacro: end of _EndIf
  3052. !insertmacro: _Do
  3053. !insertmacro: end of _Do
  3054. ClearErrors
  3055. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  3056. !insertmacro: TrimNewLinesCall
  3057. !insertmacro: end of TrimNewLinesCall
  3058. !insertmacro: _If
  3059. !insertmacro: end of _If
  3060. !insertmacro: _Or
  3061. !insertmacro: end of _Or
  3062. !insertmacro: _Goto
  3063. !insertmacro: end of _Goto
  3064. !insertmacro: _EndIf
  3065. !insertmacro: end of _EndIf
  3066. !insertmacro: _Loop
  3067. !insertmacro: end of _Loop
  3068. !insertmacro: _If
  3069. !insertmacro: end of _If
  3070. !insertmacro: _Do
  3071. !insertmacro: end of _Do
  3072. ClearErrors
  3073. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  3074. StrCpy $_FEIP_LineLength "$_FEIP_Line" (1) ()
  3075. !insertmacro: _If
  3076. !insertmacro: end of _If
  3077. !insertmacro: _Or
  3078. !insertmacro: end of _Or
  3079. !insertmacro: _Goto
  3080. !insertmacro: end of _Goto
  3081. !insertmacro: _EndIf
  3082. !insertmacro: end of _EndIf
  3083. !insertmacro: _If
  3084. !insertmacro: end of _If
  3085. !insertmacro: _Goto
  3086. !insertmacro: end of _Goto
  3087. !insertmacro: _EndIf
  3088. !insertmacro: end of _EndIf
  3089. StrLen $_FEIP_LineLength "$_FEIP_Line"
  3090. StrCpy $_FEIP_CharNum "0" () ()
  3091. !insertmacro: _Do
  3092. !insertmacro: end of _Do
  3093. StrCpy $_FEIP_Char "$_FEIP_Line" (1) ($_FEIP_CharNum)
  3094. !insertmacro: _IfThen
  3095. !insertmacro: end of _IfThen
  3096. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  3097. !insertmacro: _Loop
  3098. !insertmacro: end of _Loop
  3099. !insertmacro: TrimNewLinesCall
  3100. !insertmacro: end of TrimNewLinesCall
  3101. !insertmacro: _If
  3102. !insertmacro: end of _If
  3103. StrCpy $0 "$_FEIP_Line" ($_FEIP_CharNum) ()
  3104. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  3105. StrCpy $1 "$_FEIP_Line" () ($_FEIP_CharNum)
  3106. !insertmacro: TrimWhiteCall
  3107. Push: $0
  3108. !insertmacro: CallArtificialFunction
  3109. !define: "CallArtificialFunction_TYPE"="inst"
  3110. Call ":.TrimWhite_inst"
  3111. !undef: "CallArtificialFunction_TYPE"
  3112. !insertmacro: end of CallArtificialFunction
  3113. Pop: $0
  3114. !insertmacro: end of TrimWhiteCall
  3115. !insertmacro: TrimWhiteCall
  3116. Push: $1
  3117. !insertmacro: CallArtificialFunction
  3118. !define: "CallArtificialFunction_TYPE"="inst"
  3119. Call ":.TrimWhite_inst"
  3120. !undef: "CallArtificialFunction_TYPE"
  3121. !insertmacro: end of CallArtificialFunction
  3122. Pop: $1
  3123. !insertmacro: end of TrimWhiteCall
  3124. StrCpy $_FEIP_CharNum "$1" (1) ()
  3125. StrCpy $_FEIP_Char "$1" () (-1)
  3126. !insertmacro: _If
  3127. !insertmacro: end of _If
  3128. !insertmacro: _If
  3129. !insertmacro: end of _If
  3130. !insertmacro: _Or
  3131. !insertmacro: end of _Or
  3132. StrCpy $1 "$1" (-1) (1)
  3133. !insertmacro: _EndIf
  3134. !insertmacro: end of _EndIf
  3135. !insertmacro: _EndIf
  3136. !insertmacro: end of _EndIf
  3137. !insertmacro: end of ForEachINIPair
  3138. !insertmacro: _FilesMove_Start
  3139. !insertmacro: ParseLocations
  3140. !insertmacro: !getdebug
  3141. !insertmacro: end of !getdebug
  3142. ExpandEnvStrings: $1->$1
  3143. !insertmacro: DebugMsg
  3144. !insertmacro: !getdebug
  3145. !insertmacro: end of !getdebug
  3146. !insertmacro: end of DebugMsg
  3147. !insertmacro: end of ParseLocations
  3148. !insertmacro: GetFileNameCall
  3149. !insertmacro: end of GetFileNameCall
  3150. StrCpy $0 "$DataDirectory\$0" () ()
  3151. StrCpy $4 "$1" () ()
  3152. StrCpy $1 "$1\$2" () ()
  3153. !insertmacro: end of _FilesMove_Start
  3154. StrLen $R0 "$EXEDIR"
  3155. StrCpy $R0 "$1" ($R0) ()
  3156. !insertmacro: _If
  3157. !insertmacro: end of _If
  3158. StrCpy $7 "in-package" () ()
  3159. !insertmacro: _Else
  3160. !insertmacro: end of _Else
  3161. StrCpy $7 "not-in-package" () ()
  3162. !insertmacro: _EndIf
  3163. !insertmacro: end of _EndIf
  3164. !insertmacro: _If
  3165. !insertmacro: end of _If
  3166. !insertmacro: ForEachPath
  3167. !define: "_ForEachPath_Open"=""
  3168. !insertmacro: SplitAfterWildCard
  3169. Push: $1
  3170. !insertmacro: CallArtificialFunction
  3171. !define: "CallArtificialFunction_TYPE"="inst"
  3172. Call ":.SplitAfterWildCard_inst"
  3173. !undef: "CallArtificialFunction_TYPE"
  3174. !insertmacro: end of CallArtificialFunction
  3175. Pop: $_FEP_WildCardChild
  3176. Pop: $_FEP_WildCardPath
  3177. !insertmacro: end of SplitAfterWildCard
  3178. !insertmacro: GetParentCall
  3179. !insertmacro: end of GetParentCall
  3180. !insertmacro: GetFileExtCall
  3181. !insertmacro: end of GetFileExtCall
  3182. StrCpy $2 "" () ()
  3183. !insertmacro: _Do
  3184. !insertmacro: end of _Do
  3185. ClearErrors
  3186. !insertmacro: _If
  3187. !insertmacro: end of _If
  3188. StrCpy $4 "$1" () ()
  3189. !insertmacro: _IfNotThen
  3190. !insertmacro: end of _IfNotThen
  3191. !insertmacro: _Else
  3192. !insertmacro: end of _Else
  3193. !insertmacro: _If
  3194. !insertmacro: end of _If
  3195. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  3196. !insertmacro: _Else
  3197. !insertmacro: end of _Else
  3198. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  3199. !insertmacro: _EndIf
  3200. !insertmacro: end of _EndIf
  3201. StrCpy $4 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  3202. !insertmacro: _EndIf
  3203. !insertmacro: end of _EndIf
  3204. !insertmacro: _If
  3205. !insertmacro: end of _If
  3206. !insertmacro: _IfThen
  3207. !insertmacro: end of _IfThen
  3208. !insertmacro: _Goto
  3209. !insertmacro: end of _Goto
  3210. !insertmacro: _EndIf
  3211. !insertmacro: end of _EndIf
  3212. !insertmacro: _If
  3213. !insertmacro: end of _If
  3214. !insertmacro: _And
  3215. !insertmacro: end of _And
  3216. Push: $0
  3217. !insertmacro: GetFileExtCall
  3218. !insertmacro: end of GetFileExtCall
  3219. !insertmacro: _If
  3220. !insertmacro: end of _If
  3221. !insertmacro: _Or
  3222. !insertmacro: end of _Or
  3223. !insertmacro: _And
  3224. !insertmacro: end of _And
  3225. !insertmacro: _Or
  3226. !insertmacro: end of _Or
  3227. Pop: $0
  3228. !insertmacro: GetFileNameCall
  3229. !insertmacro: end of GetFileNameCall
  3230. !insertmacro: end of ForEachPath
  3231. !insertmacro: _If
  3232. !insertmacro: end of _If
  3233. !insertmacro: DebugMsg
  3234. !insertmacro: !getdebug
  3235. !insertmacro: end of !getdebug
  3236. !insertmacro: end of DebugMsg
  3237. Rename: $4->$4.BackupBy$AppID
  3238. !insertmacro: _EndIf
  3239. !insertmacro: end of _EndIf
  3240. !insertmacro: NextPath
  3241. !undef: "_ForEachPath_Open"
  3242. !insertmacro: _Else
  3243. !insertmacro: end of _Else
  3244. Pop: $0
  3245. !insertmacro: _EndIf
  3246. !insertmacro: end of _EndIf
  3247. !insertmacro: _EndIf
  3248. !insertmacro: end of _EndIf
  3249. !insertmacro: _Loop
  3250. !insertmacro: end of _Loop
  3251. !insertmacro: _If
  3252. !insertmacro: end of _If
  3253. FindClose: $_FEP_FindHandle
  3254. StrCpy $_FEP_FindHandle "" () ()
  3255. !insertmacro: _EndIf
  3256. !insertmacro: end of _EndIf
  3257. !insertmacro: end of NextPath
  3258. !insertmacro: _Else
  3259. !insertmacro: end of _Else
  3260. !insertmacro: ForEachPath
  3261. !define: "_ForEachPath_Open"=""
  3262. !insertmacro: SplitAfterWildCard
  3263. Push: $1
  3264. !insertmacro: CallArtificialFunction
  3265. !define: "CallArtificialFunction_TYPE"="inst"
  3266. Call ":.SplitAfterWildCard_inst"
  3267. !undef: "CallArtificialFunction_TYPE"
  3268. !insertmacro: end of CallArtificialFunction
  3269. Pop: $_FEP_WildCardChild
  3270. Pop: $_FEP_WildCardPath
  3271. !insertmacro: end of SplitAfterWildCard
  3272. !insertmacro: GetParentCall
  3273. !insertmacro: end of GetParentCall
  3274. !insertmacro: GetFileExtCall
  3275. !insertmacro: end of GetFileExtCall
  3276. StrCpy $2 "" () ()
  3277. !insertmacro: _Do
  3278. !insertmacro: end of _Do
  3279. ClearErrors
  3280. !insertmacro: _If
  3281. !insertmacro: end of _If
  3282. StrCpy $4 "$1" () ()
  3283. !insertmacro: _IfNotThen
  3284. !insertmacro: end of _IfNotThen
  3285. !insertmacro: _Else
  3286. !insertmacro: end of _Else
  3287. !insertmacro: _If
  3288. !insertmacro: end of _If
  3289. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  3290. !insertmacro: _Else
  3291. !insertmacro: end of _Else
  3292. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  3293. !insertmacro: _EndIf
  3294. !insertmacro: end of _EndIf
  3295. StrCpy $4 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  3296. !insertmacro: _EndIf
  3297. !insertmacro: end of _EndIf
  3298. !insertmacro: _If
  3299. !insertmacro: end of _If
  3300. !insertmacro: _IfThen
  3301. !insertmacro: end of _IfThen
  3302. !insertmacro: _Goto
  3303. !insertmacro: end of _Goto
  3304. !insertmacro: _EndIf
  3305. !insertmacro: end of _EndIf
  3306. !insertmacro: _If
  3307. !insertmacro: end of _If
  3308. !insertmacro: _And
  3309. !insertmacro: end of _And
  3310. Push: $0
  3311. !insertmacro: GetFileExtCall
  3312. !insertmacro: end of GetFileExtCall
  3313. !insertmacro: _If
  3314. !insertmacro: end of _If
  3315. !insertmacro: _Or
  3316. !insertmacro: end of _Or
  3317. !insertmacro: _And
  3318. !insertmacro: end of _And
  3319. !insertmacro: _Or
  3320. !insertmacro: end of _Or
  3321. Pop: $0
  3322. !insertmacro: GetFileNameCall
  3323. !insertmacro: end of GetFileNameCall
  3324. !insertmacro: end of ForEachPath
  3325. !insertmacro: _Goto
  3326. !insertmacro: end of _Goto
  3327. !insertmacro: NextPath
  3328. !undef: "_ForEachPath_Open"
  3329. !insertmacro: _Else
  3330. !insertmacro: end of _Else
  3331. Pop: $0
  3332. !insertmacro: _EndIf
  3333. !insertmacro: end of _EndIf
  3334. !insertmacro: _EndIf
  3335. !insertmacro: end of _EndIf
  3336. !insertmacro: _Loop
  3337. !insertmacro: end of _Loop
  3338. !insertmacro: _If
  3339. !insertmacro: end of _If
  3340. FindClose: $_FEP_FindHandle
  3341. StrCpy $_FEP_FindHandle "" () ()
  3342. !insertmacro: _EndIf
  3343. !insertmacro: end of _EndIf
  3344. !insertmacro: end of NextPath
  3345. !insertmacro: _If
  3346. !insertmacro: end of _If
  3347. !insertmacro: DebugMsg
  3348. !insertmacro: !getdebug
  3349. !insertmacro: end of !getdebug
  3350. !insertmacro: end of DebugMsg
  3351. !insertmacro: ForEachPath
  3352. !define: "_ForEachPath_Open"=""
  3353. !insertmacro: SplitAfterWildCard
  3354. Push: $0
  3355. !insertmacro: CallArtificialFunction
  3356. !define: "CallArtificialFunction_TYPE"="inst"
  3357. Call ":.SplitAfterWildCard_inst"
  3358. !undef: "CallArtificialFunction_TYPE"
  3359. !insertmacro: end of CallArtificialFunction
  3360. Pop: $_FEP_WildCardChild
  3361. Pop: $_FEP_WildCardPath
  3362. !insertmacro: end of SplitAfterWildCard
  3363. !insertmacro: GetParentCall
  3364. !insertmacro: end of GetParentCall
  3365. !insertmacro: GetFileExtCall
  3366. !insertmacro: end of GetFileExtCall
  3367. StrCpy $2 "" () ()
  3368. !insertmacro: _Do
  3369. !insertmacro: end of _Do
  3370. ClearErrors
  3371. !insertmacro: _If
  3372. !insertmacro: end of _If
  3373. StrCpy $4 "$0" () ()
  3374. !insertmacro: _IfNotThen
  3375. !insertmacro: end of _IfNotThen
  3376. !insertmacro: _Else
  3377. !insertmacro: end of _Else
  3378. !insertmacro: _If
  3379. !insertmacro: end of _If
  3380. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  3381. !insertmacro: _Else
  3382. !insertmacro: end of _Else
  3383. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  3384. !insertmacro: _EndIf
  3385. !insertmacro: end of _EndIf
  3386. StrCpy $4 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  3387. !insertmacro: _EndIf
  3388. !insertmacro: end of _EndIf
  3389. !insertmacro: _If
  3390. !insertmacro: end of _If
  3391. !insertmacro: _IfThen
  3392. !insertmacro: end of _IfThen
  3393. !insertmacro: _Goto
  3394. !insertmacro: end of _Goto
  3395. !insertmacro: _EndIf
  3396. !insertmacro: end of _EndIf
  3397. !insertmacro: _If
  3398. !insertmacro: end of _If
  3399. !insertmacro: _And
  3400. !insertmacro: end of _And
  3401. Push: $0
  3402. !insertmacro: GetFileExtCall
  3403. !insertmacro: end of GetFileExtCall
  3404. !insertmacro: _If
  3405. !insertmacro: end of _If
  3406. !insertmacro: _Or
  3407. !insertmacro: end of _Or
  3408. !insertmacro: _And
  3409. !insertmacro: end of _And
  3410. !insertmacro: _Or
  3411. !insertmacro: end of _Or
  3412. Pop: $0
  3413. !insertmacro: GetFileNameCall
  3414. !insertmacro: end of GetFileNameCall
  3415. !insertmacro: end of ForEachPath
  3416. Delete: "$4"
  3417. !insertmacro: NextPath
  3418. !undef: "_ForEachPath_Open"
  3419. !insertmacro: _Else
  3420. !insertmacro: end of _Else
  3421. Pop: $0
  3422. !insertmacro: _EndIf
  3423. !insertmacro: end of _EndIf
  3424. !insertmacro: _EndIf
  3425. !insertmacro: end of _EndIf
  3426. !insertmacro: _Loop
  3427. !insertmacro: end of _Loop
  3428. !insertmacro: _If
  3429. !insertmacro: end of _If
  3430. FindClose: $_FEP_FindHandle
  3431. StrCpy $_FEP_FindHandle "" () ()
  3432. !insertmacro: _EndIf
  3433. !insertmacro: end of _EndIf
  3434. !insertmacro: end of NextPath
  3435. StrCpy $7 "in-package-done" () ()
  3436. !insertmacro: _EndIf
  3437. !insertmacro: end of _EndIf
  3438. !insertmacro: _EndIf
  3439. !insertmacro: end of _EndIf
  3440. !insertmacro: GetParentCall
  3441. !insertmacro: end of GetParentCall
  3442. !insertmacro: _If
  3443. !insertmacro: end of _If
  3444. CreateDirectory: "$4"
  3445. !insertmacro: WriteRuntimeData
  3446. WriteINIStr: [FilesMove] RemoveIfEmpty:$4=true in $DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini
  3447. WriteINIStr: [FilesMove] RemoveIfEmpty:$4=true in $PLUGINSDIR\runtimedata.ini
  3448. !insertmacro: end of WriteRuntimeData
  3449. !insertmacro: _EndIf
  3450. !insertmacro: end of _EndIf
  3451. !insertmacro: _If
  3452. !insertmacro: end of _If
  3453. !insertmacro: ForEachPath
  3454. !define: "_ForEachPath_Open"=""
  3455. !insertmacro: SplitAfterWildCard
  3456. Push: $0
  3457. !insertmacro: CallArtificialFunction
  3458. !define: "CallArtificialFunction_TYPE"="inst"
  3459. Call ":.SplitAfterWildCard_inst"
  3460. !undef: "CallArtificialFunction_TYPE"
  3461. !insertmacro: end of CallArtificialFunction
  3462. Pop: $_FEP_WildCardChild
  3463. Pop: $_FEP_WildCardPath
  3464. !insertmacro: end of SplitAfterWildCard
  3465. !insertmacro: GetParentCall
  3466. !insertmacro: end of GetParentCall
  3467. !insertmacro: GetFileExtCall
  3468. !insertmacro: end of GetFileExtCall
  3469. StrCpy $2 "" () ()
  3470. !insertmacro: _Do
  3471. !insertmacro: end of _Do
  3472. ClearErrors
  3473. !insertmacro: _If
  3474. !insertmacro: end of _If
  3475. StrCpy $3 "$0" () ()
  3476. !insertmacro: _IfNotThen
  3477. !insertmacro: end of _IfNotThen
  3478. !insertmacro: _Else
  3479. !insertmacro: end of _Else
  3480. !insertmacro: _If
  3481. !insertmacro: end of _If
  3482. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  3483. !insertmacro: _Else
  3484. !insertmacro: end of _Else
  3485. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  3486. !insertmacro: _EndIf
  3487. !insertmacro: end of _EndIf
  3488. StrCpy $3 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  3489. !insertmacro: _EndIf
  3490. !insertmacro: end of _EndIf
  3491. !insertmacro: _If
  3492. !insertmacro: end of _If
  3493. !insertmacro: _IfThen
  3494. !insertmacro: end of _IfThen
  3495. !insertmacro: _Goto
  3496. !insertmacro: end of _Goto
  3497. !insertmacro: _EndIf
  3498. !insertmacro: end of _EndIf
  3499. !insertmacro: _If
  3500. !insertmacro: end of _If
  3501. !insertmacro: _And
  3502. !insertmacro: end of _And
  3503. Push: $0
  3504. !insertmacro: GetFileExtCall
  3505. !insertmacro: end of GetFileExtCall
  3506. !insertmacro: _If
  3507. !insertmacro: end of _If
  3508. !insertmacro: _Or
  3509. !insertmacro: end of _Or
  3510. !insertmacro: _And
  3511. !insertmacro: end of _And
  3512. !insertmacro: _Or
  3513. !insertmacro: end of _Or
  3514. Pop: $0
  3515. !insertmacro: GetFileNameCall
  3516. !insertmacro: end of GetFileNameCall
  3517. !insertmacro: end of ForEachPath
  3518. !insertmacro: DebugMsg
  3519. !insertmacro: !getdebug
  3520. !insertmacro: end of !getdebug
  3521. !insertmacro: end of DebugMsg
  3522. !insertmacro: GetRootCall
  3523. !insertmacro: end of GetRootCall
  3524. !insertmacro: GetRootCall
  3525. !insertmacro: end of GetRootCall
  3526. !insertmacro: _If
  3527. !insertmacro: end of _If
  3528. Rename: $3->$4\$2
  3529. !insertmacro: _Else
  3530. !insertmacro: end of _Else
  3531. CopyFiles: (silent) "$3" -> "$4\$2", size=0KB
  3532. !insertmacro: _EndIf
  3533. !insertmacro: end of _EndIf
  3534. !insertmacro: NextPath
  3535. !undef: "_ForEachPath_Open"
  3536. !insertmacro: _Else
  3537. !insertmacro: end of _Else
  3538. Pop: $0
  3539. !insertmacro: _EndIf
  3540. !insertmacro: end of _EndIf
  3541. !insertmacro: _EndIf
  3542. !insertmacro: end of _EndIf
  3543. !insertmacro: _Loop
  3544. !insertmacro: end of _Loop
  3545. !insertmacro: _If
  3546. !insertmacro: end of _If
  3547. FindClose: $_FEP_FindHandle
  3548. StrCpy $_FEP_FindHandle "" () ()
  3549. !insertmacro: _EndIf
  3550. !insertmacro: end of _EndIf
  3551. !insertmacro: end of NextPath
  3552. !insertmacro: _EndIf
  3553. !insertmacro: end of _EndIf
  3554. !insertmacro: NextINIPair
  3555. !undef: "_ForEachINIPair_Open"
  3556. !insertmacro: _EndIf
  3557. !insertmacro: end of _EndIf
  3558. !insertmacro: _Loop
  3559. !insertmacro: end of _Loop
  3560. !insertmacro: _EndIf
  3561. !insertmacro: end of _EndIf
  3562. !insertmacro: end of NextINIPair
  3563. !insertmacro: end of FilesMove.nsh_PrePrimary
  3564. !insertmacro: end of RunSegment
  3565. !insertmacro: RunSegment
  3566. !insertmacro: !getdebug
  3567. !insertmacro: end of !getdebug
  3568. !insertmacro: DirectoriesMove.nsh_PrePrimary
  3569. !insertmacro: ForEachINIPair
  3570. !define: "_ForEachINIPair_Open"=""
  3571. !insertmacro: _If
  3572. !insertmacro: end of _If
  3573. FileOpen: $LauncherFile as r -> $_FEIP_FileHandle
  3574. !insertmacro: _Else
  3575. !insertmacro: end of _Else
  3576. FileSeek: fp=$_FEIP_FileHandle, ofs=0, mode=SET, output=
  3577. !insertmacro: _EndIf
  3578. !insertmacro: end of _EndIf
  3579. !insertmacro: _Do
  3580. !insertmacro: end of _Do
  3581. ClearErrors
  3582. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  3583. !insertmacro: TrimNewLinesCall
  3584. !insertmacro: end of TrimNewLinesCall
  3585. !insertmacro: _If
  3586. !insertmacro: end of _If
  3587. !insertmacro: _Or
  3588. !insertmacro: end of _Or
  3589. !insertmacro: _Goto
  3590. !insertmacro: end of _Goto
  3591. !insertmacro: _EndIf
  3592. !insertmacro: end of _EndIf
  3593. !insertmacro: _Loop
  3594. !insertmacro: end of _Loop
  3595. !insertmacro: _If
  3596. !insertmacro: end of _If
  3597. !insertmacro: _Do
  3598. !insertmacro: end of _Do
  3599. ClearErrors
  3600. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  3601. StrCpy $_FEIP_LineLength "$_FEIP_Line" (1) ()
  3602. !insertmacro: _If
  3603. !insertmacro: end of _If
  3604. !insertmacro: _Or
  3605. !insertmacro: end of _Or
  3606. !insertmacro: _Goto
  3607. !insertmacro: end of _Goto
  3608. !insertmacro: _EndIf
  3609. !insertmacro: end of _EndIf
  3610. !insertmacro: _If
  3611. !insertmacro: end of _If
  3612. !insertmacro: _Goto
  3613. !insertmacro: end of _Goto
  3614. !insertmacro: _EndIf
  3615. !insertmacro: end of _EndIf
  3616. StrLen $_FEIP_LineLength "$_FEIP_Line"
  3617. StrCpy $_FEIP_CharNum "0" () ()
  3618. !insertmacro: _Do
  3619. !insertmacro: end of _Do
  3620. StrCpy $_FEIP_Char "$_FEIP_Line" (1) ($_FEIP_CharNum)
  3621. !insertmacro: _IfThen
  3622. !insertmacro: end of _IfThen
  3623. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  3624. !insertmacro: _Loop
  3625. !insertmacro: end of _Loop
  3626. !insertmacro: TrimNewLinesCall
  3627. !insertmacro: end of TrimNewLinesCall
  3628. !insertmacro: _If
  3629. !insertmacro: end of _If
  3630. StrCpy $0 "$_FEIP_Line" ($_FEIP_CharNum) ()
  3631. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  3632. StrCpy $1 "$_FEIP_Line" () ($_FEIP_CharNum)
  3633. !insertmacro: TrimWhiteCall
  3634. Push: $0
  3635. !insertmacro: CallArtificialFunction
  3636. !define: "CallArtificialFunction_TYPE"="inst"
  3637. Call ":.TrimWhite_inst"
  3638. !undef: "CallArtificialFunction_TYPE"
  3639. !insertmacro: end of CallArtificialFunction
  3640. Pop: $0
  3641. !insertmacro: end of TrimWhiteCall
  3642. !insertmacro: TrimWhiteCall
  3643. Push: $1
  3644. !insertmacro: CallArtificialFunction
  3645. !define: "CallArtificialFunction_TYPE"="inst"
  3646. Call ":.TrimWhite_inst"
  3647. !undef: "CallArtificialFunction_TYPE"
  3648. !insertmacro: end of CallArtificialFunction
  3649. Pop: $1
  3650. !insertmacro: end of TrimWhiteCall
  3651. StrCpy $_FEIP_CharNum "$1" (1) ()
  3652. StrCpy $_FEIP_Char "$1" () (-1)
  3653. !insertmacro: _If
  3654. !insertmacro: end of _If
  3655. !insertmacro: _If
  3656. !insertmacro: end of _If
  3657. !insertmacro: _Or
  3658. !insertmacro: end of _Or
  3659. StrCpy $1 "$1" (-1) (1)
  3660. !insertmacro: _EndIf
  3661. !insertmacro: end of _EndIf
  3662. !insertmacro: _EndIf
  3663. !insertmacro: end of _EndIf
  3664. !insertmacro: end of ForEachINIPair
  3665. !insertmacro: _DirectoriesMove_Start
  3666. !insertmacro: _IfThen
  3667. !insertmacro: end of _IfThen
  3668. !insertmacro: ParseLocations
  3669. !insertmacro: !getdebug
  3670. !insertmacro: end of !getdebug
  3671. ExpandEnvStrings: $1->$1
  3672. !insertmacro: DebugMsg
  3673. !insertmacro: !getdebug
  3674. !insertmacro: end of !getdebug
  3675. !insertmacro: end of DebugMsg
  3676. !insertmacro: end of ParseLocations
  3677. !insertmacro: end of _DirectoriesMove_Start
  3678. !insertmacro: _If
  3679. !insertmacro: end of _If
  3680. MessageBox: 16: "DON'T YOU DARE DO THAT! (You can't [DirectoriesMove] settings)"
  3681. !insertmacro: _EndIf
  3682. !insertmacro: end of _EndIf
  3683. StrLen $R0 "$EXEDIR"
  3684. StrCpy $R0 "$1" ($R0) ()
  3685. !insertmacro: _If
  3686. !insertmacro: end of _If
  3687. StrCpy $7 "in-package" () ()
  3688. !insertmacro: _Else
  3689. !insertmacro: end of _Else
  3690. StrCpy $7 "not-in-package" () ()
  3691. !insertmacro: _EndIf
  3692. !insertmacro: end of _EndIf
  3693. !insertmacro: _If
  3694. !insertmacro: end of _If
  3695. !insertmacro: ForEachPath
  3696. !define: "_ForEachPath_Open"=""
  3697. !insertmacro: SplitAfterWildCard
  3698. Push: $1
  3699. !insertmacro: CallArtificialFunction
  3700. !define: "CallArtificialFunction_TYPE"="inst"
  3701. Call ":.SplitAfterWildCard_inst"
  3702. !undef: "CallArtificialFunction_TYPE"
  3703. !insertmacro: end of CallArtificialFunction
  3704. Pop: $_FEP_WildCardChild
  3705. Pop: $_FEP_WildCardPath
  3706. !insertmacro: end of SplitAfterWildCard
  3707. !insertmacro: GetParentCall
  3708. !insertmacro: end of GetParentCall
  3709. !insertmacro: GetFileExtCall
  3710. !insertmacro: end of GetFileExtCall
  3711. StrCpy $3 "" () ()
  3712. !insertmacro: _Do
  3713. !insertmacro: end of _Do
  3714. ClearErrors
  3715. !insertmacro: _If
  3716. !insertmacro: end of _If
  3717. StrCpy $4 "$1" () ()
  3718. !insertmacro: _IfNotThen
  3719. !insertmacro: end of _IfNotThen
  3720. !insertmacro: _Else
  3721. !insertmacro: end of _Else
  3722. !insertmacro: _If
  3723. !insertmacro: end of _If
  3724. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  3725. !insertmacro: _Else
  3726. !insertmacro: end of _Else
  3727. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  3728. !insertmacro: _EndIf
  3729. !insertmacro: end of _EndIf
  3730. StrCpy $4 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  3731. !insertmacro: _EndIf
  3732. !insertmacro: end of _EndIf
  3733. !insertmacro: _If
  3734. !insertmacro: end of _If
  3735. !insertmacro: _IfThen
  3736. !insertmacro: end of _IfThen
  3737. !insertmacro: _Goto
  3738. !insertmacro: end of _Goto
  3739. !insertmacro: _EndIf
  3740. !insertmacro: end of _EndIf
  3741. !insertmacro: _If
  3742. !insertmacro: end of _If
  3743. !insertmacro: _And
  3744. !insertmacro: end of _And
  3745. !insertmacro: _And
  3746. !insertmacro: end of _And
  3747. Push: $0
  3748. !insertmacro: GetFileExtCall
  3749. !insertmacro: end of GetFileExtCall
  3750. !insertmacro: _If
  3751. !insertmacro: end of _If
  3752. !insertmacro: _Or
  3753. !insertmacro: end of _Or
  3754. !insertmacro: _And
  3755. !insertmacro: end of _And
  3756. !insertmacro: _Or
  3757. !insertmacro: end of _Or
  3758. Pop: $0
  3759. !insertmacro: GetFileNameCall
  3760. !insertmacro: end of GetFileNameCall
  3761. !insertmacro: end of ForEachPath
  3762. !insertmacro: DebugMsg
  3763. !insertmacro: !getdebug
  3764. !insertmacro: end of !getdebug
  3765. !insertmacro: end of DebugMsg
  3766. Rename: $4->$4.BackupBy$AppID
  3767. !insertmacro: NextPath
  3768. !undef: "_ForEachPath_Open"
  3769. !insertmacro: _Else
  3770. !insertmacro: end of _Else
  3771. Pop: $0
  3772. !insertmacro: _EndIf
  3773. !insertmacro: end of _EndIf
  3774. !insertmacro: _EndIf
  3775. !insertmacro: end of _EndIf
  3776. !insertmacro: _Loop
  3777. !insertmacro: end of _Loop
  3778. !insertmacro: _If
  3779. !insertmacro: end of _If
  3780. FindClose: $_FEP_FindHandle
  3781. StrCpy $_FEP_FindHandle "" () ()
  3782. !insertmacro: _EndIf
  3783. !insertmacro: end of _EndIf
  3784. !insertmacro: end of NextPath
  3785. !insertmacro: _ElseIf
  3786. !insertmacro: end of _ElseIf
  3787. !insertmacro: ForEachPath
  3788. !define: "_ForEachPath_Open"=""
  3789. !insertmacro: SplitAfterWildCard
  3790. Push: $1
  3791. !insertmacro: CallArtificialFunction
  3792. !define: "CallArtificialFunction_TYPE"="inst"
  3793. Call ":.SplitAfterWildCard_inst"
  3794. !undef: "CallArtificialFunction_TYPE"
  3795. !insertmacro: end of CallArtificialFunction
  3796. Pop: $_FEP_WildCardChild
  3797. Pop: $_FEP_WildCardPath
  3798. !insertmacro: end of SplitAfterWildCard
  3799. !insertmacro: GetParentCall
  3800. !insertmacro: end of GetParentCall
  3801. !insertmacro: GetFileExtCall
  3802. !insertmacro: end of GetFileExtCall
  3803. StrCpy $3 "" () ()
  3804. !insertmacro: _Do
  3805. !insertmacro: end of _Do
  3806. ClearErrors
  3807. !insertmacro: _If
  3808. !insertmacro: end of _If
  3809. StrCpy $4 "$1" () ()
  3810. !insertmacro: _IfNotThen
  3811. !insertmacro: end of _IfNotThen
  3812. !insertmacro: _Else
  3813. !insertmacro: end of _Else
  3814. !insertmacro: _If
  3815. !insertmacro: end of _If
  3816. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  3817. !insertmacro: _Else
  3818. !insertmacro: end of _Else
  3819. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  3820. !insertmacro: _EndIf
  3821. !insertmacro: end of _EndIf
  3822. StrCpy $4 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  3823. !insertmacro: _EndIf
  3824. !insertmacro: end of _EndIf
  3825. !insertmacro: _If
  3826. !insertmacro: end of _If
  3827. !insertmacro: _IfThen
  3828. !insertmacro: end of _IfThen
  3829. !insertmacro: _Goto
  3830. !insertmacro: end of _Goto
  3831. !insertmacro: _EndIf
  3832. !insertmacro: end of _EndIf
  3833. !insertmacro: _If
  3834. !insertmacro: end of _If
  3835. !insertmacro: _And
  3836. !insertmacro: end of _And
  3837. !insertmacro: _And
  3838. !insertmacro: end of _And
  3839. Push: $0
  3840. !insertmacro: GetFileExtCall
  3841. !insertmacro: end of GetFileExtCall
  3842. !insertmacro: _If
  3843. !insertmacro: end of _If
  3844. !insertmacro: _Or
  3845. !insertmacro: end of _Or
  3846. !insertmacro: _And
  3847. !insertmacro: end of _And
  3848. !insertmacro: _Or
  3849. !insertmacro: end of _Or
  3850. Pop: $0
  3851. !insertmacro: GetFileNameCall
  3852. !insertmacro: end of GetFileNameCall
  3853. !insertmacro: end of ForEachPath
  3854. !insertmacro: _Goto
  3855. !insertmacro: end of _Goto
  3856. !insertmacro: NextPath
  3857. !undef: "_ForEachPath_Open"
  3858. !insertmacro: _Else
  3859. !insertmacro: end of _Else
  3860. Pop: $0
  3861. !insertmacro: _EndIf
  3862. !insertmacro: end of _EndIf
  3863. !insertmacro: _EndIf
  3864. !insertmacro: end of _EndIf
  3865. !insertmacro: _Loop
  3866. !insertmacro: end of _Loop
  3867. !insertmacro: _If
  3868. !insertmacro: end of _If
  3869. FindClose: $_FEP_FindHandle
  3870. StrCpy $_FEP_FindHandle "" () ()
  3871. !insertmacro: _EndIf
  3872. !insertmacro: end of _EndIf
  3873. !insertmacro: end of NextPath
  3874. !insertmacro: _If
  3875. !insertmacro: end of _If
  3876. !insertmacro: DebugMsg
  3877. !insertmacro: !getdebug
  3878. !insertmacro: end of !getdebug
  3879. !insertmacro: end of DebugMsg
  3880. !insertmacro: ForEachPath
  3881. !define: "_ForEachPath_Open"=""
  3882. !insertmacro: SplitAfterWildCard
  3883. Push: $0
  3884. !insertmacro: CallArtificialFunction
  3885. !define: "CallArtificialFunction_TYPE"="inst"
  3886. Call ":.SplitAfterWildCard_inst"
  3887. !undef: "CallArtificialFunction_TYPE"
  3888. !insertmacro: end of CallArtificialFunction
  3889. Pop: $_FEP_WildCardChild
  3890. Pop: $_FEP_WildCardPath
  3891. !insertmacro: end of SplitAfterWildCard
  3892. !insertmacro: GetParentCall
  3893. !insertmacro: end of GetParentCall
  3894. !insertmacro: GetFileExtCall
  3895. !insertmacro: end of GetFileExtCall
  3896. StrCpy $3 "" () ()
  3897. !insertmacro: _Do
  3898. !insertmacro: end of _Do
  3899. ClearErrors
  3900. !insertmacro: _If
  3901. !insertmacro: end of _If
  3902. StrCpy $4 "$0" () ()
  3903. !insertmacro: _IfNotThen
  3904. !insertmacro: end of _IfNotThen
  3905. !insertmacro: _Else
  3906. !insertmacro: end of _Else
  3907. !insertmacro: _If
  3908. !insertmacro: end of _If
  3909. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  3910. !insertmacro: _Else
  3911. !insertmacro: end of _Else
  3912. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  3913. !insertmacro: _EndIf
  3914. !insertmacro: end of _EndIf
  3915. StrCpy $4 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  3916. !insertmacro: _EndIf
  3917. !insertmacro: end of _EndIf
  3918. !insertmacro: _If
  3919. !insertmacro: end of _If
  3920. !insertmacro: _IfThen
  3921. !insertmacro: end of _IfThen
  3922. !insertmacro: _Goto
  3923. !insertmacro: end of _Goto
  3924. !insertmacro: _EndIf
  3925. !insertmacro: end of _EndIf
  3926. !insertmacro: _If
  3927. !insertmacro: end of _If
  3928. !insertmacro: _And
  3929. !insertmacro: end of _And
  3930. !insertmacro: _And
  3931. !insertmacro: end of _And
  3932. Push: $0
  3933. !insertmacro: GetFileExtCall
  3934. !insertmacro: end of GetFileExtCall
  3935. !insertmacro: _If
  3936. !insertmacro: end of _If
  3937. !insertmacro: _Or
  3938. !insertmacro: end of _Or
  3939. !insertmacro: _And
  3940. !insertmacro: end of _And
  3941. !insertmacro: _Or
  3942. !insertmacro: end of _Or
  3943. Pop: $0
  3944. !insertmacro: GetFileNameCall
  3945. !insertmacro: end of GetFileNameCall
  3946. !insertmacro: end of ForEachPath
  3947. RMDir: /r "$4"
  3948. !insertmacro: NextPath
  3949. !undef: "_ForEachPath_Open"
  3950. !insertmacro: _Else
  3951. !insertmacro: end of _Else
  3952. Pop: $0
  3953. !insertmacro: _EndIf
  3954. !insertmacro: end of _EndIf
  3955. !insertmacro: _EndIf
  3956. !insertmacro: end of _EndIf
  3957. !insertmacro: _Loop
  3958. !insertmacro: end of _Loop
  3959. !insertmacro: _If
  3960. !insertmacro: end of _If
  3961. FindClose: $_FEP_FindHandle
  3962. StrCpy $_FEP_FindHandle "" () ()
  3963. !insertmacro: _EndIf
  3964. !insertmacro: end of _EndIf
  3965. !insertmacro: end of NextPath
  3966. StrCpy $7 "in-package-done" () ()
  3967. !insertmacro: _EndIf
  3968. !insertmacro: end of _EndIf
  3969. !insertmacro: _EndIf
  3970. !insertmacro: end of _EndIf
  3971. !insertmacro: _If
  3972. !insertmacro: end of _If
  3973. !insertmacro: _If
  3974. !insertmacro: end of _If
  3975. CreateDirectory: "$1"
  3976. !insertmacro: DebugMsg
  3977. !insertmacro: !getdebug
  3978. !insertmacro: end of !getdebug
  3979. !insertmacro: end of DebugMsg
  3980. !insertmacro: _EndIf
  3981. !insertmacro: end of _EndIf
  3982. !insertmacro: _ElseIf
  3983. !insertmacro: end of _ElseIf
  3984. !insertmacro: GetParentCall
  3985. !insertmacro: end of GetParentCall
  3986. !insertmacro: _If
  3987. !insertmacro: end of _If
  3988. CreateDirectory: "$4"
  3989. !insertmacro: WriteRuntimeData
  3990. WriteINIStr: [DirectoriesMove] RemoveIfEmpty:$4=true in $DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini
  3991. WriteINIStr: [DirectoriesMove] RemoveIfEmpty:$4=true in $PLUGINSDIR\runtimedata.ini
  3992. !insertmacro: end of WriteRuntimeData
  3993. !insertmacro: _EndIf
  3994. !insertmacro: end of _EndIf
  3995. !insertmacro: ForEachPath
  3996. !define: "_ForEachPath_Open"=""
  3997. !insertmacro: SplitAfterWildCard
  3998. Push: $0
  3999. !insertmacro: CallArtificialFunction
  4000. !define: "CallArtificialFunction_TYPE"="inst"
  4001. Call ":.SplitAfterWildCard_inst"
  4002. !undef: "CallArtificialFunction_TYPE"
  4003. !insertmacro: end of CallArtificialFunction
  4004. Pop: $_FEP_WildCardChild
  4005. Pop: $_FEP_WildCardPath
  4006. !insertmacro: end of SplitAfterWildCard
  4007. !insertmacro: GetParentCall
  4008. !insertmacro: end of GetParentCall
  4009. !insertmacro: GetFileExtCall
  4010. !insertmacro: end of GetFileExtCall
  4011. StrCpy $2 "" () ()
  4012. !insertmacro: _Do
  4013. !insertmacro: end of _Do
  4014. ClearErrors
  4015. !insertmacro: _If
  4016. !insertmacro: end of _If
  4017. StrCpy $3 "$0" () ()
  4018. !insertmacro: _IfNotThen
  4019. !insertmacro: end of _IfNotThen
  4020. !insertmacro: _Else
  4021. !insertmacro: end of _Else
  4022. !insertmacro: _If
  4023. !insertmacro: end of _If
  4024. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  4025. !insertmacro: _Else
  4026. !insertmacro: end of _Else
  4027. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  4028. !insertmacro: _EndIf
  4029. !insertmacro: end of _EndIf
  4030. StrCpy $3 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  4031. !insertmacro: _EndIf
  4032. !insertmacro: end of _EndIf
  4033. !insertmacro: _If
  4034. !insertmacro: end of _If
  4035. !insertmacro: _IfThen
  4036. !insertmacro: end of _IfThen
  4037. !insertmacro: _Goto
  4038. !insertmacro: end of _Goto
  4039. !insertmacro: _EndIf
  4040. !insertmacro: end of _EndIf
  4041. !insertmacro: _If
  4042. !insertmacro: end of _If
  4043. !insertmacro: _And
  4044. !insertmacro: end of _And
  4045. !insertmacro: _And
  4046. !insertmacro: end of _And
  4047. Push: $0
  4048. !insertmacro: GetFileExtCall
  4049. !insertmacro: end of GetFileExtCall
  4050. !insertmacro: _If
  4051. !insertmacro: end of _If
  4052. !insertmacro: _Or
  4053. !insertmacro: end of _Or
  4054. !insertmacro: _And
  4055. !insertmacro: end of _And
  4056. !insertmacro: _Or
  4057. !insertmacro: end of _Or
  4058. Pop: $0
  4059. !insertmacro: GetFileNameCall
  4060. !insertmacro: end of GetFileNameCall
  4061. !insertmacro: end of ForEachPath
  4062. !insertmacro: _IfNotThen
  4063. !insertmacro: end of _IfNotThen
  4064. !insertmacro: GetRootCall
  4065. !insertmacro: end of GetRootCall
  4066. !insertmacro: GetRootCall
  4067. !insertmacro: end of GetRootCall
  4068. !insertmacro: _If
  4069. !insertmacro: end of _If
  4070. !insertmacro: DebugMsg
  4071. !insertmacro: !getdebug
  4072. !insertmacro: end of !getdebug
  4073. !insertmacro: end of DebugMsg
  4074. Rename: $3->$4\$2
  4075. !insertmacro: _Else
  4076. !insertmacro: end of _Else
  4077. !insertmacro: DebugMsg
  4078. !insertmacro: !getdebug
  4079. !insertmacro: end of !getdebug
  4080. !insertmacro: end of DebugMsg
  4081. CreateDirectory: "$4\$2"
  4082. CopyFiles: (silent) "$3\*.*" -> "$4\$2", size=0KB
  4083. !insertmacro: _EndIf
  4084. !insertmacro: end of _EndIf
  4085. !insertmacro: NextPath
  4086. !undef: "_ForEachPath_Open"
  4087. !insertmacro: _Else
  4088. !insertmacro: end of _Else
  4089. Pop: $0
  4090. !insertmacro: _EndIf
  4091. !insertmacro: end of _EndIf
  4092. !insertmacro: _EndIf
  4093. !insertmacro: end of _EndIf
  4094. !insertmacro: _Loop
  4095. !insertmacro: end of _Loop
  4096. !insertmacro: _If
  4097. !insertmacro: end of _If
  4098. FindClose: $_FEP_FindHandle
  4099. StrCpy $_FEP_FindHandle "" () ()
  4100. !insertmacro: _EndIf
  4101. !insertmacro: end of _EndIf
  4102. !insertmacro: end of NextPath
  4103. !insertmacro: _If
  4104. !insertmacro: end of _If
  4105. !insertmacro: _IfNotThen
  4106. !insertmacro: end of _IfNotThen
  4107. !insertmacro: !getdebug
  4108. !insertmacro: end of !getdebug
  4109. !insertmacro: _EndIf
  4110. !insertmacro: end of _EndIf
  4111. !insertmacro: _EndIf
  4112. !insertmacro: end of _EndIf
  4113. !insertmacro: NextINIPair
  4114. !undef: "_ForEachINIPair_Open"
  4115. !insertmacro: _EndIf
  4116. !insertmacro: end of _EndIf
  4117. !insertmacro: _Loop
  4118. !insertmacro: end of _Loop
  4119. !insertmacro: _EndIf
  4120. !insertmacro: end of _EndIf
  4121. !insertmacro: end of NextINIPair
  4122. !insertmacro: end of DirectoriesMove.nsh_PrePrimary
  4123. !insertmacro: end of RunSegment
  4124. !insertmacro: RunSegment
  4125. !insertmacro: !getdebug
  4126. !insertmacro: end of !getdebug
  4127. !insertmacro: RegistryKeys.nsh_PrePrimary
  4128. !insertmacro: _If
  4129. !insertmacro: end of _If
  4130. !insertmacro: ForEachINIPair
  4131. !define: "_ForEachINIPair_Open"=""
  4132. !insertmacro: _If
  4133. !insertmacro: end of _If
  4134. FileOpen: $LauncherFile as r -> $_FEIP_FileHandle
  4135. !insertmacro: _Else
  4136. !insertmacro: end of _Else
  4137. FileSeek: fp=$_FEIP_FileHandle, ofs=0, mode=SET, output=
  4138. !insertmacro: _EndIf
  4139. !insertmacro: end of _EndIf
  4140. !insertmacro: _Do
  4141. !insertmacro: end of _Do
  4142. ClearErrors
  4143. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  4144. !insertmacro: TrimNewLinesCall
  4145. !insertmacro: end of TrimNewLinesCall
  4146. !insertmacro: _If
  4147. !insertmacro: end of _If
  4148. !insertmacro: _Or
  4149. !insertmacro: end of _Or
  4150. !insertmacro: _Goto
  4151. !insertmacro: end of _Goto
  4152. !insertmacro: _EndIf
  4153. !insertmacro: end of _EndIf
  4154. !insertmacro: _Loop
  4155. !insertmacro: end of _Loop
  4156. !insertmacro: _If
  4157. !insertmacro: end of _If
  4158. !insertmacro: _Do
  4159. !insertmacro: end of _Do
  4160. ClearErrors
  4161. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  4162. StrCpy $_FEIP_LineLength "$_FEIP_Line" (1) ()
  4163. !insertmacro: _If
  4164. !insertmacro: end of _If
  4165. !insertmacro: _Or
  4166. !insertmacro: end of _Or
  4167. !insertmacro: _Goto
  4168. !insertmacro: end of _Goto
  4169. !insertmacro: _EndIf
  4170. !insertmacro: end of _EndIf
  4171. !insertmacro: _If
  4172. !insertmacro: end of _If
  4173. !insertmacro: _Goto
  4174. !insertmacro: end of _Goto
  4175. !insertmacro: _EndIf
  4176. !insertmacro: end of _EndIf
  4177. StrLen $_FEIP_LineLength "$_FEIP_Line"
  4178. StrCpy $_FEIP_CharNum "0" () ()
  4179. !insertmacro: _Do
  4180. !insertmacro: end of _Do
  4181. StrCpy $_FEIP_Char "$_FEIP_Line" (1) ($_FEIP_CharNum)
  4182. !insertmacro: _IfThen
  4183. !insertmacro: end of _IfThen
  4184. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  4185. !insertmacro: _Loop
  4186. !insertmacro: end of _Loop
  4187. !insertmacro: TrimNewLinesCall
  4188. !insertmacro: end of TrimNewLinesCall
  4189. !insertmacro: _If
  4190. !insertmacro: end of _If
  4191. StrCpy $0 "$_FEIP_Line" ($_FEIP_CharNum) ()
  4192. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  4193. StrCpy $1 "$_FEIP_Line" () ($_FEIP_CharNum)
  4194. !insertmacro: TrimWhiteCall
  4195. Push: $0
  4196. !insertmacro: CallArtificialFunction
  4197. !define: "CallArtificialFunction_TYPE"="inst"
  4198. Call ":.TrimWhite_inst"
  4199. !undef: "CallArtificialFunction_TYPE"
  4200. !insertmacro: end of CallArtificialFunction
  4201. Pop: $0
  4202. !insertmacro: end of TrimWhiteCall
  4203. !insertmacro: TrimWhiteCall
  4204. Push: $1
  4205. !insertmacro: CallArtificialFunction
  4206. !define: "CallArtificialFunction_TYPE"="inst"
  4207. Call ":.TrimWhite_inst"
  4208. !undef: "CallArtificialFunction_TYPE"
  4209. !insertmacro: end of CallArtificialFunction
  4210. Pop: $1
  4211. !insertmacro: end of TrimWhiteCall
  4212. StrCpy $_FEIP_CharNum "$1" (1) ()
  4213. StrCpy $_FEIP_Char "$1" () (-1)
  4214. !insertmacro: _If
  4215. !insertmacro: end of _If
  4216. !insertmacro: _If
  4217. !insertmacro: end of _If
  4218. !insertmacro: _Or
  4219. !insertmacro: end of _Or
  4220. StrCpy $1 "$1" (-1) (1)
  4221. !insertmacro: _EndIf
  4222. !insertmacro: end of _EndIf
  4223. !insertmacro: _EndIf
  4224. !insertmacro: end of _EndIf
  4225. !insertmacro: end of ForEachINIPair
  4226. !insertmacro: ValidateRegistryKeyCall
  4227. Push: $1
  4228. !insertmacro: CallArtificialFunction
  4229. !define: "CallArtificialFunction_TYPE"="inst"
  4230. Call ":.ValidateRegistryKey_inst"
  4231. Goto: ValidateRegistryKey_inst_DONE
  4232. !define: "ValidateRegistryKey_inst_DEFINED"=""
  4233. !insertmacro: ValidateRegistryKey_
  4234. Exch($0,0)
  4235. Push: $1
  4236. StrCpy $1 "$0" (17) ()
  4237. !insertmacro: _If
  4238. !insertmacro: end of _If
  4239. StrCpy $0 "$0" () (17)
  4240. StrCpy $0 "HKCU\Software\Classes$0" () ()
  4241. !insertmacro: _ElseIf
  4242. !insertmacro: end of _ElseIf
  4243. StrCpy $0 "$0" () (17)
  4244. StrCpy $0 "HKCU$0" () ()
  4245. !insertmacro: _Else
  4246. !insertmacro: end of _Else
  4247. StrCpy $1 "$0" (18) ()
  4248. !insertmacro: _If
  4249. !insertmacro: end of _If
  4250. StrCpy $0 "$0" () (18)
  4251. StrCpy $0 "HKLM$0" () ()
  4252. !insertmacro: _Else
  4253. !insertmacro: end of _Else
  4254. StrCpy $1 "$0" (4) ()
  4255. !insertmacro: _If
  4256. !insertmacro: end of _If
  4257. StrCpy $0 "$0" () (4)
  4258. StrCpy $0 "HKCU\Software\Classes$0" () ()
  4259. !insertmacro: _ElseIf
  4260. !insertmacro: end of _ElseIf
  4261. !insertmacro: _And
  4262. !insertmacro: end of _And
  4263. MessageBox: 16: "Note to portable application developer: registry hive in key "$0" is bad, should start with HKCR, HKCU or HKLM. Please fix this. (The launcher will continue running.)"
  4264. !insertmacro: _EndIf
  4265. !insertmacro: end of _EndIf
  4266. !insertmacro: _EndIf
  4267. !insertmacro: end of _EndIf
  4268. !insertmacro: _EndIf
  4269. !insertmacro: end of _EndIf
  4270. Pop: $1
  4271. Exch($0,0)
  4272. !insertmacro: end of ValidateRegistryKey_
  4273. Return
  4274. !undef: "CallArtificialFunction_TYPE"
  4275. !insertmacro: end of CallArtificialFunction
  4276. Pop: $1
  4277. !insertmacro: end of ValidateRegistryKeyCall
  4278. !insertmacro: _If
  4279. !insertmacro: end of _If
  4280. !insertmacro: _And
  4281. !insertmacro: end of _And
  4282. !insertmacro: DebugMsg
  4283. !insertmacro: !getdebug
  4284. !insertmacro: end of !getdebug
  4285. !insertmacro: end of DebugMsg
  4286. !insertmacro: registry::MoveKey
  4287. !define: "REGISTRY_NSH_VARIABLE"=""
  4288. Var: "REGISTRY_NSH_VARIABLE"
  4289. Plugin Command: _KeyExists $1
  4290. Pop: $R9
  4291. IntCmp $R9:-1 equal=+15, < , >
  4292. File: "registry.dll"->"$PLUGINSDIR\registry.dll" 0/29696 bytes
  4293. Plugin Command: _Read $1
  4294. Pop: $REGISTRY_NSH_VARIABLE
  4295. Pop: $R9
  4296. StrCmp "$R9" "" equal=0, nonequal=+6
  4297. File: "registry.dll"->"$PLUGINSDIR\registry.dll" 0/29696 bytes
  4298. Plugin Command: _Write $1 REG_SZ
  4299. Pop: $R9
  4300. File: "registry.dll"->"$PLUGINSDIR\registry.dll" 0/29696 bytes
  4301. Plugin Command: _DeleteValue $1
  4302. Pop: $R9
  4303. IntCmp $R9:-1 equal=+6, < , > +4
  4304. Plugin Command: _Write $1 $REGISTRY_NSH_VARIABLE $R9
  4305. Pop: $R9
  4306. IntCmp $R9:-1 equal=+3, < , >
  4307. File: "registry.dll"->"$PLUGINSDIR\registry.dll" 0/29696 bytes
  4308. Plugin Command: _MoveKey $1 HKEY_CURRENT_USER\Software\PortableApps.com\Keys\$1
  4309. Pop: $R9
  4310. !insertmacro: end of registry::MoveKey
  4311. !insertmacro: _If
  4312. !insertmacro: end of _If
  4313. !insertmacro: WriteRuntimeData
  4314. WriteINIStr: [FailedRegistryKeys] $0=true in $DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini
  4315. WriteINIStr: [FailedRegistryKeys] $0=true in $PLUGINSDIR\runtimedata.ini
  4316. !insertmacro: end of WriteRuntimeData
  4317. !insertmacro: _EndIf
  4318. !insertmacro: end of _EndIf
  4319. !insertmacro: _EndIf
  4320. !insertmacro: end of _EndIf
  4321. !insertmacro: _If
  4322. !insertmacro: end of _If
  4323. !insertmacro: DebugMsg
  4324. !insertmacro: !getdebug
  4325. !insertmacro: end of !getdebug
  4326. !insertmacro: end of DebugMsg
  4327. !insertmacro: _ElseIf
  4328. !insertmacro: end of _ElseIf
  4329. !insertmacro: DebugMsg
  4330. !insertmacro: !getdebug
  4331. !insertmacro: end of !getdebug
  4332. !insertmacro: end of DebugMsg
  4333. !insertmacro: registry::RestoreKey
  4334. File: "registry.dll"->"$PLUGINSDIR\registry.dll" 0/29696 bytes
  4335. Plugin Command: _RestoreKey $DataDirectory\settings\$0.reg
  4336. Pop: $R9
  4337. IntCmp $R9:-2 equal=0, < 0, > +10
  4338. SetDetailsPrint: none
  4339. IfFileExists: "$SYSDIR\reg.exe" ? 0 : +4
  4340. File: "nsExec.dll"->"$PLUGINSDIR\nsExec.dll" 6144 bytes
  4341. Plugin Command: ExecToStack "$SYSDIR\reg.exe" import "$DataDirectory\settings\$0.reg"
  4342. Pop: $R9
  4343. StrCmp "$R9" "0" equal=+5, nonequal=0
  4344. IfFileExists: "$WINDIR\regedit.exe" ? 0 : +3
  4345. ExecWait: ""$WINDIR\regedit.exe" /s "$DataDirectory\settings\$0.reg"" (->$R9)
  4346. IfErrors ?0:+2
  4347. StrCpy $R9 "-1" () ()
  4348. SetDetailsPrint: lastused
  4349. !insertmacro: end of registry::RestoreKey
  4350. !insertmacro: _If
  4351. !insertmacro: end of _If
  4352. !insertmacro: WriteRuntimeData
  4353. WriteINIStr: [FailedRegistryKeys] $0=true in $DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini
  4354. WriteINIStr: [FailedRegistryKeys] $0=true in $PLUGINSDIR\runtimedata.ini
  4355. !insertmacro: end of WriteRuntimeData
  4356. !insertmacro: !getdebug
  4357. !insertmacro: end of !getdebug
  4358. !insertmacro: DebugMsg
  4359. !insertmacro: !getdebug
  4360. !insertmacro: end of !getdebug
  4361. !insertmacro: end of DebugMsg
  4362. !insertmacro: _EndIf
  4363. !insertmacro: end of _EndIf
  4364. !insertmacro: _Else
  4365. !insertmacro: end of _Else
  4366. !insertmacro: DebugMsg
  4367. !insertmacro: !getdebug
  4368. !insertmacro: end of !getdebug
  4369. !insertmacro: end of DebugMsg
  4370. !insertmacro: _EndIf
  4371. !insertmacro: end of _EndIf
  4372. !insertmacro: NextINIPair
  4373. !undef: "_ForEachINIPair_Open"
  4374. !insertmacro: _EndIf
  4375. !insertmacro: end of _EndIf
  4376. !insertmacro: _Loop
  4377. !insertmacro: end of _Loop
  4378. !insertmacro: _EndIf
  4379. !insertmacro: end of _EndIf
  4380. !insertmacro: end of NextINIPair
  4381. !insertmacro: _EndIf
  4382. !insertmacro: end of _EndIf
  4383. !insertmacro: end of RegistryKeys.nsh_PrePrimary
  4384. !insertmacro: end of RunSegment
  4385. !insertmacro: RunSegment
  4386. !insertmacro: !getdebug
  4387. !insertmacro: end of !getdebug
  4388. !insertmacro: RegistryValueBackupDelete.nsh_PrePrimary
  4389. !insertmacro: _If
  4390. !insertmacro: end of _If
  4391. StrCpy $R0 "1" () ()
  4392. !insertmacro: _Do
  4393. !insertmacro: end of _Do
  4394. ClearErrors
  4395. !insertmacro: ReadLauncherConfig
  4396. ReadINIStr $1 [RegistryValueBackupDelete]:$R0 from $LauncherFile
  4397. !insertmacro: end of ReadLauncherConfig
  4398. !insertmacro: _IfThen
  4399. !insertmacro: end of _IfThen
  4400. !insertmacro: ValidateRegistryKeyCall
  4401. Push: $1
  4402. !insertmacro: CallArtificialFunction
  4403. !define: "CallArtificialFunction_TYPE"="inst"
  4404. Call ":.ValidateRegistryKey_inst"
  4405. !undef: "CallArtificialFunction_TYPE"
  4406. !insertmacro: end of CallArtificialFunction
  4407. Pop: $1
  4408. !insertmacro: end of ValidateRegistryKeyCall
  4409. !insertmacro: GetParentCall
  4410. !insertmacro: end of GetParentCall
  4411. !insertmacro: GetFileNameCall
  4412. !insertmacro: end of GetFileNameCall
  4413. !insertmacro: DebugMsg
  4414. !insertmacro: !getdebug
  4415. !insertmacro: end of !getdebug
  4416. !insertmacro: end of DebugMsg
  4417. !insertmacro: registry::MoveValue
  4418. File: "registry.dll"->"$PLUGINSDIR\registry.dll" 0/29696 bytes
  4419. Plugin Command: _MoveValue $2 $3 HKEY_CURRENT_USER\Software\PortableApps.com\Values $1
  4420. Pop: $R9
  4421. !insertmacro: end of registry::MoveValue
  4422. IntOp: $R0=$R0+1
  4423. !insertmacro: _Loop
  4424. !insertmacro: end of _Loop
  4425. !insertmacro: _EndIf
  4426. !insertmacro: end of _EndIf
  4427. !insertmacro: end of RegistryValueBackupDelete.nsh_PrePrimary
  4428. !insertmacro: end of RunSegment
  4429. !insertmacro: RunSegment
  4430. !insertmacro: !getdebug
  4431. !insertmacro: end of !getdebug
  4432. !insertmacro: RegistryValueWrite.nsh_PrePrimary
  4433. !insertmacro: _If
  4434. !insertmacro: end of _If
  4435. !insertmacro: ForEachINIPair
  4436. !define: "_ForEachINIPair_Open"=""
  4437. !insertmacro: _If
  4438. !insertmacro: end of _If
  4439. FileOpen: $LauncherFile as r -> $_FEIP_FileHandle
  4440. !insertmacro: _Else
  4441. !insertmacro: end of _Else
  4442. FileSeek: fp=$_FEIP_FileHandle, ofs=0, mode=SET, output=
  4443. !insertmacro: _EndIf
  4444. !insertmacro: end of _EndIf
  4445. !insertmacro: _Do
  4446. !insertmacro: end of _Do
  4447. ClearErrors
  4448. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  4449. !insertmacro: TrimNewLinesCall
  4450. !insertmacro: end of TrimNewLinesCall
  4451. !insertmacro: _If
  4452. !insertmacro: end of _If
  4453. !insertmacro: _Or
  4454. !insertmacro: end of _Or
  4455. !insertmacro: _Goto
  4456. !insertmacro: end of _Goto
  4457. !insertmacro: _EndIf
  4458. !insertmacro: end of _EndIf
  4459. !insertmacro: _Loop
  4460. !insertmacro: end of _Loop
  4461. !insertmacro: _If
  4462. !insertmacro: end of _If
  4463. !insertmacro: _Do
  4464. !insertmacro: end of _Do
  4465. ClearErrors
  4466. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  4467. StrCpy $_FEIP_LineLength "$_FEIP_Line" (1) ()
  4468. !insertmacro: _If
  4469. !insertmacro: end of _If
  4470. !insertmacro: _Or
  4471. !insertmacro: end of _Or
  4472. !insertmacro: _Goto
  4473. !insertmacro: end of _Goto
  4474. !insertmacro: _EndIf
  4475. !insertmacro: end of _EndIf
  4476. !insertmacro: _If
  4477. !insertmacro: end of _If
  4478. !insertmacro: _Goto
  4479. !insertmacro: end of _Goto
  4480. !insertmacro: _EndIf
  4481. !insertmacro: end of _EndIf
  4482. StrLen $_FEIP_LineLength "$_FEIP_Line"
  4483. StrCpy $_FEIP_CharNum "0" () ()
  4484. !insertmacro: _Do
  4485. !insertmacro: end of _Do
  4486. StrCpy $_FEIP_Char "$_FEIP_Line" (1) ($_FEIP_CharNum)
  4487. !insertmacro: _IfThen
  4488. !insertmacro: end of _IfThen
  4489. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  4490. !insertmacro: _Loop
  4491. !insertmacro: end of _Loop
  4492. !insertmacro: TrimNewLinesCall
  4493. !insertmacro: end of TrimNewLinesCall
  4494. !insertmacro: _If
  4495. !insertmacro: end of _If
  4496. StrCpy $0 "$_FEIP_Line" ($_FEIP_CharNum) ()
  4497. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  4498. StrCpy $1 "$_FEIP_Line" () ($_FEIP_CharNum)
  4499. !insertmacro: TrimWhiteCall
  4500. Push: $0
  4501. !insertmacro: CallArtificialFunction
  4502. !define: "CallArtificialFunction_TYPE"="inst"
  4503. Call ":.TrimWhite_inst"
  4504. !undef: "CallArtificialFunction_TYPE"
  4505. !insertmacro: end of CallArtificialFunction
  4506. Pop: $0
  4507. !insertmacro: end of TrimWhiteCall
  4508. !insertmacro: TrimWhiteCall
  4509. Push: $1
  4510. !insertmacro: CallArtificialFunction
  4511. !define: "CallArtificialFunction_TYPE"="inst"
  4512. Call ":.TrimWhite_inst"
  4513. !undef: "CallArtificialFunction_TYPE"
  4514. !insertmacro: end of CallArtificialFunction
  4515. Pop: $1
  4516. !insertmacro: end of TrimWhiteCall
  4517. StrCpy $_FEIP_CharNum "$1" (1) ()
  4518. StrCpy $_FEIP_Char "$1" () (-1)
  4519. !insertmacro: _If
  4520. !insertmacro: end of _If
  4521. !insertmacro: _If
  4522. !insertmacro: end of _If
  4523. !insertmacro: _Or
  4524. !insertmacro: end of _Or
  4525. StrCpy $1 "$1" (-1) (1)
  4526. !insertmacro: _EndIf
  4527. !insertmacro: end of _EndIf
  4528. !insertmacro: _EndIf
  4529. !insertmacro: end of _EndIf
  4530. !insertmacro: end of ForEachINIPair
  4531. !insertmacro: ValidateRegistryKeyCall
  4532. Push: $0
  4533. !insertmacro: CallArtificialFunction
  4534. !define: "CallArtificialFunction_TYPE"="inst"
  4535. Call ":.ValidateRegistryKey_inst"
  4536. !undef: "CallArtificialFunction_TYPE"
  4537. !insertmacro: end of CallArtificialFunction
  4538. Pop: $0
  4539. !insertmacro: end of ValidateRegistryKeyCall
  4540. StrCpy $2 "$0" () (-1)
  4541. !insertmacro: _If
  4542. !insertmacro: end of _If
  4543. StrCpy $2 "$0" (-1) ()
  4544. StrCpy $3 "" () ()
  4545. !insertmacro: _Else
  4546. !insertmacro: end of _Else
  4547. !insertmacro: GetParentCall
  4548. !insertmacro: end of GetParentCall
  4549. !insertmacro: GetFileNameCall
  4550. !insertmacro: end of GetFileNameCall
  4551. !insertmacro: _EndIf
  4552. !insertmacro: end of _EndIf
  4553. StrLen $4 "$1"
  4554. StrCpy $5 "0" () ()
  4555. !insertmacro: _Do
  4556. !insertmacro: end of _Do
  4557. StrCpy $6 "$1" (1) ($5)
  4558. !insertmacro: _IfThen
  4559. !insertmacro: end of _IfThen
  4560. IntOp: $5=$5+1
  4561. !insertmacro: _Loop
  4562. !insertmacro: end of _Loop
  4563. !insertmacro: _If
  4564. !insertmacro: end of _If
  4565. StrCpy $4 "$1" ($5) ()
  4566. IntOp: $5=$5+1
  4567. StrCpy $1 "$1" () ($5)
  4568. !insertmacro: _Else
  4569. !insertmacro: end of _Else
  4570. StrCpy $4 "REG_SZ" () ()
  4571. !insertmacro: _EndIf
  4572. !insertmacro: end of _EndIf
  4573. !insertmacro: ParseLocations
  4574. !insertmacro: !getdebug
  4575. !insertmacro: end of !getdebug
  4576. ExpandEnvStrings: $1->$1
  4577. !insertmacro: DebugMsg
  4578. !insertmacro: !getdebug
  4579. !insertmacro: end of !getdebug
  4580. !insertmacro: end of DebugMsg
  4581. !insertmacro: end of ParseLocations
  4582. !insertmacro: DebugMsg
  4583. !insertmacro: !getdebug
  4584. !insertmacro: end of !getdebug
  4585. !insertmacro: end of DebugMsg
  4586. !insertmacro: registry::Write
  4587. Plugin Command: _Write $2 $3 $1 $4
  4588. Pop: $R9
  4589. !insertmacro: end of registry::Write
  4590. !insertmacro: NextINIPair
  4591. !undef: "_ForEachINIPair_Open"
  4592. !insertmacro: _EndIf
  4593. !insertmacro: end of _EndIf
  4594. !insertmacro: _Loop
  4595. !insertmacro: end of _Loop
  4596. !insertmacro: _EndIf
  4597. !insertmacro: end of _EndIf
  4598. !insertmacro: end of NextINIPair
  4599. !insertmacro: _EndIf
  4600. !insertmacro: end of _EndIf
  4601. !insertmacro: end of RegistryValueWrite.nsh_PrePrimary
  4602. !insertmacro: end of RunSegment
  4603. !insertmacro: RunSegment
  4604. !insertmacro: !getdebug
  4605. !insertmacro: end of !getdebug
  4606. !insertmacro: Services.nsh_PrePrimary
  4607. !insertmacro: end of Services.nsh_PrePrimary
  4608. !insertmacro: end of RunSegment
  4609. FunctionEnd
  4610. Function: "PreSecondary"
  4611. !insertmacro: RunSegment
  4612. !insertmacro: end of RunSegment
  4613. FunctionEnd
  4614. Function: "PreExec"
  4615. !insertmacro: RunSegment
  4616. !insertmacro: end of RunSegment
  4617. !insertmacro: RunSegment
  4618. !insertmacro: !getdebug
  4619. !insertmacro: end of !getdebug
  4620. !insertmacro: RefreshShellIcons.nsh_PreExec
  4621. !insertmacro: _If
  4622. !insertmacro: end of _If
  4623. !insertmacro: _Or
  4624. !insertmacro: end of _Or
  4625. !insertmacro: RefreshShellIconsCall
  4626. !insertmacro: end of RefreshShellIconsCall
  4627. !insertmacro: _EndIf
  4628. !insertmacro: end of _EndIf
  4629. !insertmacro: end of RefreshShellIcons.nsh_PreExec
  4630. !insertmacro: end of RunSegment
  4631. !insertmacro: RunSegment
  4632. !insertmacro: !getdebug
  4633. !insertmacro: end of !getdebug
  4634. !insertmacro: WorkingDirectory.nsh_PreExec
  4635. ClearErrors
  4636. !insertmacro: ReadLauncherConfig
  4637. ReadINIStr $0 [Launch]:WorkingDirectory from $LauncherFile
  4638. !insertmacro: end of ReadLauncherConfig
  4639. !insertmacro: _If
  4640. !insertmacro: end of _If
  4641. !insertmacro: ParseLocations
  4642. !insertmacro: !getdebug
  4643. !insertmacro: end of !getdebug
  4644. ExpandEnvStrings: $0->$0
  4645. !insertmacro: DebugMsg
  4646. !insertmacro: !getdebug
  4647. !insertmacro: end of !getdebug
  4648. !insertmacro: end of DebugMsg
  4649. !insertmacro: end of ParseLocations
  4650. !insertmacro: DebugMsg
  4651. !insertmacro: !getdebug
  4652. !insertmacro: end of !getdebug
  4653. !insertmacro: end of DebugMsg
  4654. SetOutPath: "$0"
  4655. !insertmacro: _EndIf
  4656. !insertmacro: end of _EndIf
  4657. !insertmacro: end of WorkingDirectory.nsh_PreExec
  4658. !insertmacro: end of RunSegment
  4659. FunctionEnd
  4660. Function: "PreExecPrimary"
  4661. !insertmacro: RunSegment
  4662. !insertmacro: end of RunSegment
  4663. !insertmacro: RunSegment
  4664. !insertmacro: !getdebug
  4665. !insertmacro: end of !getdebug
  4666. !insertmacro: Core.nsh_PreExecPrimary
  4667. !insertmacro: WriteRuntimeData
  4668. WriteINIStr: [PortableApps.comLauncher] PluginsDir=$PLUGINSDIR in $DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini
  4669. WriteINIStr: [PortableApps.comLauncher] PluginsDir=$PLUGINSDIR in $PLUGINSDIR\runtimedata.ini
  4670. !insertmacro: end of WriteRuntimeData
  4671. !insertmacro: end of Core.nsh_PreExecPrimary
  4672. !insertmacro: end of RunSegment
  4673. !insertmacro: RunSegment
  4674. !insertmacro: !getdebug
  4675. !insertmacro: end of !getdebug
  4676. !insertmacro: SplashScreen.nsh_PreExecPrimary
  4677. ClearErrors
  4678. !insertmacro: ReadLauncherConfig
  4679. ReadINIStr $DisableSplashScreen [Launch]:LaunchAppAfterSplash from $LauncherFile
  4680. !insertmacro: end of ReadLauncherConfig
  4681. !insertmacro: _If
  4682. !insertmacro: end of _If
  4683. File: "newadvsplash.dll"->"$PLUGINSDIR\newadvsplash.dll" 0/8704 bytes
  4684. Plugin Command: stop /WAIT
  4685. !insertmacro: _ElseIf
  4686. !insertmacro: end of _ElseIf
  4687. !insertmacro: _And
  4688. !insertmacro: end of _And
  4689. !insertmacro: InvalidValueError
  4690. MessageBox: 16: "Error: invalid value '$DisableSplashScreen' for [Launch]:LaunchAppAfterSplash. Please refer to the Manual for valid values."
  4691. !insertmacro: end of InvalidValueError
  4692. !insertmacro: _EndIf
  4693. !insertmacro: end of _EndIf
  4694. !insertmacro: end of SplashScreen.nsh_PreExecPrimary
  4695. !insertmacro: end of RunSegment
  4696. FunctionEnd
  4697. Function: "PreExecSecondary"
  4698. !insertmacro: RunSegment
  4699. !insertmacro: end of RunSegment
  4700. FunctionEnd
  4701. Function: "Execute"
  4702. !insertmacro: !getdebug
  4703. !insertmacro: end of !getdebug
  4704. !insertmacro: EmptyWorkingSet
  4705. Plugin Command: Call kernel32::GetCurrentProcess()i.s
  4706. Plugin Command: Call psapi::EmptyWorkingSet(is)
  4707. !insertmacro: end of EmptyWorkingSet
  4708. ClearErrors
  4709. !insertmacro: ReadLauncherConfig
  4710. ReadINIStr $0 [Launch]:HideCommandLineWindow from $LauncherFile
  4711. !insertmacro: end of ReadLauncherConfig
  4712. !insertmacro: _If
  4713. !insertmacro: end of _If
  4714. File: "execDos.dll"->"$PLUGINSDIR\execDos.dll" 5632 bytes
  4715. Plugin Command: exec $ExecString
  4716. Pop: $0
  4717. !insertmacro: _Else
  4718. !insertmacro: end of _Else
  4719. !insertmacro: _If
  4720. !insertmacro: end of _If
  4721. !insertmacro: _And
  4722. !insertmacro: end of _And
  4723. !insertmacro: InvalidValueError
  4724. MessageBox: 16: "Error: invalid value '$0' for [Launch]:HideCommandLineWindow. Please refer to the Manual for valid values."
  4725. !insertmacro: end of InvalidValueError
  4726. !insertmacro: _EndIf
  4727. !insertmacro: end of _EndIf
  4728. !insertmacro: _If
  4729. !insertmacro: end of _If
  4730. ExecWait: "$ExecString" (->)
  4731. !insertmacro: _Else
  4732. !insertmacro: end of _Else
  4733. Exec: "$ExecString" (->)
  4734. !insertmacro: _EndIf
  4735. !insertmacro: end of _EndIf
  4736. !insertmacro: _EndIf
  4737. !insertmacro: end of _EndIf
  4738. !insertmacro: DebugMsg
  4739. !insertmacro: !getdebug
  4740. !insertmacro: end of !getdebug
  4741. !insertmacro: end of DebugMsg
  4742. !insertmacro: _If
  4743. !insertmacro: end of _If
  4744. ClearErrors
  4745. !insertmacro: ReadLauncherConfig
  4746. ReadINIStr $0 [Launch]:WaitForOtherInstances from $LauncherFile
  4747. !insertmacro: end of ReadLauncherConfig
  4748. !insertmacro: _If
  4749. !insertmacro: end of _If
  4750. !insertmacro: _Or
  4751. !insertmacro: end of _Or
  4752. !insertmacro: GetFileNameCall
  4753. !insertmacro: end of GetFileNameCall
  4754. !insertmacro: DebugMsg
  4755. !insertmacro: !getdebug
  4756. !insertmacro: end of !getdebug
  4757. !insertmacro: end of DebugMsg
  4758. !insertmacro: EmptyWorkingSet
  4759. Plugin Command: Call kernel32::GetCurrentProcess()i.s
  4760. Plugin Command: Call psapi::EmptyWorkingSet(is)
  4761. !insertmacro: end of EmptyWorkingSet
  4762. !insertmacro: _Do
  4763. !insertmacro: end of _Do
  4764. !insertmacro: ProcessWaitCloseCall
  4765. !insertmacro: end of ProcessWaitCloseCall
  4766. !insertmacro: _IfThen
  4767. !insertmacro: end of _IfThen
  4768. StrCpy $0 "1" () ()
  4769. !insertmacro: _Do
  4770. !insertmacro: end of _Do
  4771. ClearErrors
  4772. !insertmacro: ReadLauncherConfig
  4773. ReadINIStr $2 [Launch]:WaitForEXE$0 from $LauncherFile
  4774. !insertmacro: end of ReadLauncherConfig
  4775. !insertmacro: _IfThen
  4776. !insertmacro: end of _IfThen
  4777. !insertmacro: ProcessWaitCloseCall
  4778. !insertmacro: end of ProcessWaitCloseCall
  4779. !insertmacro: _IfThen
  4780. !insertmacro: end of _IfThen
  4781. IntOp: $0=$0+1
  4782. !insertmacro: _Loop
  4783. !insertmacro: end of _Loop
  4784. !insertmacro: _Loop
  4785. !insertmacro: end of _Loop
  4786. !insertmacro: DebugMsg
  4787. !insertmacro: !getdebug
  4788. !insertmacro: end of !getdebug
  4789. !insertmacro: end of DebugMsg
  4790. !insertmacro: _ElseIf
  4791. !insertmacro: end of _ElseIf
  4792. !insertmacro: InvalidValueError
  4793. MessageBox: 16: "Error: invalid value '$0' for [Launch]:WaitForOtherInstances. Please refer to the Manual for valid values."
  4794. !insertmacro: end of InvalidValueError
  4795. !insertmacro: _EndIf
  4796. !insertmacro: end of _EndIf
  4797. !insertmacro: _EndIf
  4798. !insertmacro: end of _EndIf
  4799. FunctionEnd
  4800. Function: "PostPrimary"
  4801. !insertmacro: RunSegment
  4802. !insertmacro: !getdebug
  4803. !insertmacro: end of !getdebug
  4804. !insertmacro: Services.nsh_PostPrimary
  4805. !insertmacro: end of Services.nsh_PostPrimary
  4806. !insertmacro: end of RunSegment
  4807. !insertmacro: RunSegment
  4808. !insertmacro: !getdebug
  4809. !insertmacro: end of !getdebug
  4810. !insertmacro: RegistryValueBackupDelete.nsh_PostPrimary
  4811. !insertmacro: _If
  4812. !insertmacro: end of _If
  4813. StrCpy $R0 "1" () ()
  4814. !insertmacro: _Do
  4815. !insertmacro: end of _Do
  4816. ClearErrors
  4817. !insertmacro: ReadLauncherConfig
  4818. ReadINIStr $1 [RegistryValueBackupDelete]:$R0 from $LauncherFile
  4819. !insertmacro: end of ReadLauncherConfig
  4820. !insertmacro: _IfThen
  4821. !insertmacro: end of _IfThen
  4822. !insertmacro: ValidateRegistryKeyCall
  4823. Push: $1
  4824. !insertmacro: CallArtificialFunction
  4825. !define: "CallArtificialFunction_TYPE"="inst"
  4826. Call ":.ValidateRegistryKey_inst"
  4827. !undef: "CallArtificialFunction_TYPE"
  4828. !insertmacro: end of CallArtificialFunction
  4829. Pop: $1
  4830. !insertmacro: end of ValidateRegistryKeyCall
  4831. !insertmacro: GetParentCall
  4832. !insertmacro: end of GetParentCall
  4833. !insertmacro: GetFileNameCall
  4834. !insertmacro: end of GetFileNameCall
  4835. !insertmacro: DebugMsg
  4836. !insertmacro: !getdebug
  4837. !insertmacro: end of !getdebug
  4838. !insertmacro: end of DebugMsg
  4839. !insertmacro: registry::DeleteValue
  4840. Plugin Command: _DeleteValue $2 $3
  4841. Pop: $R9
  4842. !insertmacro: end of registry::DeleteValue
  4843. !insertmacro: registry::MoveValue
  4844. Plugin Command: _MoveValue HKEY_CURRENT_USER\Software\PortableApps.com\Values $1 $2 $3
  4845. Pop: $R9
  4846. !insertmacro: end of registry::MoveValue
  4847. IntOp: $R0=$R0+1
  4848. !insertmacro: _Loop
  4849. !insertmacro: end of _Loop
  4850. !insertmacro: _If
  4851. !insertmacro: end of _If
  4852. !insertmacro: registry::DeleteKeyEmpty
  4853. File: "registry.dll"->"$PLUGINSDIR\registry.dll" 0/29696 bytes
  4854. Plugin Command: _DeleteKeyEmpty HKEY_CURRENT_USER\Software\PortableApps.com\Values
  4855. Pop: $R9
  4856. !insertmacro: end of registry::DeleteKeyEmpty
  4857. !insertmacro: registry::DeleteKeyEmpty
  4858. Plugin Command: _DeleteKeyEmpty HKEY_CURRENT_USER\Software\PortableApps.com
  4859. Pop: $R9
  4860. !insertmacro: end of registry::DeleteKeyEmpty
  4861. !insertmacro: _EndIf
  4862. !insertmacro: end of _EndIf
  4863. !insertmacro: _EndIf
  4864. !insertmacro: end of _EndIf
  4865. !insertmacro: end of RegistryValueBackupDelete.nsh_PostPrimary
  4866. !insertmacro: end of RunSegment
  4867. !insertmacro: RunSegment
  4868. !insertmacro: !getdebug
  4869. !insertmacro: end of !getdebug
  4870. !insertmacro: RegistryKeys.nsh_PostPrimary
  4871. !insertmacro: _If
  4872. !insertmacro: end of _If
  4873. !insertmacro: ForEachINIPair
  4874. !define: "_ForEachINIPair_Open"=""
  4875. !insertmacro: _If
  4876. !insertmacro: end of _If
  4877. FileOpen: $LauncherFile as r -> $_FEIP_FileHandle
  4878. !insertmacro: _Else
  4879. !insertmacro: end of _Else
  4880. FileSeek: fp=$_FEIP_FileHandle, ofs=0, mode=SET, output=
  4881. !insertmacro: _EndIf
  4882. !insertmacro: end of _EndIf
  4883. !insertmacro: _Do
  4884. !insertmacro: end of _Do
  4885. ClearErrors
  4886. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  4887. !insertmacro: TrimNewLinesCall
  4888. !insertmacro: end of TrimNewLinesCall
  4889. !insertmacro: _If
  4890. !insertmacro: end of _If
  4891. !insertmacro: _Or
  4892. !insertmacro: end of _Or
  4893. !insertmacro: _Goto
  4894. !insertmacro: end of _Goto
  4895. !insertmacro: _EndIf
  4896. !insertmacro: end of _EndIf
  4897. !insertmacro: _Loop
  4898. !insertmacro: end of _Loop
  4899. !insertmacro: _If
  4900. !insertmacro: end of _If
  4901. !insertmacro: _Do
  4902. !insertmacro: end of _Do
  4903. ClearErrors
  4904. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  4905. StrCpy $_FEIP_LineLength "$_FEIP_Line" (1) ()
  4906. !insertmacro: _If
  4907. !insertmacro: end of _If
  4908. !insertmacro: _Or
  4909. !insertmacro: end of _Or
  4910. !insertmacro: _Goto
  4911. !insertmacro: end of _Goto
  4912. !insertmacro: _EndIf
  4913. !insertmacro: end of _EndIf
  4914. !insertmacro: _If
  4915. !insertmacro: end of _If
  4916. !insertmacro: _Goto
  4917. !insertmacro: end of _Goto
  4918. !insertmacro: _EndIf
  4919. !insertmacro: end of _EndIf
  4920. StrLen $_FEIP_LineLength "$_FEIP_Line"
  4921. StrCpy $_FEIP_CharNum "0" () ()
  4922. !insertmacro: _Do
  4923. !insertmacro: end of _Do
  4924. StrCpy $_FEIP_Char "$_FEIP_Line" (1) ($_FEIP_CharNum)
  4925. !insertmacro: _IfThen
  4926. !insertmacro: end of _IfThen
  4927. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  4928. !insertmacro: _Loop
  4929. !insertmacro: end of _Loop
  4930. !insertmacro: TrimNewLinesCall
  4931. !insertmacro: end of TrimNewLinesCall
  4932. !insertmacro: _If
  4933. !insertmacro: end of _If
  4934. StrCpy $0 "$_FEIP_Line" ($_FEIP_CharNum) ()
  4935. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  4936. StrCpy $1 "$_FEIP_Line" () ($_FEIP_CharNum)
  4937. !insertmacro: TrimWhiteCall
  4938. Push: $0
  4939. !insertmacro: CallArtificialFunction
  4940. !define: "CallArtificialFunction_TYPE"="inst"
  4941. Call ":.TrimWhite_inst"
  4942. !undef: "CallArtificialFunction_TYPE"
  4943. !insertmacro: end of CallArtificialFunction
  4944. Pop: $0
  4945. !insertmacro: end of TrimWhiteCall
  4946. !insertmacro: TrimWhiteCall
  4947. Push: $1
  4948. !insertmacro: CallArtificialFunction
  4949. !define: "CallArtificialFunction_TYPE"="inst"
  4950. Call ":.TrimWhite_inst"
  4951. !undef: "CallArtificialFunction_TYPE"
  4952. !insertmacro: end of CallArtificialFunction
  4953. Pop: $1
  4954. !insertmacro: end of TrimWhiteCall
  4955. StrCpy $_FEIP_CharNum "$1" (1) ()
  4956. StrCpy $_FEIP_Char "$1" () (-1)
  4957. !insertmacro: _If
  4958. !insertmacro: end of _If
  4959. !insertmacro: _If
  4960. !insertmacro: end of _If
  4961. !insertmacro: _Or
  4962. !insertmacro: end of _Or
  4963. StrCpy $1 "$1" (-1) (1)
  4964. !insertmacro: _EndIf
  4965. !insertmacro: end of _EndIf
  4966. !insertmacro: _EndIf
  4967. !insertmacro: end of _EndIf
  4968. !insertmacro: end of ForEachINIPair
  4969. !insertmacro: ValidateRegistryKeyCall
  4970. Push: $1
  4971. !insertmacro: CallArtificialFunction
  4972. !define: "CallArtificialFunction_TYPE"="inst"
  4973. Call ":.ValidateRegistryKey_inst"
  4974. !undef: "CallArtificialFunction_TYPE"
  4975. !insertmacro: end of CallArtificialFunction
  4976. Pop: $1
  4977. !insertmacro: end of ValidateRegistryKeyCall
  4978. !insertmacro: _If
  4979. !insertmacro: end of _If
  4980. !insertmacro: DebugMsg
  4981. !insertmacro: !getdebug
  4982. !insertmacro: end of !getdebug
  4983. !insertmacro: end of DebugMsg
  4984. !insertmacro: _Else
  4985. !insertmacro: end of _Else
  4986. ClearErrors
  4987. !insertmacro: ReadRuntimeData
  4988. IfFileExists: "$DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini" ? 0 : +3
  4989. ReadINIStr $R9 [FailedRegistryKeys]:$0 from $DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini
  4990. Goto: +2
  4991. ReadINIStr $R9 [FailedRegistryKeys]:$0 from $PLUGINSDIR\runtimedata.ini
  4992. !insertmacro: end of ReadRuntimeData
  4993. !insertmacro: _If
  4994. !insertmacro: end of _If
  4995. !insertmacro: _And
  4996. !insertmacro: end of _And
  4997. !insertmacro: DebugMsg
  4998. !insertmacro: !getdebug
  4999. !insertmacro: end of !getdebug
  5000. !insertmacro: end of DebugMsg
  5001. !insertmacro: registry::SaveKey
  5002. File: "registry.dll"->"$PLUGINSDIR\registry.dll" 0/29696 bytes
  5003. Plugin Command: _SaveKey $1 $DataDirectory\settings\$0.reg
  5004. Pop: $R9
  5005. !insertmacro: end of registry::SaveKey
  5006. !insertmacro: _EndIf
  5007. !insertmacro: end of _EndIf
  5008. !insertmacro: _EndIf
  5009. !insertmacro: end of _EndIf
  5010. !insertmacro: DebugMsg
  5011. !insertmacro: !getdebug
  5012. !insertmacro: end of !getdebug
  5013. !insertmacro: end of DebugMsg
  5014. !insertmacro: registry::DeleteKey
  5015. File: "registry.dll"->"$PLUGINSDIR\registry.dll" 0/29696 bytes
  5016. Plugin Command: _DeleteKey $1
  5017. Pop: $R9
  5018. !insertmacro: end of registry::DeleteKey
  5019. !insertmacro: _If
  5020. !insertmacro: end of _If
  5021. !insertmacro: DebugMsg
  5022. !insertmacro: !getdebug
  5023. !insertmacro: end of !getdebug
  5024. !insertmacro: end of DebugMsg
  5025. !insertmacro: registry::MoveKey
  5026. Plugin Command: _KeyExists HKEY_CURRENT_USER\Software\PortableApps.com\Keys\$1
  5027. Pop: $R9
  5028. IntCmp $R9:-1 equal=+15, < , >
  5029. Plugin Command: _Read HKEY_CURRENT_USER\Software\PortableApps.com\Keys\$1
  5030. Pop: $REGISTRY_NSH_VARIABLE
  5031. Pop: $R9
  5032. StrCmp "$R9" "" equal=0, nonequal=+6
  5033. Plugin Command: _Write HKEY_CURRENT_USER\Software\PortableApps.com\Keys\$1 REG_SZ
  5034. Pop: $R9
  5035. Plugin Command: _DeleteValue HKEY_CURRENT_USER\Software\PortableApps.com\Keys\$1
  5036. Pop: $R9
  5037. IntCmp $R9:-1 equal=+6, < , > +4
  5038. Plugin Command: _Write HKEY_CURRENT_USER\Software\PortableApps.com\Keys\$1 $REGISTRY_NSH_VARIABLE $R9
  5039. Pop: $R9
  5040. IntCmp $R9:-1 equal=+3, < , >
  5041. Plugin Command: _MoveKey HKEY_CURRENT_USER\Software\PortableApps.com\Keys\$1 $1
  5042. Pop: $R9
  5043. !insertmacro: end of registry::MoveKey
  5044. !insertmacro: _Do
  5045. !insertmacro: end of _Do
  5046. !insertmacro: GetParentCall
  5047. !insertmacro: end of GetParentCall
  5048. !insertmacro: registry::DeleteKeyEmpty
  5049. Plugin Command: _DeleteKeyEmpty HKEY_CURRENT_USER\Software\PortableApps.com\Keys\$1
  5050. Pop: $R9
  5051. !insertmacro: end of registry::DeleteKeyEmpty
  5052. !insertmacro: _Loop
  5053. !insertmacro: end of _Loop
  5054. !insertmacro: _EndIf
  5055. !insertmacro: end of _EndIf
  5056. !insertmacro: NextINIPair
  5057. !undef: "_ForEachINIPair_Open"
  5058. !insertmacro: _EndIf
  5059. !insertmacro: end of _EndIf
  5060. !insertmacro: _Loop
  5061. !insertmacro: end of _Loop
  5062. !insertmacro: _EndIf
  5063. !insertmacro: end of _EndIf
  5064. !insertmacro: end of NextINIPair
  5065. !insertmacro: registry::DeleteKeyEmpty
  5066. Plugin Command: _DeleteKeyEmpty HKEY_CURRENT_USER\Software\PortableApps.com
  5067. Pop: $R9
  5068. !insertmacro: end of registry::DeleteKeyEmpty
  5069. !insertmacro: _EndIf
  5070. !insertmacro: end of _EndIf
  5071. !insertmacro: end of RegistryKeys.nsh_PostPrimary
  5072. !insertmacro: end of RunSegment
  5073. !insertmacro: RunSegment
  5074. !insertmacro: !getdebug
  5075. !insertmacro: end of !getdebug
  5076. !insertmacro: RegistryCleanup.nsh_PostPrimary
  5077. !insertmacro: _If
  5078. !insertmacro: end of _If
  5079. StrCpy $R0 "1" () ()
  5080. !insertmacro: _Do
  5081. !insertmacro: end of _Do
  5082. ClearErrors
  5083. !insertmacro: ReadLauncherConfig
  5084. ReadINIStr $1 [RegistryCleanupIfEmpty]:$R0 from $LauncherFile
  5085. !insertmacro: end of ReadLauncherConfig
  5086. !insertmacro: _IfThen
  5087. !insertmacro: end of _IfThen
  5088. !insertmacro: ValidateRegistryKeyCall
  5089. Push: $1
  5090. !insertmacro: CallArtificialFunction
  5091. !define: "CallArtificialFunction_TYPE"="inst"
  5092. Call ":.ValidateRegistryKey_inst"
  5093. !undef: "CallArtificialFunction_TYPE"
  5094. !insertmacro: end of CallArtificialFunction
  5095. Pop: $1
  5096. !insertmacro: end of ValidateRegistryKeyCall
  5097. !insertmacro: DebugMsg
  5098. !insertmacro: !getdebug
  5099. !insertmacro: end of !getdebug
  5100. !insertmacro: end of DebugMsg
  5101. !insertmacro: registry::DeleteKeyEmpty
  5102. Plugin Command: _DeleteKeyEmpty $1
  5103. Pop: $R9
  5104. !insertmacro: end of registry::DeleteKeyEmpty
  5105. IntOp: $R0=$R0+1
  5106. !insertmacro: _Loop
  5107. !insertmacro: end of _Loop
  5108. StrCpy $R0 "1" () ()
  5109. !insertmacro: _Do
  5110. !insertmacro: end of _Do
  5111. ClearErrors
  5112. !insertmacro: ReadLauncherConfig
  5113. ReadINIStr $1 [RegistryCleanupForce]:$R0 from $LauncherFile
  5114. !insertmacro: end of ReadLauncherConfig
  5115. !insertmacro: _IfThen
  5116. !insertmacro: end of _IfThen
  5117. !insertmacro: ValidateRegistryKeyCall
  5118. Push: $1
  5119. !insertmacro: CallArtificialFunction
  5120. !define: "CallArtificialFunction_TYPE"="inst"
  5121. Call ":.ValidateRegistryKey_inst"
  5122. !undef: "CallArtificialFunction_TYPE"
  5123. !insertmacro: end of CallArtificialFunction
  5124. Pop: $1
  5125. !insertmacro: end of ValidateRegistryKeyCall
  5126. !insertmacro: DebugMsg
  5127. !insertmacro: !getdebug
  5128. !insertmacro: end of !getdebug
  5129. !insertmacro: end of DebugMsg
  5130. !insertmacro: registry::DeleteKey
  5131. Plugin Command: _DeleteKey $1
  5132. Pop: $R9
  5133. !insertmacro: end of registry::DeleteKey
  5134. IntOp: $R0=$R0+1
  5135. !insertmacro: _Loop
  5136. !insertmacro: end of _Loop
  5137. !insertmacro: _EndIf
  5138. !insertmacro: end of _EndIf
  5139. !insertmacro: end of RegistryCleanup.nsh_PostPrimary
  5140. !insertmacro: end of RunSegment
  5141. !insertmacro: RunSegment
  5142. !insertmacro: !getdebug
  5143. !insertmacro: end of !getdebug
  5144. !insertmacro: Qt.nsh_PostPrimary
  5145. StrCpy $R0 "1" () ()
  5146. !insertmacro: _Do
  5147. !insertmacro: end of _Do
  5148. ClearErrors
  5149. !insertmacro: ReadLauncherConfig
  5150. ReadINIStr $0 [QtKeysCleanup]:$R0 from $LauncherFile
  5151. !insertmacro: end of ReadLauncherConfig
  5152. !insertmacro: _IfThen
  5153. !insertmacro: end of _IfThen
  5154. StrCpy $1 "Software\Trolltech\OrganizationDefaults\$0\$AppDirectory" () ()
  5155. DeleteRegKey: HKCU\$1
  5156. !insertmacro: _Do
  5157. !insertmacro: end of _Do
  5158. !insertmacro: GetParentCall
  5159. !insertmacro: end of GetParentCall
  5160. DeleteRegKey: HKCU\$1
  5161. !insertmacro: _Loop
  5162. !insertmacro: end of _Loop
  5163. IntOp: $R0=$R0+1
  5164. !insertmacro: _Loop
  5165. !insertmacro: end of _Loop
  5166. !insertmacro: end of Qt.nsh_PostPrimary
  5167. !insertmacro: end of RunSegment
  5168. !insertmacro: RunSegment
  5169. !insertmacro: !getdebug
  5170. !insertmacro: end of !getdebug
  5171. !insertmacro: DirectoriesMove.nsh_PostPrimary
  5172. !insertmacro: ForEachINIPair
  5173. !define: "_ForEachINIPair_Open"=""
  5174. !insertmacro: _If
  5175. !insertmacro: end of _If
  5176. FileOpen: $LauncherFile as r -> $_FEIP_FileHandle
  5177. !insertmacro: _Else
  5178. !insertmacro: end of _Else
  5179. FileSeek: fp=$_FEIP_FileHandle, ofs=0, mode=SET, output=
  5180. !insertmacro: _EndIf
  5181. !insertmacro: end of _EndIf
  5182. !insertmacro: _Do
  5183. !insertmacro: end of _Do
  5184. ClearErrors
  5185. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  5186. !insertmacro: TrimNewLinesCall
  5187. !insertmacro: end of TrimNewLinesCall
  5188. !insertmacro: _If
  5189. !insertmacro: end of _If
  5190. !insertmacro: _Or
  5191. !insertmacro: end of _Or
  5192. !insertmacro: _Goto
  5193. !insertmacro: end of _Goto
  5194. !insertmacro: _EndIf
  5195. !insertmacro: end of _EndIf
  5196. !insertmacro: _Loop
  5197. !insertmacro: end of _Loop
  5198. !insertmacro: _If
  5199. !insertmacro: end of _If
  5200. !insertmacro: _Do
  5201. !insertmacro: end of _Do
  5202. ClearErrors
  5203. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  5204. StrCpy $_FEIP_LineLength "$_FEIP_Line" (1) ()
  5205. !insertmacro: _If
  5206. !insertmacro: end of _If
  5207. !insertmacro: _Or
  5208. !insertmacro: end of _Or
  5209. !insertmacro: _Goto
  5210. !insertmacro: end of _Goto
  5211. !insertmacro: _EndIf
  5212. !insertmacro: end of _EndIf
  5213. !insertmacro: _If
  5214. !insertmacro: end of _If
  5215. !insertmacro: _Goto
  5216. !insertmacro: end of _Goto
  5217. !insertmacro: _EndIf
  5218. !insertmacro: end of _EndIf
  5219. StrLen $_FEIP_LineLength "$_FEIP_Line"
  5220. StrCpy $_FEIP_CharNum "0" () ()
  5221. !insertmacro: _Do
  5222. !insertmacro: end of _Do
  5223. StrCpy $_FEIP_Char "$_FEIP_Line" (1) ($_FEIP_CharNum)
  5224. !insertmacro: _IfThen
  5225. !insertmacro: end of _IfThen
  5226. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  5227. !insertmacro: _Loop
  5228. !insertmacro: end of _Loop
  5229. !insertmacro: TrimNewLinesCall
  5230. !insertmacro: end of TrimNewLinesCall
  5231. !insertmacro: _If
  5232. !insertmacro: end of _If
  5233. StrCpy $0 "$_FEIP_Line" ($_FEIP_CharNum) ()
  5234. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  5235. StrCpy $1 "$_FEIP_Line" () ($_FEIP_CharNum)
  5236. !insertmacro: TrimWhiteCall
  5237. Push: $0
  5238. !insertmacro: CallArtificialFunction
  5239. !define: "CallArtificialFunction_TYPE"="inst"
  5240. Call ":.TrimWhite_inst"
  5241. !undef: "CallArtificialFunction_TYPE"
  5242. !insertmacro: end of CallArtificialFunction
  5243. Pop: $0
  5244. !insertmacro: end of TrimWhiteCall
  5245. !insertmacro: TrimWhiteCall
  5246. Push: $1
  5247. !insertmacro: CallArtificialFunction
  5248. !define: "CallArtificialFunction_TYPE"="inst"
  5249. Call ":.TrimWhite_inst"
  5250. !undef: "CallArtificialFunction_TYPE"
  5251. !insertmacro: end of CallArtificialFunction
  5252. Pop: $1
  5253. !insertmacro: end of TrimWhiteCall
  5254. StrCpy $_FEIP_CharNum "$1" (1) ()
  5255. StrCpy $_FEIP_Char "$1" () (-1)
  5256. !insertmacro: _If
  5257. !insertmacro: end of _If
  5258. !insertmacro: _If
  5259. !insertmacro: end of _If
  5260. !insertmacro: _Or
  5261. !insertmacro: end of _Or
  5262. StrCpy $1 "$1" (-1) (1)
  5263. !insertmacro: _EndIf
  5264. !insertmacro: end of _EndIf
  5265. !insertmacro: _EndIf
  5266. !insertmacro: end of _EndIf
  5267. !insertmacro: end of ForEachINIPair
  5268. !insertmacro: _DirectoriesMove_Start
  5269. !insertmacro: _IfThen
  5270. !insertmacro: end of _IfThen
  5271. !insertmacro: ParseLocations
  5272. !insertmacro: !getdebug
  5273. !insertmacro: end of !getdebug
  5274. ExpandEnvStrings: $1->$1
  5275. !insertmacro: DebugMsg
  5276. !insertmacro: !getdebug
  5277. !insertmacro: end of !getdebug
  5278. !insertmacro: end of DebugMsg
  5279. !insertmacro: end of ParseLocations
  5280. !insertmacro: end of _DirectoriesMove_Start
  5281. StrLen $R0 "$EXEDIR"
  5282. StrCpy $R0 "$1" ($R0) ()
  5283. !insertmacro: _If
  5284. !insertmacro: end of _If
  5285. StrCpy $7 "in-package" () ()
  5286. !insertmacro: _EndIf
  5287. !insertmacro: end of _EndIf
  5288. !insertmacro: GetParentCall
  5289. !insertmacro: end of GetParentCall
  5290. !insertmacro: ForEachPath
  5291. !define: "_ForEachPath_Open"=""
  5292. !insertmacro: SplitAfterWildCard
  5293. Push: $1
  5294. !insertmacro: CallArtificialFunction
  5295. !define: "CallArtificialFunction_TYPE"="inst"
  5296. Call ":.SplitAfterWildCard_inst"
  5297. !undef: "CallArtificialFunction_TYPE"
  5298. !insertmacro: end of CallArtificialFunction
  5299. Pop: $_FEP_WildCardChild
  5300. Pop: $_FEP_WildCardPath
  5301. !insertmacro: end of SplitAfterWildCard
  5302. !insertmacro: GetParentCall
  5303. !insertmacro: end of GetParentCall
  5304. !insertmacro: GetFileExtCall
  5305. !insertmacro: end of GetFileExtCall
  5306. StrCpy $2 "" () ()
  5307. !insertmacro: _Do
  5308. !insertmacro: end of _Do
  5309. ClearErrors
  5310. !insertmacro: _If
  5311. !insertmacro: end of _If
  5312. StrCpy $4 "$1" () ()
  5313. !insertmacro: _IfNotThen
  5314. !insertmacro: end of _IfNotThen
  5315. !insertmacro: _Else
  5316. !insertmacro: end of _Else
  5317. !insertmacro: _If
  5318. !insertmacro: end of _If
  5319. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  5320. !insertmacro: _Else
  5321. !insertmacro: end of _Else
  5322. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  5323. !insertmacro: _EndIf
  5324. !insertmacro: end of _EndIf
  5325. StrCpy $4 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  5326. !insertmacro: _EndIf
  5327. !insertmacro: end of _EndIf
  5328. !insertmacro: _If
  5329. !insertmacro: end of _If
  5330. !insertmacro: _IfThen
  5331. !insertmacro: end of _IfThen
  5332. !insertmacro: _Goto
  5333. !insertmacro: end of _Goto
  5334. !insertmacro: _EndIf
  5335. !insertmacro: end of _EndIf
  5336. !insertmacro: _If
  5337. !insertmacro: end of _If
  5338. !insertmacro: _And
  5339. !insertmacro: end of _And
  5340. !insertmacro: _And
  5341. !insertmacro: end of _And
  5342. Push: $0
  5343. !insertmacro: GetFileExtCall
  5344. !insertmacro: end of GetFileExtCall
  5345. !insertmacro: _If
  5346. !insertmacro: end of _If
  5347. !insertmacro: _Or
  5348. !insertmacro: end of _Or
  5349. !insertmacro: _And
  5350. !insertmacro: end of _And
  5351. !insertmacro: _Or
  5352. !insertmacro: end of _Or
  5353. Pop: $0
  5354. !insertmacro: GetFileNameCall
  5355. !insertmacro: end of GetFileNameCall
  5356. !insertmacro: end of ForEachPath
  5357. !insertmacro: _IfNotThen
  5358. !insertmacro: end of _IfNotThen
  5359. !insertmacro: _If
  5360. !insertmacro: end of _If
  5361. !insertmacro: DebugMsg
  5362. !insertmacro: !getdebug
  5363. !insertmacro: end of !getdebug
  5364. !insertmacro: end of DebugMsg
  5365. !insertmacro: _ElseIf
  5366. !insertmacro: end of _ElseIf
  5367. !insertmacro: GetRootCall
  5368. !insertmacro: end of GetRootCall
  5369. !insertmacro: GetRootCall
  5370. !insertmacro: end of GetRootCall
  5371. !insertmacro: _If
  5372. !insertmacro: end of _If
  5373. !insertmacro: DebugMsg
  5374. !insertmacro: !getdebug
  5375. !insertmacro: end of !getdebug
  5376. !insertmacro: end of DebugMsg
  5377. ClearErrors
  5378. Rename: $4->$3\$2
  5379. !insertmacro: _If
  5380. !insertmacro: end of _If
  5381. !insertmacro: DebugMsg
  5382. !insertmacro: !getdebug
  5383. !insertmacro: end of !getdebug
  5384. !insertmacro: end of DebugMsg
  5385. RMDir: /R "$3\$2"
  5386. CreateDirectory: "$3\$2"
  5387. CopyFiles: (silent) "$4\*.*" -> "$3\$2", size=0KB
  5388. !insertmacro: _EndIf
  5389. !insertmacro: end of _EndIf
  5390. !insertmacro: _Else
  5391. !insertmacro: end of _Else
  5392. !insertmacro: DebugMsg
  5393. !insertmacro: !getdebug
  5394. !insertmacro: end of !getdebug
  5395. !insertmacro: end of DebugMsg
  5396. RMDir: /R "$3\$2"
  5397. CreateDirectory: "$3\$2"
  5398. CopyFiles: (silent) "$4\*.*" -> "$3\$2", size=0KB
  5399. !insertmacro: _EndIf
  5400. !insertmacro: end of _EndIf
  5401. !insertmacro: _EndIf
  5402. !insertmacro: end of _EndIf
  5403. !insertmacro: !getdebug
  5404. !insertmacro: end of !getdebug
  5405. RMDir: /R "$4"
  5406. !insertmacro: NextPath
  5407. !undef: "_ForEachPath_Open"
  5408. !insertmacro: _Else
  5409. !insertmacro: end of _Else
  5410. Pop: $0
  5411. !insertmacro: _EndIf
  5412. !insertmacro: end of _EndIf
  5413. !insertmacro: _EndIf
  5414. !insertmacro: end of _EndIf
  5415. !insertmacro: _Loop
  5416. !insertmacro: end of _Loop
  5417. !insertmacro: _If
  5418. !insertmacro: end of _If
  5419. FindClose: $_FEP_FindHandle
  5420. StrCpy $_FEP_FindHandle "" () ()
  5421. !insertmacro: _EndIf
  5422. !insertmacro: end of _EndIf
  5423. !insertmacro: end of NextPath
  5424. !insertmacro: GetParentCall
  5425. !insertmacro: end of GetParentCall
  5426. !insertmacro: ReadRuntimeData
  5427. IfFileExists: "$DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini" ? 0 : +3
  5428. ReadINIStr $2 [DirectoriesMove]:RemoveIfEmpty:$4 from $DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini
  5429. Goto: +2
  5430. ReadINIStr $2 [DirectoriesMove]:RemoveIfEmpty:$4 from $PLUGINSDIR\runtimedata.ini
  5431. !insertmacro: end of ReadRuntimeData
  5432. !insertmacro: _If
  5433. !insertmacro: end of _If
  5434. RMDir: "$4"
  5435. !insertmacro: _EndIf
  5436. !insertmacro: end of _EndIf
  5437. !insertmacro: ForEachPath
  5438. !define: "_ForEachPath_Open"=""
  5439. !insertmacro: SplitAfterWildCard
  5440. Push: $1.BackupBy$AppID
  5441. !insertmacro: CallArtificialFunction
  5442. !define: "CallArtificialFunction_TYPE"="inst"
  5443. Call ":.SplitAfterWildCard_inst"
  5444. !undef: "CallArtificialFunction_TYPE"
  5445. !insertmacro: end of CallArtificialFunction
  5446. Pop: $_FEP_WildCardChild
  5447. Pop: $_FEP_WildCardPath
  5448. !insertmacro: end of SplitAfterWildCard
  5449. !insertmacro: GetParentCall
  5450. !insertmacro: end of GetParentCall
  5451. !insertmacro: GetFileExtCall
  5452. !insertmacro: end of GetFileExtCall
  5453. StrCpy $2 "" () ()
  5454. !insertmacro: _Do
  5455. !insertmacro: end of _Do
  5456. ClearErrors
  5457. !insertmacro: _If
  5458. !insertmacro: end of _If
  5459. StrCpy $3 "$1.BackupBy$AppID" () ()
  5460. !insertmacro: _IfNotThen
  5461. !insertmacro: end of _IfNotThen
  5462. !insertmacro: _Else
  5463. !insertmacro: end of _Else
  5464. !insertmacro: _If
  5465. !insertmacro: end of _If
  5466. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  5467. !insertmacro: _Else
  5468. !insertmacro: end of _Else
  5469. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  5470. !insertmacro: _EndIf
  5471. !insertmacro: end of _EndIf
  5472. StrCpy $3 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  5473. !insertmacro: _EndIf
  5474. !insertmacro: end of _EndIf
  5475. !insertmacro: _If
  5476. !insertmacro: end of _If
  5477. !insertmacro: _IfThen
  5478. !insertmacro: end of _IfThen
  5479. !insertmacro: _Goto
  5480. !insertmacro: end of _Goto
  5481. !insertmacro: _EndIf
  5482. !insertmacro: end of _EndIf
  5483. !insertmacro: _If
  5484. !insertmacro: end of _If
  5485. !insertmacro: _And
  5486. !insertmacro: end of _And
  5487. !insertmacro: _And
  5488. !insertmacro: end of _And
  5489. Push: $0
  5490. !insertmacro: GetFileExtCall
  5491. !insertmacro: end of GetFileExtCall
  5492. !insertmacro: _If
  5493. !insertmacro: end of _If
  5494. !insertmacro: _Or
  5495. !insertmacro: end of _Or
  5496. !insertmacro: _And
  5497. !insertmacro: end of _And
  5498. !insertmacro: _Or
  5499. !insertmacro: end of _Or
  5500. Pop: $0
  5501. !insertmacro: GetFileNameCall
  5502. !insertmacro: end of GetFileNameCall
  5503. !insertmacro: end of ForEachPath
  5504. !insertmacro: GetBaseNameCall
  5505. !insertmacro: end of GetBaseNameCall
  5506. !insertmacro: DebugMsg
  5507. !insertmacro: !getdebug
  5508. !insertmacro: end of !getdebug
  5509. !insertmacro: end of DebugMsg
  5510. Rename: $3->$4\$2
  5511. !insertmacro: NextPath
  5512. !undef: "_ForEachPath_Open"
  5513. !insertmacro: _Else
  5514. !insertmacro: end of _Else
  5515. Pop: $0
  5516. !insertmacro: _EndIf
  5517. !insertmacro: end of _EndIf
  5518. !insertmacro: _EndIf
  5519. !insertmacro: end of _EndIf
  5520. !insertmacro: _Loop
  5521. !insertmacro: end of _Loop
  5522. !insertmacro: _If
  5523. !insertmacro: end of _If
  5524. FindClose: $_FEP_FindHandle
  5525. StrCpy $_FEP_FindHandle "" () ()
  5526. !insertmacro: _EndIf
  5527. !insertmacro: end of _EndIf
  5528. !insertmacro: end of NextPath
  5529. !insertmacro: NextINIPair
  5530. !undef: "_ForEachINIPair_Open"
  5531. !insertmacro: _EndIf
  5532. !insertmacro: end of _EndIf
  5533. !insertmacro: _Loop
  5534. !insertmacro: end of _Loop
  5535. !insertmacro: _EndIf
  5536. !insertmacro: end of _EndIf
  5537. !insertmacro: end of NextINIPair
  5538. !insertmacro: end of DirectoriesMove.nsh_PostPrimary
  5539. !insertmacro: end of RunSegment
  5540. !insertmacro: RunSegment
  5541. !insertmacro: !getdebug
  5542. !insertmacro: end of !getdebug
  5543. !insertmacro: FilesMove.nsh_PostPrimary
  5544. !insertmacro: ForEachINIPair
  5545. !define: "_ForEachINIPair_Open"=""
  5546. !insertmacro: _If
  5547. !insertmacro: end of _If
  5548. FileOpen: $LauncherFile as r -> $_FEIP_FileHandle
  5549. !insertmacro: _Else
  5550. !insertmacro: end of _Else
  5551. FileSeek: fp=$_FEIP_FileHandle, ofs=0, mode=SET, output=
  5552. !insertmacro: _EndIf
  5553. !insertmacro: end of _EndIf
  5554. !insertmacro: _Do
  5555. !insertmacro: end of _Do
  5556. ClearErrors
  5557. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  5558. !insertmacro: TrimNewLinesCall
  5559. !insertmacro: end of TrimNewLinesCall
  5560. !insertmacro: _If
  5561. !insertmacro: end of _If
  5562. !insertmacro: _Or
  5563. !insertmacro: end of _Or
  5564. !insertmacro: _Goto
  5565. !insertmacro: end of _Goto
  5566. !insertmacro: _EndIf
  5567. !insertmacro: end of _EndIf
  5568. !insertmacro: _Loop
  5569. !insertmacro: end of _Loop
  5570. !insertmacro: _If
  5571. !insertmacro: end of _If
  5572. !insertmacro: _Do
  5573. !insertmacro: end of _Do
  5574. ClearErrors
  5575. FileRead: $_FEIP_FileHandle->$_FEIP_Line (max:)
  5576. StrCpy $_FEIP_LineLength "$_FEIP_Line" (1) ()
  5577. !insertmacro: _If
  5578. !insertmacro: end of _If
  5579. !insertmacro: _Or
  5580. !insertmacro: end of _Or
  5581. !insertmacro: _Goto
  5582. !insertmacro: end of _Goto
  5583. !insertmacro: _EndIf
  5584. !insertmacro: end of _EndIf
  5585. !insertmacro: _If
  5586. !insertmacro: end of _If
  5587. !insertmacro: _Goto
  5588. !insertmacro: end of _Goto
  5589. !insertmacro: _EndIf
  5590. !insertmacro: end of _EndIf
  5591. StrLen $_FEIP_LineLength "$_FEIP_Line"
  5592. StrCpy $_FEIP_CharNum "0" () ()
  5593. !insertmacro: _Do
  5594. !insertmacro: end of _Do
  5595. StrCpy $_FEIP_Char "$_FEIP_Line" (1) ($_FEIP_CharNum)
  5596. !insertmacro: _IfThen
  5597. !insertmacro: end of _IfThen
  5598. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  5599. !insertmacro: _Loop
  5600. !insertmacro: end of _Loop
  5601. !insertmacro: TrimNewLinesCall
  5602. !insertmacro: end of TrimNewLinesCall
  5603. !insertmacro: _If
  5604. !insertmacro: end of _If
  5605. StrCpy $0 "$_FEIP_Line" ($_FEIP_CharNum) ()
  5606. IntOp: $_FEIP_CharNum=$_FEIP_CharNum+1
  5607. StrCpy $1 "$_FEIP_Line" () ($_FEIP_CharNum)
  5608. !insertmacro: TrimWhiteCall
  5609. Push: $0
  5610. !insertmacro: CallArtificialFunction
  5611. !define: "CallArtificialFunction_TYPE"="inst"
  5612. Call ":.TrimWhite_inst"
  5613. !undef: "CallArtificialFunction_TYPE"
  5614. !insertmacro: end of CallArtificialFunction
  5615. Pop: $0
  5616. !insertmacro: end of TrimWhiteCall
  5617. !insertmacro: TrimWhiteCall
  5618. Push: $1
  5619. !insertmacro: CallArtificialFunction
  5620. !define: "CallArtificialFunction_TYPE"="inst"
  5621. Call ":.TrimWhite_inst"
  5622. !undef: "CallArtificialFunction_TYPE"
  5623. !insertmacro: end of CallArtificialFunction
  5624. Pop: $1
  5625. !insertmacro: end of TrimWhiteCall
  5626. StrCpy $_FEIP_CharNum "$1" (1) ()
  5627. StrCpy $_FEIP_Char "$1" () (-1)
  5628. !insertmacro: _If
  5629. !insertmacro: end of _If
  5630. !insertmacro: _If
  5631. !insertmacro: end of _If
  5632. !insertmacro: _Or
  5633. !insertmacro: end of _Or
  5634. StrCpy $1 "$1" (-1) (1)
  5635. !insertmacro: _EndIf
  5636. !insertmacro: end of _EndIf
  5637. !insertmacro: _EndIf
  5638. !insertmacro: end of _EndIf
  5639. !insertmacro: end of ForEachINIPair
  5640. !insertmacro: _FilesMove_Start
  5641. !insertmacro: ParseLocations
  5642. !insertmacro: !getdebug
  5643. !insertmacro: end of !getdebug
  5644. ExpandEnvStrings: $1->$1
  5645. !insertmacro: DebugMsg
  5646. !insertmacro: !getdebug
  5647. !insertmacro: end of !getdebug
  5648. !insertmacro: end of DebugMsg
  5649. !insertmacro: end of ParseLocations
  5650. !insertmacro: GetFileNameCall
  5651. !insertmacro: end of GetFileNameCall
  5652. StrCpy $0 "$DataDirectory\$0" () ()
  5653. StrCpy $4 "$1" () ()
  5654. StrCpy $1 "$1\$2" () ()
  5655. !insertmacro: end of _FilesMove_Start
  5656. StrLen $R0 "$EXEDIR"
  5657. StrCpy $R0 "$1" ($R0) ()
  5658. !insertmacro: _If
  5659. !insertmacro: end of _If
  5660. StrCpy $7 "in-package" () ()
  5661. !insertmacro: _EndIf
  5662. !insertmacro: end of _EndIf
  5663. !insertmacro: GetParentCall
  5664. !insertmacro: end of GetParentCall
  5665. !insertmacro: ForEachPath
  5666. !define: "_ForEachPath_Open"=""
  5667. !insertmacro: SplitAfterWildCard
  5668. Push: $1
  5669. !insertmacro: CallArtificialFunction
  5670. !define: "CallArtificialFunction_TYPE"="inst"
  5671. Call ":.SplitAfterWildCard_inst"
  5672. !undef: "CallArtificialFunction_TYPE"
  5673. !insertmacro: end of CallArtificialFunction
  5674. Pop: $_FEP_WildCardChild
  5675. Pop: $_FEP_WildCardPath
  5676. !insertmacro: end of SplitAfterWildCard
  5677. !insertmacro: GetParentCall
  5678. !insertmacro: end of GetParentCall
  5679. !insertmacro: GetFileExtCall
  5680. !insertmacro: end of GetFileExtCall
  5681. StrCpy $2 "" () ()
  5682. !insertmacro: _Do
  5683. !insertmacro: end of _Do
  5684. ClearErrors
  5685. !insertmacro: _If
  5686. !insertmacro: end of _If
  5687. StrCpy $4 "$1" () ()
  5688. !insertmacro: _IfNotThen
  5689. !insertmacro: end of _IfNotThen
  5690. !insertmacro: _Else
  5691. !insertmacro: end of _Else
  5692. !insertmacro: _If
  5693. !insertmacro: end of _If
  5694. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  5695. !insertmacro: _Else
  5696. !insertmacro: end of _Else
  5697. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  5698. !insertmacro: _EndIf
  5699. !insertmacro: end of _EndIf
  5700. StrCpy $4 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  5701. !insertmacro: _EndIf
  5702. !insertmacro: end of _EndIf
  5703. !insertmacro: _If
  5704. !insertmacro: end of _If
  5705. !insertmacro: _IfThen
  5706. !insertmacro: end of _IfThen
  5707. !insertmacro: _Goto
  5708. !insertmacro: end of _Goto
  5709. !insertmacro: _EndIf
  5710. !insertmacro: end of _EndIf
  5711. !insertmacro: _If
  5712. !insertmacro: end of _If
  5713. !insertmacro: _And
  5714. !insertmacro: end of _And
  5715. Push: $0
  5716. !insertmacro: GetFileExtCall
  5717. !insertmacro: end of GetFileExtCall
  5718. !insertmacro: _If
  5719. !insertmacro: end of _If
  5720. !insertmacro: _Or
  5721. !insertmacro: end of _Or
  5722. !insertmacro: _And
  5723. !insertmacro: end of _And
  5724. !insertmacro: _Or
  5725. !insertmacro: end of _Or
  5726. Pop: $0
  5727. !insertmacro: GetFileNameCall
  5728. !insertmacro: end of GetFileNameCall
  5729. !insertmacro: end of ForEachPath
  5730. !insertmacro: _If
  5731. !insertmacro: end of _If
  5732. !insertmacro: GetRootCall
  5733. !insertmacro: end of GetRootCall
  5734. !insertmacro: GetRootCall
  5735. !insertmacro: end of GetRootCall
  5736. !insertmacro: _If
  5737. !insertmacro: end of _If
  5738. !insertmacro: DebugMsg
  5739. !insertmacro: !getdebug
  5740. !insertmacro: end of !getdebug
  5741. !insertmacro: end of DebugMsg
  5742. ClearErrors
  5743. Rename: $4->$3\$2
  5744. !insertmacro: _If
  5745. !insertmacro: end of _If
  5746. !insertmacro: DebugMsg
  5747. !insertmacro: !getdebug
  5748. !insertmacro: end of !getdebug
  5749. !insertmacro: end of DebugMsg
  5750. Delete: "$3\$2"
  5751. CopyFiles: (silent) "$4" -> "$3\$2", size=0KB
  5752. !insertmacro: _EndIf
  5753. !insertmacro: end of _EndIf
  5754. !insertmacro: _Else
  5755. !insertmacro: end of _Else
  5756. !insertmacro: DebugMsg
  5757. !insertmacro: !getdebug
  5758. !insertmacro: end of !getdebug
  5759. !insertmacro: end of DebugMsg
  5760. Delete: "$3\$2"
  5761. CopyFiles: (silent) "$4" -> "$3\$2", size=0KB
  5762. !insertmacro: _EndIf
  5763. !insertmacro: end of _EndIf
  5764. !insertmacro: _EndIf
  5765. !insertmacro: end of _EndIf
  5766. !insertmacro: !getdebug
  5767. !insertmacro: end of !getdebug
  5768. Delete: "$4"
  5769. !insertmacro: NextPath
  5770. !undef: "_ForEachPath_Open"
  5771. !insertmacro: _Else
  5772. !insertmacro: end of _Else
  5773. Pop: $0
  5774. !insertmacro: _EndIf
  5775. !insertmacro: end of _EndIf
  5776. !insertmacro: _EndIf
  5777. !insertmacro: end of _EndIf
  5778. !insertmacro: _Loop
  5779. !insertmacro: end of _Loop
  5780. !insertmacro: _If
  5781. !insertmacro: end of _If
  5782. FindClose: $_FEP_FindHandle
  5783. StrCpy $_FEP_FindHandle "" () ()
  5784. !insertmacro: _EndIf
  5785. !insertmacro: end of _EndIf
  5786. !insertmacro: end of NextPath
  5787. !insertmacro: GetParentCall
  5788. !insertmacro: end of GetParentCall
  5789. !insertmacro: ReadRuntimeData
  5790. IfFileExists: "$DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini" ? 0 : +3
  5791. ReadINIStr $2 [FilesMove]:RemoveIfEmpty:$4 from $DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini
  5792. Goto: +2
  5793. ReadINIStr $2 [FilesMove]:RemoveIfEmpty:$4 from $PLUGINSDIR\runtimedata.ini
  5794. !insertmacro: end of ReadRuntimeData
  5795. !insertmacro: _If
  5796. !insertmacro: end of _If
  5797. RMDir: "$4"
  5798. !insertmacro: _EndIf
  5799. !insertmacro: end of _EndIf
  5800. !insertmacro: ForEachPath
  5801. !define: "_ForEachPath_Open"=""
  5802. !insertmacro: SplitAfterWildCard
  5803. Push: $1.BackupBy$AppID
  5804. !insertmacro: CallArtificialFunction
  5805. !define: "CallArtificialFunction_TYPE"="inst"
  5806. Call ":.SplitAfterWildCard_inst"
  5807. !undef: "CallArtificialFunction_TYPE"
  5808. !insertmacro: end of CallArtificialFunction
  5809. Pop: $_FEP_WildCardChild
  5810. Pop: $_FEP_WildCardPath
  5811. !insertmacro: end of SplitAfterWildCard
  5812. !insertmacro: GetParentCall
  5813. !insertmacro: end of GetParentCall
  5814. !insertmacro: GetFileExtCall
  5815. !insertmacro: end of GetFileExtCall
  5816. StrCpy $2 "" () ()
  5817. !insertmacro: _Do
  5818. !insertmacro: end of _Do
  5819. ClearErrors
  5820. !insertmacro: _If
  5821. !insertmacro: end of _If
  5822. StrCpy $3 "$1.BackupBy$AppID" () ()
  5823. !insertmacro: _IfNotThen
  5824. !insertmacro: end of _IfNotThen
  5825. !insertmacro: _Else
  5826. !insertmacro: end of _Else
  5827. !insertmacro: _If
  5828. !insertmacro: end of _If
  5829. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  5830. !insertmacro: _Else
  5831. !insertmacro: end of _Else
  5832. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  5833. !insertmacro: _EndIf
  5834. !insertmacro: end of _EndIf
  5835. StrCpy $3 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  5836. !insertmacro: _EndIf
  5837. !insertmacro: end of _EndIf
  5838. !insertmacro: _If
  5839. !insertmacro: end of _If
  5840. !insertmacro: _IfThen
  5841. !insertmacro: end of _IfThen
  5842. !insertmacro: _Goto
  5843. !insertmacro: end of _Goto
  5844. !insertmacro: _EndIf
  5845. !insertmacro: end of _EndIf
  5846. !insertmacro: _If
  5847. !insertmacro: end of _If
  5848. !insertmacro: _And
  5849. !insertmacro: end of _And
  5850. Push: $0
  5851. !insertmacro: GetFileExtCall
  5852. !insertmacro: end of GetFileExtCall
  5853. !insertmacro: _If
  5854. !insertmacro: end of _If
  5855. !insertmacro: _Or
  5856. !insertmacro: end of _Or
  5857. !insertmacro: _And
  5858. !insertmacro: end of _And
  5859. !insertmacro: _Or
  5860. !insertmacro: end of _Or
  5861. Pop: $0
  5862. !insertmacro: GetFileNameCall
  5863. !insertmacro: end of GetFileNameCall
  5864. !insertmacro: end of ForEachPath
  5865. !insertmacro: GetBaseNameCall
  5866. !insertmacro: end of GetBaseNameCall
  5867. !insertmacro: DebugMsg
  5868. !insertmacro: !getdebug
  5869. !insertmacro: end of !getdebug
  5870. !insertmacro: end of DebugMsg
  5871. Rename: $3->$4\$2
  5872. !insertmacro: NextPath
  5873. !undef: "_ForEachPath_Open"
  5874. !insertmacro: _Else
  5875. !insertmacro: end of _Else
  5876. Pop: $0
  5877. !insertmacro: _EndIf
  5878. !insertmacro: end of _EndIf
  5879. !insertmacro: _EndIf
  5880. !insertmacro: end of _EndIf
  5881. !insertmacro: _Loop
  5882. !insertmacro: end of _Loop
  5883. !insertmacro: _If
  5884. !insertmacro: end of _If
  5885. FindClose: $_FEP_FindHandle
  5886. StrCpy $_FEP_FindHandle "" () ()
  5887. !insertmacro: _EndIf
  5888. !insertmacro: end of _EndIf
  5889. !insertmacro: end of NextPath
  5890. !insertmacro: NextINIPair
  5891. !undef: "_ForEachINIPair_Open"
  5892. !insertmacro: _EndIf
  5893. !insertmacro: end of _EndIf
  5894. !insertmacro: _Loop
  5895. !insertmacro: end of _Loop
  5896. !insertmacro: _EndIf
  5897. !insertmacro: end of _EndIf
  5898. !insertmacro: end of NextINIPair
  5899. !insertmacro: end of FilesMove.nsh_PostPrimary
  5900. !insertmacro: end of RunSegment
  5901. !insertmacro: RunSegment
  5902. !insertmacro: !getdebug
  5903. !insertmacro: end of !getdebug
  5904. !insertmacro: DirectoriesCleanup.nsh_PostPrimary
  5905. StrCpy $R0 "1" () ()
  5906. !insertmacro: _Do
  5907. !insertmacro: end of _Do
  5908. ClearErrors
  5909. !insertmacro: ReadLauncherConfig
  5910. ReadINIStr $1 [DirectoriesCleanupIfEmpty]:$R0 from $LauncherFile
  5911. !insertmacro: end of ReadLauncherConfig
  5912. !insertmacro: _IfThen
  5913. !insertmacro: end of _IfThen
  5914. !insertmacro: ParseLocations
  5915. !insertmacro: !getdebug
  5916. !insertmacro: end of !getdebug
  5917. ExpandEnvStrings: $1->$1
  5918. !insertmacro: DebugMsg
  5919. !insertmacro: !getdebug
  5920. !insertmacro: end of !getdebug
  5921. !insertmacro: end of DebugMsg
  5922. !insertmacro: end of ParseLocations
  5923. !insertmacro: ForEachPath
  5924. !define: "_ForEachPath_Open"=""
  5925. !insertmacro: SplitAfterWildCard
  5926. Push: $1
  5927. !insertmacro: CallArtificialFunction
  5928. !define: "CallArtificialFunction_TYPE"="inst"
  5929. Call ":.SplitAfterWildCard_inst"
  5930. !undef: "CallArtificialFunction_TYPE"
  5931. !insertmacro: end of CallArtificialFunction
  5932. Pop: $_FEP_WildCardChild
  5933. Pop: $_FEP_WildCardPath
  5934. !insertmacro: end of SplitAfterWildCard
  5935. !insertmacro: GetParentCall
  5936. !insertmacro: end of GetParentCall
  5937. !insertmacro: GetFileExtCall
  5938. !insertmacro: end of GetFileExtCall
  5939. StrCpy $3 "" () ()
  5940. !insertmacro: _Do
  5941. !insertmacro: end of _Do
  5942. ClearErrors
  5943. !insertmacro: _If
  5944. !insertmacro: end of _If
  5945. StrCpy $2 "$1" () ()
  5946. !insertmacro: _IfNotThen
  5947. !insertmacro: end of _IfNotThen
  5948. !insertmacro: _Else
  5949. !insertmacro: end of _Else
  5950. !insertmacro: _If
  5951. !insertmacro: end of _If
  5952. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  5953. !insertmacro: _Else
  5954. !insertmacro: end of _Else
  5955. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  5956. !insertmacro: _EndIf
  5957. !insertmacro: end of _EndIf
  5958. StrCpy $2 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  5959. !insertmacro: _EndIf
  5960. !insertmacro: end of _EndIf
  5961. !insertmacro: _If
  5962. !insertmacro: end of _If
  5963. !insertmacro: _IfThen
  5964. !insertmacro: end of _IfThen
  5965. !insertmacro: _Goto
  5966. !insertmacro: end of _Goto
  5967. !insertmacro: _EndIf
  5968. !insertmacro: end of _EndIf
  5969. !insertmacro: _If
  5970. !insertmacro: end of _If
  5971. !insertmacro: _And
  5972. !insertmacro: end of _And
  5973. !insertmacro: _And
  5974. !insertmacro: end of _And
  5975. Push: $0
  5976. !insertmacro: GetFileExtCall
  5977. !insertmacro: end of GetFileExtCall
  5978. !insertmacro: _If
  5979. !insertmacro: end of _If
  5980. !insertmacro: _Or
  5981. !insertmacro: end of _Or
  5982. !insertmacro: _And
  5983. !insertmacro: end of _And
  5984. !insertmacro: _Or
  5985. !insertmacro: end of _Or
  5986. Pop: $0
  5987. !insertmacro: GetFileNameCall
  5988. !insertmacro: end of GetFileNameCall
  5989. !insertmacro: end of ForEachPath
  5990. !insertmacro: DebugMsg
  5991. !insertmacro: !getdebug
  5992. !insertmacro: end of !getdebug
  5993. !insertmacro: end of DebugMsg
  5994. RMDir: "$2"
  5995. !insertmacro: NextPath
  5996. !undef: "_ForEachPath_Open"
  5997. !insertmacro: _Else
  5998. !insertmacro: end of _Else
  5999. Pop: $0
  6000. !insertmacro: _EndIf
  6001. !insertmacro: end of _EndIf
  6002. !insertmacro: _EndIf
  6003. !insertmacro: end of _EndIf
  6004. !insertmacro: _Loop
  6005. !insertmacro: end of _Loop
  6006. !insertmacro: _If
  6007. !insertmacro: end of _If
  6008. FindClose: $_FEP_FindHandle
  6009. StrCpy $_FEP_FindHandle "" () ()
  6010. !insertmacro: _EndIf
  6011. !insertmacro: end of _EndIf
  6012. !insertmacro: end of NextPath
  6013. IntOp: $R0=$R0+1
  6014. !insertmacro: _Loop
  6015. !insertmacro: end of _Loop
  6016. StrCpy $R0 "1" () ()
  6017. !insertmacro: _Do
  6018. !insertmacro: end of _Do
  6019. ClearErrors
  6020. !insertmacro: ReadLauncherConfig
  6021. ReadINIStr $1 [DirectoriesCleanupForce]:$R0 from $LauncherFile
  6022. !insertmacro: end of ReadLauncherConfig
  6023. !insertmacro: _IfThen
  6024. !insertmacro: end of _IfThen
  6025. !insertmacro: ParseLocations
  6026. !insertmacro: !getdebug
  6027. !insertmacro: end of !getdebug
  6028. ExpandEnvStrings: $1->$1
  6029. !insertmacro: DebugMsg
  6030. !insertmacro: !getdebug
  6031. !insertmacro: end of !getdebug
  6032. !insertmacro: end of DebugMsg
  6033. !insertmacro: end of ParseLocations
  6034. !insertmacro: ForEachPath
  6035. !define: "_ForEachPath_Open"=""
  6036. !insertmacro: SplitAfterWildCard
  6037. Push: $1
  6038. !insertmacro: CallArtificialFunction
  6039. !define: "CallArtificialFunction_TYPE"="inst"
  6040. Call ":.SplitAfterWildCard_inst"
  6041. !undef: "CallArtificialFunction_TYPE"
  6042. !insertmacro: end of CallArtificialFunction
  6043. Pop: $_FEP_WildCardChild
  6044. Pop: $_FEP_WildCardPath
  6045. !insertmacro: end of SplitAfterWildCard
  6046. !insertmacro: GetParentCall
  6047. !insertmacro: end of GetParentCall
  6048. !insertmacro: GetFileExtCall
  6049. !insertmacro: end of GetFileExtCall
  6050. StrCpy $3 "" () ()
  6051. !insertmacro: _Do
  6052. !insertmacro: end of _Do
  6053. ClearErrors
  6054. !insertmacro: _If
  6055. !insertmacro: end of _If
  6056. StrCpy $2 "$1" () ()
  6057. !insertmacro: _IfNotThen
  6058. !insertmacro: end of _IfNotThen
  6059. !insertmacro: _Else
  6060. !insertmacro: end of _Else
  6061. !insertmacro: _If
  6062. !insertmacro: end of _If
  6063. FindFirst: spec="$_FEP_WildCardPath" handle=$_FEP_FindHandle output=$_FEP_FoundName
  6064. !insertmacro: _Else
  6065. !insertmacro: end of _Else
  6066. FindNext: handle=$_FEP_FindHandle output=$_FEP_FoundName
  6067. !insertmacro: _EndIf
  6068. !insertmacro: end of _EndIf
  6069. StrCpy $2 "$_FEP_WildCardParent\$_FEP_FoundName$_FEP_WildCardChild" () ()
  6070. !insertmacro: _EndIf
  6071. !insertmacro: end of _EndIf
  6072. !insertmacro: _If
  6073. !insertmacro: end of _If
  6074. !insertmacro: _IfThen
  6075. !insertmacro: end of _IfThen
  6076. !insertmacro: _Goto
  6077. !insertmacro: end of _Goto
  6078. !insertmacro: _EndIf
  6079. !insertmacro: end of _EndIf
  6080. !insertmacro: _If
  6081. !insertmacro: end of _If
  6082. !insertmacro: _And
  6083. !insertmacro: end of _And
  6084. !insertmacro: _And
  6085. !insertmacro: end of _And
  6086. Push: $0
  6087. !insertmacro: GetFileExtCall
  6088. !insertmacro: end of GetFileExtCall
  6089. !insertmacro: _If
  6090. !insertmacro: end of _If
  6091. !insertmacro: _Or
  6092. !insertmacro: end of _Or
  6093. !insertmacro: _And
  6094. !insertmacro: end of _And
  6095. !insertmacro: _Or
  6096. !insertmacro: end of _Or
  6097. Pop: $0
  6098. !insertmacro: GetFileNameCall
  6099. !insertmacro: end of GetFileNameCall
  6100. !insertmacro: end of ForEachPath
  6101. !insertmacro: DebugMsg
  6102. !insertmacro: !getdebug
  6103. !insertmacro: end of !getdebug
  6104. !insertmacro: end of DebugMsg
  6105. RMDir: /r "$2"
  6106. !insertmacro: NextPath
  6107. !undef: "_ForEachPath_Open"
  6108. !insertmacro: _Else
  6109. !insertmacro: end of _Else
  6110. Pop: $0
  6111. !insertmacro: _EndIf
  6112. !insertmacro: end of _EndIf
  6113. !insertmacro: _EndIf
  6114. !insertmacro: end of _EndIf
  6115. !insertmacro: _Loop
  6116. !insertmacro: end of _Loop
  6117. !insertmacro: _If
  6118. !insertmacro: end of _If
  6119. FindClose: $_FEP_FindHandle
  6120. StrCpy $_FEP_FindHandle "" () ()
  6121. !insertmacro: _EndIf
  6122. !insertmacro: end of _EndIf
  6123. !insertmacro: end of NextPath
  6124. IntOp: $R0=$R0+1
  6125. !insertmacro: _Loop
  6126. !insertmacro: end of _Loop
  6127. !insertmacro: end of DirectoriesCleanup.nsh_PostPrimary
  6128. !insertmacro: end of RunSegment
  6129. !insertmacro: RunSegment
  6130. !insertmacro: !getdebug
  6131. !insertmacro: end of !getdebug
  6132. !insertmacro: RunLocally.nsh_PostPrimary
  6133. !insertmacro: _If
  6134. !insertmacro: end of _If
  6135. !insertmacro: DebugMsg
  6136. !insertmacro: !getdebug
  6137. !insertmacro: end of !getdebug
  6138. !insertmacro: end of DebugMsg
  6139. RMDir: /r "$TMP\$AppIDLive"
  6140. !insertmacro: _EndIf
  6141. !insertmacro: end of _EndIf
  6142. !insertmacro: end of RunLocally.nsh_PostPrimary
  6143. !insertmacro: end of RunSegment
  6144. !insertmacro: RunSegment
  6145. !insertmacro: !getdebug
  6146. !insertmacro: end of !getdebug
  6147. !insertmacro: Temp.nsh_PostPrimary
  6148. !insertmacro: _If
  6149. !insertmacro: end of _If
  6150. !insertmacro: _And
  6151. !insertmacro: end of _And
  6152. !insertmacro: DebugMsg
  6153. !insertmacro: !getdebug
  6154. !insertmacro: end of !getdebug
  6155. !insertmacro: end of DebugMsg
  6156. RMDir: /r "$TempDirectory"
  6157. !insertmacro: _EndIf
  6158. !insertmacro: end of _EndIf
  6159. !insertmacro: end of Temp.nsh_PostPrimary
  6160. !insertmacro: end of RunSegment
  6161. !insertmacro: RunSegment
  6162. !insertmacro: end of RunSegment
  6163. FunctionEnd
  6164. Function: "PostSecondary"
  6165. !insertmacro: RunSegment
  6166. !insertmacro: end of RunSegment
  6167. FunctionEnd
  6168. Function: "Post"
  6169. !insertmacro: RunSegment
  6170. !insertmacro: !getdebug
  6171. !insertmacro: end of !getdebug
  6172. !insertmacro: RefreshShellIcons.nsh_Post
  6173. !insertmacro: _If
  6174. !insertmacro: end of _If
  6175. !insertmacro: _Or
  6176. !insertmacro: end of _Or
  6177. !insertmacro: RefreshShellIconsCall
  6178. !insertmacro: end of RefreshShellIconsCall
  6179. !insertmacro: _EndIf
  6180. !insertmacro: end of _EndIf
  6181. !insertmacro: end of RefreshShellIcons.nsh_Post
  6182. !insertmacro: end of RunSegment
  6183. !insertmacro: RunSegment
  6184. !insertmacro: end of RunSegment
  6185. FunctionEnd
  6186. Function: "Unload"
  6187. !insertmacro: RunSegment
  6188. !insertmacro: !getdebug
  6189. !insertmacro: end of !getdebug
  6190. !insertmacro: XML.nsh_Unload
  6191. !insertmacro: end of XML.nsh_Unload
  6192. !insertmacro: end of RunSegment
  6193. !insertmacro: RunSegment
  6194. !insertmacro: !getdebug
  6195. !insertmacro: end of !getdebug
  6196. !insertmacro: Registry.nsh_Unload
  6197. !insertmacro: _IfThen
  6198. !insertmacro: end of _IfThen
  6199. !insertmacro: end of Registry.nsh_Unload
  6200. !insertmacro: end of RunSegment
  6201. !insertmacro: RunSegment
  6202. !insertmacro: !getdebug
  6203. !insertmacro: end of !getdebug
  6204. !insertmacro: SplashScreen.nsh_Unload
  6205. !insertmacro: _If
  6206. !insertmacro: end of _If
  6207. Plugin Command: stop /WAIT
  6208. !insertmacro: _EndIf
  6209. !insertmacro: end of _EndIf
  6210. !insertmacro: end of SplashScreen.nsh_Unload
  6211. !insertmacro: end of RunSegment
  6212. !insertmacro: RunSegment
  6213. !insertmacro: !getdebug
  6214. !insertmacro: end of !getdebug
  6215. !insertmacro: Core.nsh_Unload
  6216. FileClose: $_FEIP_FileHandle
  6217. Delete: "$PLUGINSDIR\launcher.ini"
  6218. !insertmacro: _If
  6219. !insertmacro: end of _If
  6220. !insertmacro: ReadRuntimeData
  6221. IfFileExists: "$DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini" ? 0 : +3
  6222. ReadINIStr $0 [PortableApps.comLauncher]:PluginsDir from $DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini
  6223. Goto: +2
  6224. ReadINIStr $0 [PortableApps.comLauncher]:PluginsDir from $PLUGINSDIR\runtimedata.ini
  6225. !insertmacro: end of ReadRuntimeData
  6226. !insertmacro: _If
  6227. !insertmacro: end of _If
  6228. !insertmacro: _And
  6229. !insertmacro: end of _And
  6230. RMDir: /r "$0"
  6231. !insertmacro: _EndIf
  6232. !insertmacro: end of _EndIf
  6233. Delete: "$DataDirectory\PortableApps.comLauncherRuntimeData-$BaseName.ini"
  6234. !insertmacro: _EndIf
  6235. !insertmacro: end of _EndIf
  6236. Delete: "$PLUGINSDIR\runtimedata.ini"
  6237. Plugin Command: Free 0
  6238. !insertmacro: end of Core.nsh_Unload
  6239. !insertmacro: end of RunSegment
  6240. !insertmacro: RunSegment
  6241. !insertmacro: end of RunSegment
  6242. FunctionEnd
  6243. !define: "CallPS"="!insertmacro CallPS"
  6244. Section: ""
  6245. Call "Init"
  6246. Plugin Command: Call Kernel32::OpenMutex(i1048576, b0, t"PortableApps.comLauncher$AppID-$BaseName::Starting") i.R0 ?e
  6247. Plugin Command: Call Kernel32::CloseHandle(iR0)
  6248. Pop: $R9
  6249. !insertmacro: _If
  6250. !insertmacro: end of _If
  6251. MessageBox: 16: "$(LauncherAlreadyStarting)"
  6252. Quit
  6253. !insertmacro: _EndIf
  6254. !insertmacro: end of _EndIf
  6255. Plugin Command: Call Kernel32::OpenMutex(i1048576, i0, t"PortableApps.comLauncher$AppID-$BaseName::Stopping") i.R0 ?e
  6256. Plugin Command: Call Kernel32::CloseHandle(iR0)
  6257. Pop: $R9
  6258. !insertmacro: _If
  6259. !insertmacro: end of _If
  6260. MessageBox: 16: "$(LauncherAlreadyStopping)"
  6261. Quit
  6262. !insertmacro: _EndIf
  6263. !insertmacro: end of _EndIf
  6264. !insertmacro: _If
  6265. !insertmacro: end of _If
  6266. !insertmacro: _Or
  6267. !insertmacro: end of _Or
  6268. !insertmacro: _If
  6269. !insertmacro: end of _If
  6270. Plugin Command: Call Kernel32::CreateMutex(i0, i0, t"PortableApps.comLauncher$AppID-$BaseName::Starting") i.r0
  6271. StrCpy $StatusMutex "$0" () ()
  6272. !insertmacro: _EndIf
  6273. !insertmacro: end of _EndIf
  6274. !insertmacro: CallPS
  6275. Call "Pre"
  6276. !insertmacro: _If
  6277. !insertmacro: end of _If
  6278. Call "PreSecondary"
  6279. !insertmacro: _Else
  6280. !insertmacro: end of _Else
  6281. Call "PrePrimary"
  6282. !insertmacro: _EndIf
  6283. !insertmacro: end of _EndIf
  6284. !insertmacro: end of CallPS
  6285. !insertmacro: CallPS
  6286. Call "PreExec"
  6287. !insertmacro: _If
  6288. !insertmacro: end of _If
  6289. Call "PreExecSecondary"
  6290. !insertmacro: _Else
  6291. !insertmacro: end of _Else
  6292. Call "PreExecPrimary"
  6293. !insertmacro: _EndIf
  6294. !insertmacro: end of _EndIf
  6295. !insertmacro: end of CallPS
  6296. !insertmacro: _If
  6297. !insertmacro: end of _If
  6298. StrCpy $0 "$StatusMutex" () ()
  6299. Plugin Command: Call Kernel32::CloseHandle(ir0) ?e
  6300. Pop: $R9
  6301. !insertmacro: _EndIf
  6302. !insertmacro: end of _EndIf
  6303. Call "Execute"
  6304. !insertmacro: _Else
  6305. !insertmacro: end of _Else
  6306. MessageBox: 16: "$(LauncherCrashCleanup)"
  6307. !insertmacro: _EndIf
  6308. !insertmacro: end of _EndIf
  6309. !insertmacro: _If
  6310. !insertmacro: end of _If
  6311. Plugin Command: Call Kernel32::CreateMutex(i0, i0, t"PortableApps.comLauncher$AppID-$BaseName::Stopping")
  6312. !insertmacro: _EndIf
  6313. !insertmacro: end of _EndIf
  6314. !insertmacro: _If
  6315. !insertmacro: end of _If
  6316. !insertmacro: CallPS
  6317. !insertmacro: _If
  6318. !insertmacro: end of _If
  6319. Call "PostSecondary"
  6320. !insertmacro: _Else
  6321. !insertmacro: end of _Else
  6322. Call "PostPrimary"
  6323. !insertmacro: _EndIf
  6324. !insertmacro: end of _EndIf
  6325. Call "Post"
  6326. !insertmacro: end of CallPS
  6327. !insertmacro: _EndIf
  6328. !insertmacro: end of _EndIf
  6329. Call "Unload"
  6330. SectionEnd
  6331. Function: ".onInstFailed"
  6332. Call "Unload"
  6333. FunctionEnd
  6334.  
  6335. Processed 1 file, writing output:
  6336. Adding plug-ins initializing function... Done!
  6337. Processing pages... Done!
  6338. Removing unused resources... Done!
  6339. Generating language tables... Done!
  6340.  
  6341. Output: "E:\PortableApps\JustGesturePortable\JustGesturePortable.exe"
  6342. Install: 0 pages (0 bytes), 1 section (16416 bytes), 4842 instructions (135576 bytes), 1441 strings (121270 bytes), 24 language tables (5808 bytes).
  6343. Datablock optimizer saved 358464 bytes (~66.5%).
  6344.  
  6345. Using lzma (compress whole) compression.
  6346.  
  6347. EXE header size: 86528 / 50176 bytes
  6348. Install code: (279398 bytes)
  6349. Install data: (93728 bytes)
  6350. Compressed data: 74296 / 373126 bytes
  6351. CRC (0x0B1963B0): 4 / 4 bytes
  6352.  
  6353. Total size: 160828 / 423306 bytes (37.9%)
  6354.  
  6355. 2 warnings:
  6356. !include: could not find: "E:\PortableApps\JustGesturePortable\App\AppInfo\Launcher\Custom.nsh" (Segments.nsh:122)
  6357. !include: could not find: "E:\PortableApps\JustGesturePortable\App\AppInfo\Launcher\Debug.nsh" (Debug.nsh:87)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement