Mgamerz

PEOM 1.5.2 Installer w/ ALOT check

Jun 11th, 2020
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.96 KB | None | 0 0
  1. ;PEOM Install Script
  2. ;============================================================================
  3. ; DEFINITIONS -- adding these allows you to use them as "shortcuts" later on
  4.  
  5. !define PRODUCT_NAME "Priority Earth Overhaul Mod"
  6. !define PRODUCT_VERSION "1.5.2"
  7.  
  8. ;=============================================================================
  9. ; HEADER FILES -- add various functionalities to your installer; these .nsh files must be in your NSIS directory
  10.  
  11. ; Modern User Interface (MUI) -- Allows use of the "typical" Windows installer interface most people are familiar with
  12. !include "MUI.nsh"
  13.  
  14. ; InstallOptions -- Allows for creation of Custom Pages
  15. !include "InstallOptions.nsh"
  16.  
  17. ; Logic Library -- Allows If/Then/Else functionality
  18. !include "LogicLib.nsh"
  19.  
  20. ; nsDialogs -- Allows for special dialogue windows to be created
  21. !include "nsDialogs.nsh"
  22.  
  23. ; WinMessages
  24. !include "winmessages.nsh"
  25.  
  26. ; WinImage -- Removes the 2GB limit in NSIS
  27. Unicode True
  28. RequestExecutionLevel Admin
  29.  
  30. ; Use LZMA compression
  31. ; Allows you to open archive with 7z maybe
  32. SetCompressor BZIP2
  33.  
  34. ;===============================================================================
  35. ; MUI CONFIG -- sets up the appearance of each page of the installer via MUI definitions; relative paths ("..\graphics_docs\icon_v1.ico") should always be used
  36.  
  37. !define MUI_ABORTWARNING
  38. !define MUI_HEADERIMAGE
  39. !define MUI_WELCOMEPAGE_TITLE_3LINES
  40. !define MUI_ICON "Icons\peom.ico"
  41. !define MUI_HEADERIMAGE_BITMAP "Icons\peomheader.bmp"
  42. !define MUI_WELCOMEFINISHPAGE_BITMAP "Icons\peomwelcome.bmp"
  43. !define MUI_WELCOMEPAGE_TITLE "Welcome to the Priority Earth Overhaul Mod Stage ${PRODUCT_VERSION} Install Wizard!"
  44. !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of Priority Earth Overhaul Mod Stage ${PRODUCT_VERSION}.\r\n\r\nClick Next to continue."
  45. !define MUI_DIRECTORYPAGE_TEXT_TOP "Please verify the installer has correctly detected your Mass Effect 3 installation folder. If the location below is incorrect, please change it manually. Click Install when ready."
  46. !define MUI_LICENSEPAGE_TEXT_TOP "Please read our FAQ regarding mod compatibility and installation."
  47. ;!define MUI_COMPONENTSPAGE_TEXT_TOP "Please select which components you wish to install. Click Next when finished."
  48. ;!define MUI_COMPONENTSPAGE_TEXT_COMPLIST "NOTE: SELECT ONLY ONE ENDING COMPATIBILITY COMPONENT! Selecting multiple will cause severe incompatibility bugs. Only choose the one that is relevant to your mod list. "
  49. !define MUI_COMPONENTSPAGE_NODESC
  50. !define MUI_CUSTOMFUNCTION_GUIINIT onguiinit
  51. !define MUI_FINISHPAGE_TITLE "Installation Successful!"
  52. !define MUI_FINISHPAGE_TEXT "Thank you for installing Priority Earth Overhaul Mod Stage ${PRODUCT_VERSION}!\r\n\r\nClick Finish to close this window."
  53.  
  54. ;============================================================================================
  55. ; OTHER
  56.  
  57. BrandingText "PEOM Installer v${PRODUCT_VERSION}"
  58. ;the above re-defines the standard "NullSoft Install System" that appears toward the bottom left of the installer window, to whatever you specify
  59.  
  60. ;============================================================================================
  61. ; PAGES -- all pages for your installer must be listed here, in the order that you want them to appear; included are two custom pages
  62.  
  63. !insertmacro MUI_PAGE_WELCOME
  64. !define MUI_PAGE_CUSTOMFUNCTION_PRE pagecbcmpnorm
  65. !define MUI_LICENSEPAGE_CHECKBOX
  66. !insertmacro MUI_PAGE_LICENSE "readme.rtf"
  67. !define MUI_PAGE_CUSTOMFUNCTION_PRE pagecbcmpplugin
  68. !define MUI_PAGE_CUSTOMFUNCTION_SHOW pagecbcmppluginshow
  69. !define MUI_PAGE_CUSTOMFUNCTION_LEAVE pagecbcmppluginleave
  70. !insertmacro MUI_PAGE_COMPONENTS
  71. !insertmacro MUI_PAGE_DIRECTORY
  72. !insertmacro MUI_PAGE_INSTFILES
  73. !insertmacro MUI_PAGE_FINISH
  74.  
  75. ;==============================================================================
  76. ; LANGUAGES -- self explanatory
  77.  
  78. !insertmacro MUI_LANGUAGE "English"
  79.  
  80. ;======================================================================================
  81. ; INSTALLATION PARAMETERS -- This is where are the files for installation are specified and the file name of the installer.
  82.  
  83. Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
  84. OutFile "Priority Earth Overhaul Mod v${PRODUCT_VERSION} - Executable Installer.exe"
  85. InstallDir "$PROGRAMFILES\Origin Games\Mass Effect 3"
  86. InstallDirRegKey HKLM "Software\BioWare\Mass Effect 3" "Install Dir"
  87. ShowInstDetails show
  88.  
  89. Section "-ALOT Check" SEC00
  90. ; Check if ALOT is installed
  91. SetOutPath "$INSTDIR\Binaries"
  92. File "ALOTDetector.exe"
  93. nsExec::ExecToLog '"$INSTDIR\Binaries\ALOTDetector.exe" 3 "$INSTDIR"'
  94. Pop $0 #return code
  95. var /GLOBAL AlotReturnCode
  96. StrCpy $AlotReturnCode $0
  97. Delete '"$INSTDIR\Binaries\ALOTDetector.exe"'
  98.  
  99. ${If} $AlotReturnCode == -1
  100. DetailPrint "ALOTDetector.exe return code -1: Wrong number of arguments to program"
  101. # This should abort as it means this is definitely the wrong usage
  102. ${EndIf}
  103. ${If} $AlotReturnCode == -2
  104. DetailPrint "ALOTDetector.exe return code -2: Specified path not found. Ensure you've selected the game directory"
  105. # This should abort as it means the passed parameter is wrong,
  106. # thoug installer will create directory before the exe is run so it might not actually matter.
  107. # It means game path specified is not found so it's not actually installing into the game directory
  108. ${EndIf}
  109. ${If} $AlotReturnCode == -3
  110. DetailPrint "ALOTDetector.exe return code -3: Invalid game number"
  111. # This should abort as it means this is definitely the wrong usage
  112. ${EndIf}
  113. ${If} $AlotReturnCode == -4
  114. DetailPrint "ALOTDetector.exe return code -4: Marker file not found! Is this game properly installed?"
  115. # Should abort? This file missing means marker could not be found.
  116. # Will appear if game is
  117. ${EndIf}
  118. ${If} $AlotReturnCode == 0
  119. DetailPrint "ALOTDetector.exe return code 0: ALOT not detected"
  120. ${EndIf}
  121. ${If} $AlotReturnCode == 1
  122. DetailPrint "ALOTDetector.exe return code 1: ALOT detected!"
  123. DetailPrint "Textures detected as previously installed"
  124. DetailPrint "Textures MUST be installed after content mods"
  125. StrCpy $1 "Textures have previously been installed into this installation (through Mass Effect Modder or ALOT Installer). Installing this mod after installing textures is not supported and will break your game. ALOTDetector return code: "
  126. StrCpy $2 $0
  127. MessageBox MB_OK $1$2
  128. ${EndIf}
  129. ${If} $AlotReturnCode != 0
  130. StrCpy $1 "Installation aborted due to ALOTDetector.exe return code "
  131. DetailPrint $1$0
  132. abort
  133. ${EndIf}
  134. SectionEnd
  135.  
  136. Section "PEOM Stage ${PRODUCT_VERSION} Core" SEC01
  137. SectionIn RO
  138. SetOutPath "$INSTDIR\"
  139. SetOverwrite on
  140.  
  141. ; Deletes any old version of PEOM, then creates PEOM folder and installs all files up until the end of the conduit run
  142.  
  143. RMDir /r "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\"
  144. RMDir /r "$INSTDIR\BIOGame\DLC\DLC_MOD_EGM_PEOM"
  145. RMDir /r "$INSTDIR\BIOGame\DLC\DLC_MOD_PEOM_BO_Patch"
  146.  
  147. CreateDirectory "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\"
  148. CreateDirectory "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\CookedPCConsole"
  149. CreateDirectory "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\Movies"
  150.  
  151. ;Copy DLC_CON_PEOM
  152. SetOutPath "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM"
  153. File /r /x desktop.ini /x thumbs.db "PEOM\DLC_CON_PEOM\"
  154.  
  155. ; Make sure these are ASI versions
  156. SetOutPath "$INSTDIR\Binaries\Win32"
  157. File "Binkw32\binkw23.dll"
  158. File "Binkw32\binkw32.dll"
  159. SectionEnd
  160.  
  161. Section /o "Atmosphere Update" SEC_ATMO
  162. SetOutPath "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\CookedPCConsole"
  163. File /x desktop.ini /x thumbs.db "PEOM\Alternates\Atmosphere\"
  164. SectionEnd
  165.  
  166. Section /o "(1) Vanilla Endings Compatibility" SEC02
  167.  
  168. ;Install all files post Conduit run
  169.  
  170. SetOutPath "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\CookedPCConsole"
  171. File "PEOM\Compatibility\Endings\CookedPCConsole\BioA_End002_Space.pcc"
  172. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002.pcc"
  173. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_100Opening.pcc"
  174. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_100Opening_LOC_INT.pcc"
  175. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_200Tunnel.pcc"
  176. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_200Tunnel_LOC_INT.pcc"
  177. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_300TIMConflict.pcc"
  178. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_300TIMConflict_LOC_INT.pcc"
  179. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_400Guardian.pcc"
  180. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_400Guardian_LOC_INT.pcc"
  181. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_500Choice.pcc"
  182. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_710MemorialRed.pcc"
  183. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_710MemorialRed_LOC_INT.pcc"
  184. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_720MemorialBlue.pcc"
  185. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_720MemorialBlue_LOC_INT.pcc"
  186. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_730MemorialGreen.pcc"
  187. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_730MemorialGreen_LOC_INT.pcc"
  188.  
  189. SetOutPath "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\Movies"
  190. File "PEOM\Compatibility\Endings\Movies\End04_Andromeda_Teaser.bik"
  191. File "PEOM\Compatibility\Endings\Movies\Extended_Refusal.bik"
  192.  
  193. SectionEnd
  194.  
  195. Section /o "(1) Vanilla Endings/ThaneMod Compatibility" SEC03
  196.  
  197. ;Install all files post Conduit run EXCEPT Memorial files
  198.  
  199. SetOutPath "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\CookedPCConsole"
  200. File "PEOM\Compatibility\Endings\CookedPCConsole\BioA_End002_Space.pcc"
  201. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002.pcc"
  202. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_100Opening.pcc"
  203. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_100Opening_LOC_INT.pcc"
  204. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_200Tunnel.pcc"
  205. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_200Tunnel_LOC_INT.pcc"
  206. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_300TIMConflict.pcc"
  207. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_300TIMConflict_LOC_INT.pcc"
  208. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_400Guardian.pcc"
  209. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_400Guardian_LOC_INT.pcc"
  210. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_500Choice.pcc"
  211.  
  212. SetOutPath "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\Movies"
  213. File "PEOM\Compatibility\Endings\Movies\End04_Andromeda_Teaser.bik"
  214. File "PEOM\Compatibility\Endings\Movies\Extended_Refusal.bik"
  215.  
  216. SectionEnd
  217.  
  218. Section /o "(1) MEHEM Compatibility" SEC04
  219.  
  220. ;INSTALLS ALL FILES UP TO ANDERON'S DEATH
  221.  
  222. SetOutPath "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\CookedPCConsole"
  223. File "PEOM\Compatibility\Endings\CookedPCConsole\BioA_End002_Space.pcc"
  224. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_100Opening.pcc"
  225. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_100Opening_LOC_INT.pcc"
  226. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_200Tunnel.pcc"
  227. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_200Tunnel_LOC_INT.pcc"
  228. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_300TIMConflict.pcc"
  229. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_300TIMConflict_LOC_INT.pcc"
  230.  
  231. SectionEnd
  232.  
  233. Section /o "(1) JAM Compatibility" SEC05
  234.  
  235. ;INSTALLS ALL FILES UP TO ANDERON'S DEATH
  236.  
  237. SetOutPath "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\CookedPCConsole"
  238. File "PEOM\Compatibility\Endings\CookedPCConsole\BioA_End002_Space.pcc"
  239. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_100Opening.pcc"
  240. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_100Opening_LOC_INT.pcc"
  241. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_200Tunnel.pcc"
  242. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_200Tunnel_LOC_INT.pcc"
  243. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_300TIMConflict.pcc"
  244. File "PEOM\Compatibility\Endings\CookedPCConsole\BioD_End002_300TIMConflict_LOC_INT.pcc"
  245.  
  246. SectionEnd
  247.  
  248. Section /o "(1) LIME Compatibility" SEC06
  249.  
  250. ; INSTALLS NOTHING
  251. ; BUT LEAVE HERE TO MAKE USERS THINK WE WROTE SOMETHING FOR EM
  252.  
  253. SectionEnd
  254.  
  255. Section /o "EGM Continuity Patch" SEC07
  256.  
  257. ;INSTALLS HACKETT SPEECH PCC + BIK
  258.  
  259. SetOutPath "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\CookedPCConsole"
  260. SetOverwrite on
  261. File "PEOM\Compatibility\EGM\CookedPCConsole\BioD_Nor_610EndIntro.pcc"
  262. File "PEOM\Compatibility\EGM\CookedPCConsole\Default_DLC_CON_PEOM.bin"
  263.  
  264. SetOutPath "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\Movies"
  265. SetOverwrite on
  266. File "PEOM\Compatibility\EGM\Movies\NorEnd_Hackett_Speech_Intro.bik"
  267.  
  268. SectionEnd
  269.  
  270. Section /o "Project Variety Patch" SEC08
  271.  
  272. ;INSTALLS PV PATCH
  273.  
  274. SetOutPath "$INSTDIR\BIOGame\DLC\DLC_CON_PEOM\CookedPCConsole"
  275. SetOverwrite on
  276. File "PEOM\Compatibility\ProjectVariety\BioD_PEOM_105_Intro.pcc"
  277.  
  278. SectionEnd
  279.  
  280. Section "-AutoTOC" SEC09
  281. ; Must be selected
  282. SectionIn RO
  283.  
  284. ; AutoTOC game
  285. SetOutPath "$INSTDIR\Binaries"
  286. File "AutoTOC.exe"
  287. nsExec::ExecToLog '"$INSTDIR\Binaries\AutoTOC.exe" "$INSTDIR"'
  288. Delete '"$INSTDIR\Binaries\AutoTOC.exe"'
  289.  
  290. SectionEnd
  291.  
  292.  
  293.  
  294. ;======================================================================================================
  295. ; COMPONENTS CODE -- This is all the code that allows for the image-based components page to function.
  296. ; Unless adding more sections DO NOT TOUCH THIS.
  297.  
  298.  
  299. Function onguiinit
  300. InitPluginsDir
  301. StrCpy $0 0
  302. ClearErrors
  303. loop:
  304. SectionGetFlags $0 $1
  305. IfErrors done
  306. SectionGetText $0 $1
  307. WriteIniStr "$pluginsdir\cmpnt.ini" "S" $0 $1
  308. IntOp $0 $0 + 1
  309. goto loop
  310. done:
  311.  
  312. ;=========================================================================================================================================================
  313. ; INSTALLER SECTION DESCRIPTIONS & IMAGES -- defines the rollover text and images that appear when the section names are moused over in the installer GUI
  314.  
  315. WriteIniStr "$pluginsdir\cmpnt.ini" "PData" "${SEC01}:txt" "Requires: Extended Cut/Leviathan DLC - Core PEOM Stage ${PRODUCT_VERSION}."
  316. WriteIniStr "$pluginsdir\cmpnt.ini" "PData" "${SEC_ATMO}:txt" "Adds fog/smoke/god rays to London, making it far more atmospheric and immersive."
  317. WriteIniStr "$pluginsdir\cmpnt.ini" "PData" "${SEC02}:txt" "Select if NOT using an ending mod. Incompatible with ThaneMod."
  318. WriteIniStr "$pluginsdir\cmpnt.ini" "PData" "${SEC03}:txt" "Select if using ThaneMod and NOT using an ending mod."
  319. WriteIniStr "$pluginsdir\cmpnt.ini" "PData" "${SEC04}:txt" "Select this if using Mass Effect Happy Ending Mod. Compatible with ThaneMod."
  320. WriteIniStr "$pluginsdir\cmpnt.ini" "PData" "${SEC05}:txt" "Select this if using JohnP's Alternate MEHEM. Compatible with ThaneMod."
  321. WriteIniStr "$pluginsdir\cmpnt.ini" "PData" "${SEC06}:txt" "Select this if using Less Is More Endings. Incompatible with ThaneMod"
  322. WriteIniStr "$pluginsdir\cmpnt.ini" "PData" "${SEC07}:txt" "Install this patch if using Expanded Galaxy Mod."
  323. WriteIniStr "$pluginsdir\cmpnt.ini" "PData" "${SEC08}:txt" "Install this patch if using Project Variety."
  324. File "/oname=$pluginsdir\cmpnt_p${SEC01}.bmp" "Icons\peomcore.bmp"
  325. File "/oname=$pluginsdir\cmpnt_p${SEC_ATMO}.bmp" "Icons\peomatmo.bmp"
  326. File "/oname=$pluginsdir\cmpnt_p${SEC02}.bmp" "Icons\peomvanilla.bmp"
  327. File "/oname=$pluginsdir\cmpnt_p${SEC03}.bmp" "Icons\peomvanillathane.bmp"
  328. File "/oname=$pluginsdir\cmpnt_p${SEC04}.bmp" "Icons\peommehem.bmp"
  329. File "/oname=$pluginsdir\cmpnt_p${SEC05}.bmp" "Icons\peomjam.bmp"
  330. File "/oname=$pluginsdir\cmpnt_p${SEC06}.bmp" "Icons\peomlime.bmp"
  331. File "/oname=$pluginsdir\cmpnt_p${SEC07}.bmp" "Icons\peomegm.bmp"
  332. File "/oname=$pluginsdir\cmpnt_p${SEC08}.bmp" "Icons\peompv.bmp"
  333. FunctionEnd
  334.  
  335. ;=======================================================================================================
  336. ; REMEMBER TO UPDATE THE TOTAL SECTION COUNT BELOW
  337. ; Set first IDX To first section and last secIdx to last section (the name SEC is not a count, but a name)
  338.  
  339. !define FIRSTPLUGINSECIDX ${SEC00}
  340. !define /math LASTPLUGINSECIDX ${SEC09} + 1
  341.  
  342. ;=======================================================================================================
  343. ; Functions
  344. ; Unless you are smart do not touch these
  345.  
  346. Function ToggleSections
  347. StrCpy $0 0
  348. ClearErrors
  349. loop:
  350. SectionGetFlags $0 $1
  351. IfErrors done
  352. SectionSetText $0 ""
  353. IntOp $0 $0 + 1
  354. goto loop
  355. done:
  356. Pop $0
  357. Pop $2
  358. loopset:
  359. ReadIniStr $1 "$pluginsdir\cmpnt.ini" "S" $0
  360. SectionSetText $0 $1
  361. IntOp $0 $0 + 1
  362. IntCmp $0 $2 0 loopset
  363. FunctionEnd
  364.  
  365.  
  366. Function pagecbcmpnorm
  367. Push ${FIRSTPLUGINSECIDX}
  368. Push 0
  369. call ToggleSections
  370. FunctionEnd
  371.  
  372. Function pagecbcmpplugin
  373. Push ${LASTPLUGINSECIDX}
  374. Push ${FIRSTPLUGINSECIDX}
  375. call ToggleSections
  376. FunctionEnd
  377.  
  378. !define ID_TOP 0x3FF
  379. !define ID_TXT 0x3FE
  380. !define ID_IMG 0x3EE
  381. !define ID_LST 0x408
  382.  
  383. Function pagecbcmppluginshow
  384. FindWindow $R0 "#32770" "" $HWNDPARENT
  385. GetDlgItem $2 $R0 ${ID_TOP}
  386. ShowWindow $2 0
  387.  
  388. System::Call '*(i,i,i,i)i.r1'
  389. System::Call 'user32::GetClientRect(i $R0,ir1)'
  390. System::Call '*$1(i,i,i.r8,i.r7)'
  391. System::Free $1
  392.  
  393. IntOp $8 $8 - 16 ;margin
  394. GetDlgItem $2 $R0 ${ID_LST}
  395. IntOp $6 $8 / 2
  396. System::Call 'user32::SetWindowPos(i$2,i0,i0,i0,ir6,ir7,i0x14)'
  397.  
  398. IntOp $6 $6 + 8 ;half of margin
  399. GetDlgItem $2 $R0 ${ID_IMG}
  400. ${NSD_AddStyle} $2 ${SS_BITMAP}
  401. IntOp $7 $7 - 38
  402. System::Call 'user32::SetWindowPos(i$2,i0,ir6,i0,ir6,ir7,i0x14)'
  403.  
  404. GetDlgItem $2 $R0 ${ID_TXT}
  405. IntOp $7 $7 + 8
  406. System::Call 'user32::SetWindowPos(i$2,i0,ir6,ir7,ir6,i 50,i0x14)'
  407.  
  408. StrCpy $9 0 ;make sure bitmap variable is null
  409. StrCpy $0 ${FIRSTPLUGINSECIDX}
  410. call .onMouseOverSection ;force update
  411. FunctionEnd
  412.  
  413. Function pagecbcmppluginleave
  414. ${NSD_FreeBitmap} $9
  415. StrCpy $9 0
  416. FunctionEnd
  417.  
  418. Function .onMouseOverSection
  419. ReadIniStr $1 "$pluginsdir\cmpnt.ini" "PData" "$0:txt"
  420. FindWindow $R0 "#32770" "" $HWNDPARENT
  421. GetDlgItem $2 $R0 ${ID_TXT}
  422. SendMessage $2 ${WM_SETTEXT} 0 "STR:$1"
  423. GetDlgItem $2 $R0 ${ID_IMG}
  424. call pagecbcmppluginleave
  425. ${NSD_SetBitmap} $2 "$pluginsdir\cmpnt_p$0.bmp" $9
  426. FunctionEnd
Add Comment
Please, Sign In to add comment