无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 5616|回复: 15
打印 上一主题 下一主题

[分享] 搜狗拼音输入法 for XP/7 安装程序源码

  [复制链接]
跳转到指定楼层
1#
发表于 2022-1-12 19:55:14 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
成品:搜狗拼音输入法 for XP/7

鉴于搜狗拼音输入法坛内有很多爱好者,放上 Inno Setup 脚本源码供参考:

  1. ;InnoSetupVersion=5.6.1 (Unicode)

  2. [Setup]
  3. ;--必需--
  4. AppName=搜狗输入法
  5. AppVerName=搜狗输入法 v10.5 正式版
  6. DefaultDirName={pf}\SogouInput
  7. ;--程序组--
  8. DefaultGroupName=搜狗输入法
  9. ;--构架--
  10. ArchitecturesAllowed=x86 x64
  11. ArchitecturesInstallIn64BitMode=x64
  12. ;--权限--
  13. PrivilegesRequired=admin
  14. UsedUserAreasWarning=no
  15. ;--版本需求--
  16. MinVersion=0,5.1
  17. OnlyBelowVersion=0,6.2
  18. ;--向导页--
  19. DisableDirPage=no
  20. DisableFinishedPage=yes
  21. DisableProgramGroupPage=yes
  22. DisableReadyMemo=yes
  23. DisableReadyPage=yes
  24. DisableStartupPrompt=yes
  25. DisableWelcomePage=yes
  26. ;--刷新关联--
  27. ChangesAssociations=yes
  28. ;--压缩--
  29. Compression=lzma/max
  30. SolidCompression=yes
  31. ;--输出--
  32. SetupIconFile=SetupIcon.ico
  33. OutputBaseFilename=sogou_pinyin_105b
  34. ;--卸载程序--
  35. Uninstallable=yes
  36. ;--文件时间戳--
  37. TouchDate=2021-06-28
  38. TouchTime=00:00
  39. ;--文件属性--
  40. AppCopyright=© 2021 Sogou.com Inc. All rights reserved.
  41. AppPublisher=Sogou.com Inc.
  42. VersionInfoVersion=10.5.0.4737
  43. ;--界面图片--
  44. WizardImageFile=$PLUGINSDIR\modern-wizard.bmp
  45. WizardSmallImageFile=$PLUGINSDIR\modern-header.bmp

  46. [Files]
  47. ;核心文件
  48. Source: "$PLUGINSDIR\SogouPY.ime"; DestDir: "{sys}"; Check: "Not IsWin64"; Components: SogouPY; Flags: touch
  49. Source: "$PLUGINSDIR\SogouPY.ime"; DestDir: "{syswow64}"; Check: "IsWin64"; Components: SogouPY; Flags: touch
  50. Source: "$PLUGINSDIR\SogouPY64.ime"; DestDir: "{sys}"; DestName: "SogouPY.ime"; Check: "IsWin64"; Components: SogouPY; Flags: touch
  51. Source: "10.5.0.4737\Install64.exe"; DestDir: "{app}\10.5.0.4737"; Check: "IsWin64"; Components: Install; Flags: touch
  52. Source: "10.5.0.4737\Punctures.ini"; DestDir: "{app}\10.5.0.4737"; Components: Punctures; Flags: touch
  53. Source: "10.5.0.4737\Resource.dll"; DestDir: "{app}\10.5.0.4737"; Components: Resource; Flags: touch
  54. Source: "10.5.0.4737\sgim_hz.bin"; DestDir: "{app}\10.5.0.4737"; Components: sgim_HZ; Flags: touch
  55. Source: "10.5.0.4737\sgim_py.bin"; DestDir: "{app}\10.5.0.4737"; Components: sgim_PY; Flags: touch
  56. Source: "10.5.0.4737\Skin.dat"; DestDir: "{app}\10.5.0.4737"; Components: Skin; Flags: touch
  57. Source: "10.5.0.4737\SGTool.exe"; DestDir: "{app}\10.5.0.4737"; Components: SGTool; Flags: touch
  58. Source: "10.5.0.4737\sysmodel.bin"; DestDir: "{app}\10.5.0.4737"; Components: SysModel; Flags: deleteafterinstall touch
  59. ;简繁切换
  60. Source: "10.5.0.4737\sgim_simtra.bin"; DestDir: "{app}\10.5.0.4737"; Components: SimTra; Flags: touch
  61. ;输入方式
  62. Source: "10.5.0.4737\PersonalCenter.cupf"; DestDir: "{app}\10.5.0.4737"; Components: PersonalCenter; Flags: touch
  63. ;软键盘
  64. Source: "10.5.0.4737\SoftKeyBoard.cupf"; DestDir: "{app}\10.5.0.4737"; Components: SoftKeyBoard; Flags: touch
  65. ;搜狗工具箱
  66. Source: "10.5.0.4737\pandorabox.cupf"; DestDir: "{app}\10.5.0.4737"; Components: ToolBox; Flags: touch
  67. ;工具在线安装
  68. Source: "$_14_\SogouComMgr.exe"; DestDir: "{app}\Components"; Components: ToolBox; Flags: touch
  69. Source: "$_14_\ComponentConfig.ini"; DestDir: "{app}\Components"; Components: ToolBox;Flags: touch
  70. Source: "10.5.0.4737\HWSignature.dll"; DestDir: "{app}\10.5.0.4737"; Components: ToolBox; Flags: touch
  71. Source: "10.5.0.4737\SGDownload.exe"; DestDir: "{app}\10.5.0.4737"; Components: ToolBox; Flags: touch
  72. Source: "10.5.0.4737\sgutil.dll"; DestDir: "{app}\10.5.0.4737"; Components: ToolBox; Flags: touch
  73. Source: "10.5.0.4737\ZipLib.dll"; DestDir: "{app}\10.5.0.4737"; Check: "Not IsWin64"; Components: ToolBox; Flags: touch
  74. Source: "10.5.0.4737\ZipLib64.dll"; DestDir: "{app}\10.5.0.4737"; DestName: "ZipLib.dll"; Check: "IsWin64"; Components: ToolBox; Flags: touch
  75. ;工具配置
  76. Source: "$_14_\AppBox\list.ini"; DestDir: "{app}\Components\AppBox"; Components: ToolBox; Flags: touch
  77. Source: "$_14_\AppBox\recommend.ini"; DestDir: "{app}\Components\AppBox"; Components: ToolBox; Flags: touch
  78. ;图片表情 图标
  79. Source: "$_14_\AppBox\icon\exinputBundle.picfaceCom.ico"; DestDir: "{app}\Components\AppBox\icon"; Components: ToolBox; Flags: touch
  80. Source: "$_14_\AppBox\icon\exinputBundle.picfaceCom.png"; DestDir: "{app}\Components\AppBox\icon"; Components: ToolBox; Flags: touch
  81. ;手写输入 图标
  82. Source: "$_14_\AppBox\icon\handinputBundle.ico"; DestDir: "{app}\Components\AppBox\icon"; Components: ToolBox; Flags: touch
  83. Source: "$_14_\AppBox\icon\handinputBundle.png"; DestDir: "{app}\Components\AppBox\icon"; Components: ToolBox; Flags: touch
  84. ;语音输入 图标
  85. Source: "$_14_\AppBox\icon\VoiceInputBundle.ico"; DestDir: "{app}\Components\AppBox\icon"; Components: ToolBox; Flags: touch
  86. Source: "$_14_\AppBox\icon\VoiceInputBundle.png"; DestDir: "{app}\Components\AppBox\icon"; Components: ToolBox; Flags: touch
  87. ;符号大全
  88. Source: "10.5.0.4737\sgim_quick.bin"; DestDir: "{app}\10.5.0.4737"; Components: ToolBox; Flags: touch
  89. Source: "10.5.0.4737\richinput.cupf"; DestDir: "{app}\10.5.0.4737"; Components: ToolBox; Flags: touch
  90. Source: "10.5.0.4737\RichInput\richinputconfig.ini"; DestDir: "{app}\10.5.0.4737\RichInput"; Components: ToolBox; Flags: touch
  91. ;符号大全 图标
  92. Source: "$_14_\AppBox\icon\exinputBundle.symbolCom.ico"; DestDir: "{app}\Components\AppBox\icon"; Components: ToolBox; Flags: touch
  93. Source: "$_14_\AppBox\icon\exinputBundle.symbolCom.png"; DestDir: "{app}\Components\AppBox\icon"; Components: ToolBox; Flags: touch

  94. [INI]
  95. ;候选项数: 9
  96. Filename: "{userappdata}\SogouPY\env.ini"; Section: "Setting"; Key: "PageSize"; String: "9"
  97. Filename: "{userappdata}\SogouPY\env.ini"; Section: "SyncMode"; Key: "PageSize"; String: "remote"
  98. ;关闭细胞词库
  99. Filename: "{userappdata}\SogouPY\env.ini"; Section: "Setting"; Key: "UseCellDict"; String: "0"
  100. ;升级模式: 禁止升级
  101. Filename: "{userappdata}\SogouPY\env.ini"; Section: "Setting"; Key: "AutoUpdate"; String: "0"
  102. Filename: "{userappdata}\SogouPY\env.ini"; Section: "SyncMode"; Key: "AutoUpdate"; String: "remote"
  103. ;关闭i模式换肤
  104. Filename: "{userappdata}\SogouPY\env.ini"; Section: "Setting"; Key: "IModeQuickChangeSkin"; String: "0"
  105. Filename: "{userappdata}\SogouPY\env.ini"; Section: "SyncMode"; Key: "IModeQuickChangeSkin"; String: "remote"

  106. [Registry]
  107. Root: HKLM; Subkey: "SOFTWARE\SogouComponents"; Components: ToolBox;
  108. Root: HKLM; Subkey: "SOFTWARE\SogouComponents"; ValueName: ""; ValueType: String; ValueData: "{app}\Components"; Components: ToolBox;
  109. Root: HKLM; Subkey: "SOFTWARE\SogouInput";
  110. Root: HKLM; Subkey: "SOFTWARE\SogouInput"; ValueName: ""; ValueType: String; ValueData: "{app}";
  111. Root: HKLM; Subkey: "SOFTWARE\SogouInput"; ValueName: "Region"; ValueType: String; ValueData: "0000_sogou_pinyin_105b";
  112. Root: HKLM; Subkey: "SOFTWARE\SogouInput"; ValueName: "StartMenuFolder"; ValueType: String; ValueData: "搜狗输入法";
  113. Root: HKLM; Subkey: "SOFTWARE\SogouInput"; ValueName: "Version"; ValueType: String; ValueData: "10.5.0.4737";
  114. Root: HKLM; Subkey: "SOFTWARE\SogouInput"; ValueName: "VersionType"; ValueType: String; ValueData: "Final";

  115. [Run]
  116. Filename: "{app}\10.5.0.4737\SGTool.exe"; Parameters: "--appid=sysdicmk --src=""{app}\10.5.0.4737\sysmodel.bin"" --des=""{app}\10.5.0.4737\sgim_core.bin"""; WorkingDir: "{app}\10.5.0.4737"; Description: "转换核心词库"; StatusMsg: "正在转换核心词库...";
  117. Filename: "{app}\10.5.0.4737\SGTool.exe"; Parameters: "--appid=install -i -w"; WorkingDir: "{app}"; Description: "安装输入法"; StatusMsg: "正在安装输入法...";
  118. Filename: "{app}\10.5.0.4737\Install64.exe"; Parameters: "-i -w"; WorkingDir: "{app}"; Description: "安装输入法"; StatusMsg: "正在安装输入法..."; Check: "IsWin64"; Flags: runhidden
  119. Filename: "{sys}\taskkill.exe"; Parameters: "/f /im SGTool.exe"; WorkingDir: "{app}"; Description: "结束进程"; StatusMsg: "正在结束进程..."; Flags: runhidden

  120. [UninstallRun]
  121. Filename: "{app}\10.5.0.4737\SGTool.exe"; Parameters: "--appid=install -u -w"; WorkingDir: "{app}"; StatusMsg: "正在卸载输入法...";
  122. Filename: "{app}\10.5.0.4737\Install64.exe"; Parameters: "-u -w"; WorkingDir: "{app}"; StatusMsg: "正在卸载输入法..."; Flags: runhidden
  123. Filename: "{sys}\taskkill.exe"; Parameters: "/f /im SGTool.exe"; WorkingDir: "{app}"; StatusMsg: "正在结束进程..."; Flags: runhidden

  124. [Icons]
  125. ;Name: "{group}\{cm:UninstallProgram,搜狗输入法}"; Filename: "{uninstallexe}";

  126. [Types]
  127. Name: "Lite"; Description: "精简版";
  128. Name: "Core"; Description: "核心版";
  129. Name: "Custom"; Description: "定制版"; Flags: iscustom

  130. [Components]
  131. Name: "SogouPY"; Description: "搜狗拼音"; Types: "Core Lite Custom"; Flags: fixed
  132. Name: "Install"; Description: "安装程序"; Types: "Core Lite Custom"; Flags: fixed
  133. Name: "Punctures"; Description: "自定义标点"; Types: "Core Lite Custom"; Flags: fixed
  134. Name: "Resource"; Description: "资源"; Types: "Core Lite Custom"; Flags: fixed
  135. Name: "sgim_HZ"; Description: "汉字编码"; Types: "Core Lite Custom"; Flags: fixed
  136. Name: "sgim_PY"; Description: "拼音编码"; Types: "Core Lite Custom"; Flags: fixed
  137. Name: "Skin"; Description: "皮肤"; Types: "Core Lite Custom"; Flags: fixed
  138. Name: "SGTool"; Description: "搜狗工具"; Types: "Core Lite Custom"; Flags: fixed
  139. Name: "SysModel"; Description: "系统词库"; Types: "Core Lite Custom"; Flags: fixed
  140. Name: "SimTra"; Description: "简繁转换"; Types: "Core Lite Custom"; Flags: fixed
  141. Name: "PersonalCenter"; Description: "输入方式"; Types: "Lite Custom";
  142. Name: "SoftKeyBoard"; Description: "软键盘"; Types: "Lite Custom";
  143. Name: "ToolBox"; Description: "工具箱"; Types: "Lite Custom";

  144. [UninstallDelete]
  145. Type: filesandordirs; Name: "{app}"
  146. Type: filesandordirs; Name: "{userappdata}\SogouPY"
  147. Type: filesandordirs; Name: "{userappdata}\SogouPY.users"

  148. [Messages]
  149. BeveledLabel=———  ChiShingChan

  150. [Code]
  151. procedure InitializeWizard();
  152. begin
  153.   WizardForm.LICENSEACCEPTEDRADIO.Checked := true;
  154.   WizardForm.WizardSmallBitmapImage.width:=170;
  155.   WizardForm.WizardSmallBitmapImage.left:=0;
  156.   WizardForm.PAGENAMELABEL.left:=170+20;
  157.   WizardForm.PAGENAMELABEL.width:=WizardForm.width-170-26;
  158.   WizardForm.PAGEDESCRIPTIONLABEL.left:=170+20;
  159.   WizardForm.PAGEDESCRIPTIONLABEL.width:=WizardForm.width-170-26;
  160. end;
复制代码



评分

参与人数 2无忧币 +10 收起 理由
holley2008 + 5 很给力!
hlccfu + 5 很给力!

查看全部评分

2#
 楼主| 发表于 2022-1-12 19:56:53 | 只看该作者
本帖最后由 chishingchan 于 2022-1-12 20:01 编辑

源码语句限制了除 XP/7 以外的系统安装,关于源码的疑问可跟贴询问
支持安装及卸载
精简掉属性但保留了几个常用的工具,但需要在线下载(已附带下载组件)
图片表情 本来没用,但占据 S 字菜单位置,所以加上

回复

使用道具 举报

3#
发表于 2022-1-12 20:24:21 | 只看该作者
楼主犀利
回复

使用道具 举报

4#
发表于 2022-1-12 20:54:43 | 只看该作者
多谢分享
回复

使用道具 举报

5#
发表于 2022-1-12 22:59:31 | 只看该作者
谢谢分享
回复

使用道具 举报

6#
发表于 2022-1-12 23:06:50 | 只看该作者
感谢分享
回复

使用道具 举报

7#
发表于 2022-1-13 06:56:00 | 只看该作者
谢谢楼主分享
回复

使用道具 举报

8#
发表于 2022-1-13 07:38:20 | 只看该作者
本帖最后由 旁观者清 于 2022-1-13 07:39 编辑

谢谢分享。
回复

使用道具 举报

9#
发表于 2022-1-13 09:58:03 | 只看该作者
感谢分享
回复

使用道具 举报

10#
发表于 2022-5-10 11:29:30 | 只看该作者
不能支持win8 可以修改吗
回复

使用道具 举报

11#
发表于 2022-5-10 14:12:39 | 只看该作者
厉害
回复

使用道具 举报

12#
发表于 2022-5-10 15:04:35 | 只看该作者
多谢分享
回复

使用道具 举报

13#
发表于 2023-10-24 13:41:00 | 只看该作者
谢谢分享
回复

使用道具 举报

14#
发表于 2023-10-24 14:35:59 | 只看该作者
感射!!!!!
回复

使用道具 举报

15#
发表于 2023-10-24 14:38:32 | 只看该作者
程序源码!!!!
回复

使用道具 举报

16#
发表于 2023-10-24 16:13:48 | 只看该作者
win11可以用?
回复

使用道具 举报

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

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-4-25 18:53

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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