杉宫竹苑工作室

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 525|回复: 0

安装程序源码:易极OA协同办公系统

[复制链接]
发表于 2022-7-25 15:16:58 | 显示全部楼层 |阅读模式

正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!

您需要 登录 才可以下载或查看,没有账号?立即注册

x

  1. #=========================================================================================
  2. ; 头文件
  3. !include "MUI.nsh"
  4. !include "Sections.nsh"
  5. !include "LogicLib.nsh"
  6. #=========================================================================================
  7. #=========================================================================================
  8. ; 宏定义
  9. !define STR_AppName "易极OA协同办公系统"
  10. !define STR_Version "1.0"
  11. !define STR_Publisher "亿级空间"
  12. !define STR_HomepageUrl "http://www.yhxs3344.net"
  13. !define REG_AppBase "Software\EgOA"
  14. !define REG_Uninstall "Software\Microsoft\Windows\CurrentVersion\Uninstall\${STR_AppName}"
  15. #=========================================================================================
  16. #=========================================================================================
  17. ; MUI 设置
  18. !define MUI_ABORTWARNING
  19. !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
  20. !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
  21. !define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp"
  22. !define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange-uninstall.bmp"
  23. !define MUI_HEADERIMAGE
  24. !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\orange.bmp"
  25. !define MUI_HEADERIMAGE_UNBITMAP "${NSISDIR}\Contrib\Graphics\Header\orange-uninstall.bmp"
  26. ; 语言选择设置
  27. !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
  28. !define MUI_LANGDLL_REGISTRY_KEY "${REG_Uninstall}"
  29. !define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
  30. ; 组件页面设置
  31. !define MUI_COMPONENTSPAGE_SMALLDESC
  32. ; 开始菜单页面设置
  33. var STR_GroupName
  34. var TMP_GroupName
  35. !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
  36. !define MUI_STARTMENUPAGE_REGISTRY_KEY "${REG_Uninstall}"
  37. !define MUI_STARTMENUPAGE_DEFAULTFOLDER "${STR_AppName}"
  38. !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "NSIS:StartMenuDir"
  39. ; 完成安装页面设置
  40. !define MUI_FINISHPAGE_RUN "C:\Program Files\Internet Explorer\iexplore.exe -new www.google.com"
  41. !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR/help/index.html"
  42. !define MUI_FINISHPAGE_SHOWREADME_TEXT "$(LNG_ShowHelp)"
  43. !define MUI_FINISHPAGE_LINK "${STR_AppName} $(LNG_Homepage): ${STR_HomepageUrl}"
  44. !define MUI_FINISHPAGE_LINK_LOCATION "${STR_HomepageUrl}"
  45. ; 安装页面
  46. !insertmacro MUI_PAGE_WELCOME
  47. !insertmacro MUI_PAGE_LICENSE "$(LNG_License)"
  48. !insertmacro MUI_PAGE_DIRECTORY
  49. !insertmacro MUI_PAGE_COMPONENTS
  50. !insertmacro MUI_PAGE_STARTMENU Application $STR_GroupName
  51. !insertmacro MUI_PAGE_INSTFILES
  52. !insertmacro MUI_PAGE_FINISH
  53. ; 卸载页面
  54. !insertmacro MUI_UNPAGE_WELCOME
  55. !insertmacro MUI_UNPAGE_CONFIRM
  56. !insertmacro MUI_UNPAGE_INSTFILES
  57. !insertmacro MUI_UNPAGE_FINISH
  58. ; 语言支持
  59. !insertmacro MUI_LANGUAGE "SimpChinese"
  60. ;!insertmacro MUI_LANGUAGE "English"
  61. #=========================================================================================
  62. #=========================================================================================
  63. ; 语言相关字符串
  64. LicenseLangString LNG_License ${LANG_ENGLISH} ".\resource\EULA.txt"
  65. LangString LNG_BrandingText ${LANG_ENGLISH} "haijd Software"
  66. LangString LNG_DefaultInstation ${LANG_ENGLISH} "Default installtion"
  67. LangString LNG_FullInstation ${LANG_ENGLISH} "Full installtion"
  68. LangString LNG_MinimalInstation ${LANG_ENGLISH} "Minimal installtion"
  69. LangString LNG_Help ${LANG_ENGLISH} "Help"
  70. LangString LNG_Homepage ${LANG_ENGLISH} "Homepage"
  71. LangString LNG_Uninstall ${LANG_ENGLISH} "Uninstall"
  72. LangString LNG_ShowHelp ${LANG_ENGLISH} "Show Help"
  73. LangString LNG_ProgramFile ${LANG_ENGLISH} "Program Files"
  74. LangString LNG_EgOA ${LANG_ENGLISH} "Main program"
  75. LangString LNG_ServerEnv ${LANG_ENGLISH} "Services environment."
  76. LangString LNG_CreateShortcut ${LANG_ENGLISH} "Create Shortcut"
  77. LangString LNG_ProgramMenuShortcutGroup ${LANG_ENGLISH} "Program Menu Shortcut Group"
  78. LangString LNG_DesktopShortcut ${LANG_ENGLISH} "Desktop Shortcut"
  79. LangString LNG_QuickLaunchShortcut ${LANG_ENGLISH} "Quick Launch Bar Shortcut"
  80. LangString LNG_ProgramFileDesc ${LANG_ENGLISH} "Install ${STR_AppName} program files."
  81. LangString LNG_EgOADesc ${LANG_ENGLISH} "Install ${STR_AppName} main program files."
  82. LangString LNG_ServerEnvDesc ${LANG_ENGLISH} "Install ${STR_AppName} services environment."
  83. LangString LNG_CreateShortcutDesc ${LANG_ENGLISH} "Create shortcuts to launch the program easy."
  84. LicenseLangString LNG_License ${LANG_SIMPCHINESE} ".\resource\EULA.txt"
  85. LangString LNG_BrandingText ${LANG_SIMPCHINESE} "haijd Software"
  86. LangString LNG_DefaultInstation ${LANG_SIMPCHINESE} "默认安装"
  87. LangString LNG_FullInstation ${LANG_SIMPCHINESE} "完全安装"
  88. LangString LNG_MinimalInstation ${LANG_SIMPCHINESE} "最小安装"
  89. LangString LNG_Help ${LANG_SIMPCHINESE} "帮助"
  90. LangString LNG_Homepage ${LANG_SIMPCHINESE} "主页"
  91. LangString LNG_Uninstall ${LANG_SIMPCHINESE} "卸载"
  92. LangString LNG_ShowHelp ${LANG_SIMPCHINESE} "查看帮助"
  93. LangString LNG_ProgramFile ${LANG_SIMPCHINESE} "程序文件"
  94. LangString LNG_EgOA ${LANG_SIMPCHINESE} "主程序"
  95. LangString LNG_ServerEnv ${LANG_SIMPCHINESE} "服务环境"
  96. LangString LNG_CreateShortcut ${LANG_SIMPCHINESE} "创建快捷方式"
  97. LangString LNG_ProgramMenuShortcutGroup ${LANG_SIMPCHINESE} "程序菜单快捷方式组"
  98. LangString LNG_DesktopShortcut ${LANG_SIMPCHINESE} "桌面快捷方式"
  99. LangString LNG_QuickLaunchShortcut ${LANG_SIMPCHINESE} "快速启动栏快捷方式"
  100. LangString LNG_ProgramFileDesc ${LANG_SIMPCHINESE} "安装 ${STR_AppName} 程序文件。"
  101. LangString LNG_EgOADesc ${LANG_SIMPCHINESE} "安装 ${STR_AppName} 主程序文件"
  102. LangString LNG_ServerEnvDesc ${LANG_SIMPCHINESE} "安装 ${STR_AppName} 服务环境"
  103. LangString LNG_CreateShortcutDesc ${LANG_SIMPCHINESE} "创建用于快速访问的快捷方式。"
  104. #=========================================================================================
  105. #=========================================================================================
  106. ; 杂项
  107. Name "${STR_AppName} ${STR_Version}"
  108. OutFile "${STR_AppName}_${STR_Version}.exe"
  109. InstallDir "$PROGRAMFILES\egoa"
  110. InstallDirRegKey HKCU "${REG_AppBase}" "InstallDir"
  111. ShowInstDetails SHOW
  112. ShowUnInstDetails SHOW
  113. BrandingText "$(LNG_BrandingText)"
  114. #=========================================================================================
  115. #=========================================================================================
  116. ; 安装类型
  117. !ifndef NOINSTTYPES
  118. InstType "$(LNG_DefaultInstation)"
  119. InstType "$(LNG_FullInstation)"
  120. InstType "$(LNG_MinimalInstation)"
  121. !endif
  122. #=========================================================================================
  123. #=========================================================================================
  124. ; 程序文件
  125. Section
  126. LogSet on
  127. SectionEnd
  128. SectionGroup /e "$(LNG_ProgramFile)" SEC_ProgramFile
  129. Section "$(LNG_EgOA)" SEC_EgOA
  130. SectionIn 1 2 3 RO
  131. SetOverwrite ON
  132. SetOutPath "$INSTDIR"
  133. File ".\resource\egoa.ico"
  134. File /r ".\resource\program"
  135. SectionEnd
  136. Section "$(LNG_ServerEnv)" SEC_ServerEnv
  137. SectionIn 1 2 3 RO
  138. SetOutPath "$INSTDIR"
  139. File /r ".\resource\server"
  140. File /r ".\resource\database"
  141. SectionEnd
  142. Section "$(LNG_Help)" SEC_Help
  143. SectionIn 1 2
  144. SetOutPath "$INSTDIR"
  145. File /r ".\resource\help"
  146. SectionEnd
  147. SectionGroupEnd
  148. #=========================================================================================
  149. #=========================================================================================
  150. ; 快捷方式
  151. SectionGroup "$(LNG_CreateShortcut)" SEC_Shortcut
  152. ; 创建开始菜单程序组
  153. SectionGroup "$(LNG_ProgramMenuShortcutGroup)" SEC_ProgramMenuShortcutGroup
  154. Section "${STR_AppName}" SEC_AppNameShortcut
  155. SectionIn 1 2
  156. CreateDirectory "$SMPROGRAMS\$STR_GroupName"
  157. WriteINIStr "$SMPROGRAMS\$STR_GroupName\${STR_AppName}.url" "InternetShortcut" "URL" "$INSTDIR/program/www/index.html"
  158. SectionEnd
  159. Section "${STR_AppName} $(LNG_Help)" SEC_HelpShortcut
  160. SectionIn 1 2
  161. CreateDirectory "$SMPROGRAMS\$STR_GroupName"
  162. WriteINIStr "$SMPROGRAMS\$STR_GroupName\${STR_AppName} $(LNG_Help).url" "InternetShortcut" "URL" "$INSTDIR/program/www/help/index.html"
  163. SectionEnd
  164. Section "${STR_AppName} $(LNG_Homepage)" SEC_HomePageShortcut
  165. SectionIn 1 2
  166. CreateDirectory "$SMPROGRAMS\$STR_GroupName"
  167. WriteINIStr "$SMPROGRAMS\$STR_GroupName\${STR_AppName} $(LNG_Homepage).url" "InternetShortcut" "URL" "${STR_HomepageUrl}"
  168. SectionEnd
  169. Section "$(LNG_Uninstall) ${STR_AppName}" SEC_UninstallShortcut
  170. SectionIn 1 2
  171. CreateDirectory "$SMPROGRAMS\$STR_GroupName"
  172. CreateShortCut "$SMPROGRAMS\$STR_GroupName\$(LNG_Uninstall) ${STR_AppName}.lnk" "$INSTDIR\Uninstall.exe"
  173. SectionEnd
  174. SectionGroupEnd
  175. ; 桌面
  176. Section "$(LNG_DesktopShortcut)" SEC_DesktopShortcut
  177. SectionIn 1 2
  178. WriteINIStr "$DESKTOP\${STR_AppName}.url" "InternetShortcut" "URL" "http://127.0.0.1/"
  179. SectionEnd
  180. ; 快速启动
  181. Section "$(LNG_QuickLaunchShortcut)" SEC_QuickLaunchShortcut
  182. SectionIn 2
  183. WriteINIStr "$QUICKLAUNCH\${STR_AppName}.url" "InternetShortcut" "URL" "http://127.0.0.1/"
  184. SectionEnd
  185. SectionGroupEnd
  186. #=========================================================================================
  187. #=========================================================================================
  188. # 替换文件内容用的宏
  189. !macro ReplaceConfig FileName StringOld StringNew
  190. Push `${StringOld}` #text to be replaced
  191. Push `${StringNew}` #replace with
  192. Push all #replace all occurrences
  193. Push all #replace all occurrences
  194. Push `${FileName}` #file to replace in
  195. Call AdvReplaceInFile
  196. !macroend
  197. #=========================================================================================
  198. #=========================================================================================
  199. ; 配置服务
  200. Section "-SettingServer"
  201. ; 修改配置文件
  202. !insertmacro ReplaceConfig "$INSTDIR\server\Apache2.2\conf\httpd.conf" "EGOA_BASE_PATH" "$INSTDIR"
  203. !insertmacro ReplaceConfig "$INSTDIR\server\MySQL4.1\my.ini" "EGOA_BASE_PATH" "$INSTDIR"
  204. !insertmacro ReplaceConfig "$INSTDIR\server\php5\php.ini" "EGOA_BASE_PATH" "$INSTDIR"
  205. ; 创建服务
  206. nsExec::ExecToLog '"$INSTDIR\server\MySQL4.1\bin\mysqld-nt.exe" --install MySQL4.1 --defaults-file="$INSTDIR\server\MySQL4.1\my.ini"'
  207. nsExec::ExecToLog '"$INSTDIR\server\Apache2.2\bin\httpd.exe" -k install'
  208. ; 启动服务
  209. nsExec::ExecToLog 'net start MySQL4.1'
  210. nsExec::ExecToLog 'net start Apache2.2'
  211. SectionEnd
  212. #=========================================================================================
  213. #=========================================================================================
  214. ; 完成安装
  215. Section "-PostInstall"
  216. ; 输出卸载程序
  217. WriteUninstaller "$INSTDIR\Uninstall.exe"
  218. ; 写注册表
  219. WriteRegStr HKCU "${REG_AppBase}" "InstallDir" "$INSTDIR" ; 安装的目录
  220. WriteRegStr HKCU "${REG_AppBase}" "GroupName" "$STR_GroupName" ; 软件在开始菜单中的名称
  221. WriteRegStr HKCU "${REG_AppBase}" "Version" "${STR_Version}" ; 版本号
  222. WriteRegStr HKCU "${REG_Uninstall}" "DisplayName" "$(^Name)"
  223. WriteRegStr HKCU "${REG_Uninstall}" "UninstallString" "$INSTDIR\Uninstall.exe"
  224. WriteRegStr HKCU "${REG_Uninstall}" "DisplayIcon" "$INSTDIR\EgOA.ico"
  225. WriteRegStr HKCU "${REG_Uninstall}" "DisplayVersion" "${STR_Version}"
  226. WriteRegStr HKCU "${REG_Uninstall}" "URLInfoAbout" "${STR_HomepageUrl}"
  227. WriteRegStr HKCU "${REG_Uninstall}" "Publisher" "${STR_Publisher}"
  228. SectionEnd
  229. #=========================================================================================
  230. #=========================================================================================
  231. ; 初始化回调函数
  232. Function .onInit
  233. !insertmacro MUI_LANGDLL_DISPLAY
  234. ; 判断是否已安装
  235. Var /GLOBAL OLD_REG_Version
  236. ReadRegStr $OLD_REG_Version "HKCU" "${REG_APPBASE}" "Version"
  237. ${If} $OLD_REG_Version <> ''
  238. Abort '系统中已安装有本程序,请先卸载后再安装!'
  239. ${EndIf}
  240. FunctionEnd
  241. #=========================================================================================
  242. #=========================================================================================
  243. # 替换文件中的字符串
  244. Function AdvReplaceInFile
  245. Exch $0 ;file to replace in
  246. Exch
  247. Exch $1 ;number to replace after
  248. Exch
  249. Exch 2
  250. Exch $2 ;replace and onwards
  251. Exch 2
  252. Exch 3
  253. Exch $3 ;replace with
  254. Exch 3
  255. Exch 4
  256. Exch $4 ;to replace
  257. Exch 4
  258. Push $5 ;minus count
  259. Push $6 ;universal
  260. Push $7 ;end string
  261. Push $8 ;left string
  262. Push $9 ;right string
  263. Push $R0 ;file1
  264. Push $R1 ;file2
  265. Push $R2 ;read
  266. Push $R3 ;universal
  267. Push $R4 ;count (onwards)
  268. Push $R5 ;count (after)
  269. Push $R6 ;temp file name
  270. GetTempFileName $R6
  271. FileOpen $R1 $0 r ;file to search in
  272. FileOpen $R0 $R6 w ;temp file
  273. StrLen $R3 $4
  274. StrCpy $R4 -1
  275. StrCpy $R5 -1
  276. loop_read:
  277. ClearErrors
  278. FileRead $R1 $R2 ;read line
  279. IfErrors exit
  280. StrCpy $5 0
  281. StrCpy $7 $R2
  282. loop_filter:
  283. IntOp $5 $5 - 1
  284. StrCpy $6 $7 $R3 $5 ;search
  285. StrCmp $6 "" file_write2
  286. StrCmp $6 $4 0 loop_filter
  287. StrCpy $8 $7 $5 ;left part
  288. IntOp $6 $5 + $R3
  289. IntCmp $6 0 is0 not0
  290. is0:
  291. StrCpy $9 ""
  292. Goto done
  293. not0:
  294. StrCpy $9 $7 "" $6 ;right part
  295. done:
  296. StrCpy $7 $8$3$9 ;re-join
  297. IntOp $R4 $R4 + 1
  298. StrCmp $2 all file_write1
  299. StrCmp $R4 $2 0 file_write2
  300. IntOp $R4 $R4 - 1
  301. IntOp $R5 $R5 + 1
  302. StrCmp $1 all file_write1
  303. StrCmp $R5 $1 0 file_write1
  304. IntOp $R5 $R5 - 1
  305. Goto file_write2
  306. file_write1:
  307. FileWrite $R0 $7 ;write modified line
  308. Goto loop_read
  309. file_write2:
  310. FileWrite $R0 $R2 ;write unmodified line
  311. Goto loop_read
  312. exit:
  313. FileClose $R0
  314. FileClose $R1
  315. SetDetailsPrint none
  316. Delete $0
  317. Rename $R6 $0
  318. Delete $R6
  319. SetDetailsPrint both
  320. Pop $R6
  321. Pop $R5
  322. Pop $R4
  323. Pop $R3
  324. Pop $R2
  325. Pop $R1
  326. Pop $R0
  327. Pop $9
  328. Pop $8
  329. Pop $7
  330. Pop $6
  331. Pop $5
  332. Pop $0
  333. Pop $1
  334. Pop $2
  335. Pop $3
  336. Pop $4
  337. FunctionEnd
  338. #=========================================================================================
  339. #=========================================================================================
  340. # 根据安装日志卸载文件的调用宏
  341. !macro DelFileByLog LogFile
  342. ifFileExists `${LogFile}` 0 +4
  343. Push `${LogFile}`
  344. Call un.DelFileByLog
  345. Delete `${LogFile}`
  346. !macroend
  347. #=========================================================================================
  348. #=========================================================================================
  349. ; 卸载
  350. Section "Uninstall"
  351. ; 停止服务
  352. nsExec::ExecToLog 'net stop Apache2.2'
  353. nsExec::ExecToLog 'net stop MySQL4.1'
  354. ; 卸载服务
  355. nsExec::ExecToLog '"$INSTDIR\server\MySQL4.1\bin\mysqld-nt.exe" --remove MySQL4.1'
  356. nsExec::ExecToLog '"$INSTDIR\server\Apache2.2\bin\httpd.exe" -k uninstall'
  357. ; 从注册表中取得软件在开始菜单中的名称
  358. ReadRegStr $TMP_GroupName HKCU "${REG_AppBase}" "GroupName"
  359. ; 删除开始菜单中的快捷方式与目录
  360. Delete "$SMPROGRAMS\$TMP_GroupName\${STR_AppName}.url"
  361. Delete "$SMPROGRAMS\$TMP_GroupName\${STR_AppName} $(LNG_Help).url"
  362. Delete "$SMPROGRAMS\$TMP_GroupName\${STR_AppName} $(LNG_Homepage).url"
  363. Delete "$SMPROGRAMS\$TMP_GroupName\$(LNG_Uninstall) ${STR_AppName}.lnk"
  364. RMDir "$SMPROGRAMS\$TMP_GroupName"
  365. Delete /REBOOTOK "$DESKTOP\${STR_AppName}.url" ; 删除桌面快捷方式
  366. Delete /REBOOTOK "$QUICKLAUNCH\${STR_AppName}.url" ; 删除快速启动快捷方式
  367. ; 调用宏根据安装日志卸载安装程序自己安装过的文件
  368. !insertmacro DelFileByLog "$INSTDIR\install.log"
  369. ; 删除安装目录中的文件
  370. RMDir "$INSTDIR"
  371. RMDir "$INSTDIR\help"
  372. RMDir "$INSTDIR\program"
  373. RMDir /r /REBOOTOK "$INSTDIR\server"
  374. RMDir /r /REBOOTOK "$INSTDIR\help"
  375. ; 删除注册表内容
  376. DeleteRegKey HKCU "${REG_Uninstall}"
  377. DeleteRegKey HKCU "${REG_AppBase}"
  378. SetAutoClose True
  379. SectionEnd
  380. #=========================================================================================
  381. #=========================================================================================
  382. ; 卸载初始化
  383. Function un.onInit
  384. !insertmacro MUI_UNGETLANGUAGE
  385. FunctionEnd
  386. #=========================================================================================
  387. #=========================================================================================
  388. # 卸载程序通过安装日志卸载文件函数
  389. Function un.DelFileByLog
  390. Exch $R0
  391. Push $R1
  392. Push $R2
  393. Push $R3
  394. FileOpen $R0 $R0 r
  395. ${Do}
  396. FileRead $R0 $R1
  397. ${IfThen} $R1 == `` ${|} ${ExitDo} ${|}
  398. StrCpy $R1 $R1 -2
  399. StrCpy $R2 $R1 11
  400. StrCpy $R3 $R1 20
  401. ${If} $R2 == "File: wrote"
  402. ${OrIf} $R2 == "File: skipp"
  403. ${OrIf} $R3 == "CreateShortCut: out:"
  404. ${OrIf} $R3 == "created uninstaller:"
  405. Push $R1
  406. Push `"`
  407. Call un.DelFileByLog.StrLoc
  408. Pop $R2
  409. ${If} $R2 != ""
  410. IntOp $R2 $R2 + 1
  411. StrCpy $R3 $R1 "" $R2
  412. Push $R3
  413. Push `"`
  414. Call un.DelFileByLog.StrLoc
  415. Pop $R2
  416. ${If} $R2 != ""
  417. StrCpy $R3 $R3 $R2
  418. Delete /REBOOTOK $R3
  419. ${EndIf}
  420. ${EndIf}
  421. ${EndIf}
  422. StrCpy $R2 $R1 7
  423. ${If} $R2 == "Rename:"
  424. Push $R1
  425. Push "->"
  426. Call un.DelFileByLog.StrLoc
  427. Pop $R2
  428. ${If} $R2 != ""
  429. IntOp $R2 $R2 + 2
  430. StrCpy $R3 $R1 "" $R2
  431. Delete /REBOOTOK $R3
  432. ${EndIf}
  433. ${EndIf}
  434. ${Loop}
  435. FileClose $R0
  436. Pop $R3
  437. Pop $R2
  438. Pop $R1
  439. Pop $R0
  440. FunctionEnd
  441. Function un.DelFileByLog.StrLoc
  442. Exch $R0
  443. Exch
  444. Exch $R1
  445. Push $R2
  446. Push $R3
  447. Push $R4
  448. Push $R5
  449. StrLen $R2 $R0
  450. StrLen $R3 $R1
  451. StrCpy $R4 0
  452. ${Do}
  453. StrCpy $R5 $R1 $R2 $R4
  454. ${If} $R5 == $R0
  455. ${OrIf} $R4 = $R3
  456. ${ExitDo}
  457. ${EndIf}
  458. IntOp $R4 $R4 + 1
  459. ${Loop}
  460. ${If} $R4 = $R3
  461. StrCpy $R0 ""
  462. ${Else}
  463. StrCpy $R0 $R4
  464. ${EndIf}
  465. Pop $R5
  466. Pop $R4
  467. Pop $R3
  468. Pop $R2
  469. Pop $R1
  470. Exch $R0
  471. FunctionEnd
  472. #=========================================================================================
  473. #=========================================================================================
  474. # 节描述
  475. !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  476. !insertmacro MUI_DESCRIPTION_TEXT ${SEC_ProgramFile} "$(LNG_ProgramFileDesc)"
  477. !insertmacro MUI_DESCRIPTION_TEXT ${SEC_EgOA} "$(LNG_EgOADesc)"
  478. !insertmacro MUI_DESCRIPTION_TEXT ${SEC_ServerEnv} "$(LNG_ServerEnvDesc)"
  479. !insertmacro MUI_DESCRIPTION_TEXT ${SEC_Shortcut} "$(LNG_CreateShortcutDesc)"
  480. !insertmacro MUI_DESCRIPTION_TEXT ${SEC_DesktopShortcut} "$(LNG_CreateShortcutDesc)"
  481. !insertmacro MUI_DESCRIPTION_TEXT ${SEC_QuickLaunchShortcut} "$(LNG_CreateShortcutDesc)"
  482. !insertmacro MUI_DESCRIPTION_TEXT ${SEC_AppNameShortcut} "$(LNG_CreateShortcutDesc)"
  483. !insertmacro MUI_DESCRIPTION_TEXT ${SEC_HelpShortcut} "$(LNG_CreateShortcutDesc)"
  484. !insertmacro MUI_DESCRIPTION_TEXT ${SEC_HomePageShortcut} "$(LNG_CreateShortcutDesc)"
  485. !insertmacro MUI_DESCRIPTION_TEXT ${SEC_UninstallShortcut} "$(LNG_CreateShortcutDesc)"
  486. !insertmacro MUI_FUNCTION_DESCRIPTION_END
  487. #=========================================================================================

复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SgzyStudio

GMT+8, 2024-4-30 23:20 , Processed in 0.143087 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表