杉宫竹苑工作室

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

Inno 多目录选择安装

[复制链接]
发表于 2017-2-26 14:04:22 | 显示全部楼层 |阅读模式

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

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

x
  1. [Setup]
  2. ShowLanguageDialog=yes
  3. AppCopyright=版权所有(C) 2005, BitWorld Inc.
  4. AppName={cm:License} {cm:Packagename}
  5. AppVerName={cm:License} {cm:Packagename} {cm:Packagever}
  6. LicenseFile=
  7. OutputDir=E:\install
  8. UninstallFilesDir={code:getmingwdir}\uninstall
  9. ExtraDiskSpaceRequired=0
  10. UserInfoPage=false
  11. VersionInfoVersion=2.0
  12. VersionInfoCompany=BitWorld Inc.
  13. VersionInfoDescription=BitWorld
  14. EnableDirDoesntExistWarning=true
  15. AppID={{007F4590-89DE-4F87-9608-10F07CEFBBE9}
  16. LanguageDetectionMethod=uilanguage
  17. UsePreviousSetupType=true
  18. DisableStartupPrompt=true
  19. DirExistsWarning=no
  20. WizardImageFile=D:\Program Files\Inno Setup 5\WizModernImage-IS.bmp
  21. WizardSmallImageFile=D:\Program Files\Inno Setup 5\WizModernSmallImage-IS.bmp
  22. OutputBaseFilename=Binutils-2.15-MingW32-Msys-setup
  23. VersionInfoTextVersion=2.0
  24. AppPublisher=heromyth
  25. AppPublisherURL=http://www.donews.net/heromyth
  26. AppVersion=1.0
  27. AppContact=zxpmyth@yahoo.com.cn
  28. UsePreviousTasks=false
  29. UsePreviousAppDir=false
  30. AllowRootDirectory=true
  31. CreateAppDir=false

  32. [Languages]
  33. Name: en; MessagesFile: compiler:Languages\English.isl; LicenseFile: E:\install\gnu-readme-en-mingw32.txt
  34. Name: chs; MessagesFile: compiler:Languages\ChineseSimp-11-5.1.0.isl; LicenseFile: E:\install\gnu-readme-zh-mingw32.txt
  35. [Messages]
  36. en.BeveledLabel=Created by Heromyth
  37. chs.BeveledLabel=由张雪平创建
  38. [Components]
  39. Name: bininstall; Description: {cm:installBinFile}; Types: full compact; Flags: disablenouninstallwarning
  40. Name: libinstall; Description: {cm:installLibFile}; Types: full; Flags: disablenouninstallwarning; Languages:
  41. [_ISTool]
  42. OutputExeFilename=E:\install\Binutils-2.15-MingW32-Msys-setup.exe
  43. [Files]
  44. Source: dd\vv\logo_board.gif; DestDir: {code:getmingwdir}\vv\; Components: libinstall
  45. Source: dd\33\logo_board.jpg; DestDir: {code:getmsysdir}\33\; Components: bininstall
  46. Source: dd\33\cppunit-1.10.2.tar.gz; DestDir: {code:getmsysdir}\33\; Components: bininstall
  47. Source: dd\ttt.bmp; DestDir: {code:getmsysdir}; Components: bininstall
  48. [Dirs]
  49. Name: {code:getmingwdir}\vv; Components: libinstall
  50. Name: {code:getmsysdir}\33; Components: bininstall

  51. [CustomMessages]
  52. License=GNU
  53. Packagename=Binutils
  54. Packagever=2.15

  55. en.installBinFile=install EXE files
  56. chs.installBinFile=安装可执行文件
  57. en.installLibFile=install LIB files
  58. chs.installLibFile=安装库文件

  59. en.choicedirCaption=Select Destination Location
  60. chs.choicedirCaption=选择目标位置
  61. en.choicedirDescription=Where should %1 be installed?
  62. chs.choicedirDescription=你想将 %1 安装在什么地方?
  63. en.SelectDirLabel=Setup will install %1 into the following folder.
  64. chs.SelectDirLabel=安装程序将安装 %1 到下列文件夹中。
  65. en.choicedir=Choice for installation directory of %1
  66. chs.choicedir=选择%1的安装目录

  67. en.SelectDirBrowseLabel=To continue, click Next. If you would like to select a different folder, click Browse.
  68. chs.SelectDirBrowseLabel=单击“下一步”继续。如果您想选择其它文件夹,请单击“浏览”。
  69. en.Button1Browse=&Browse...
  70. chs.Button1Browse=浏览(&B)...
  71. en.Button2Browse=B&rowse...
  72. chs.Button2Browse=浏览(&R)...

  73. en.msyslabel=(store something that run in Shell)
  74. chs.msyslabel=(主要用于存放一些需要在Shell环境里使用程序及数据)
  75. en.mingwlabel=(store something that run in win32 with mingw)
  76. chs.mingwlabel=(主要用于存放一些需要在win32模式下使用的头文件和库)

  77. en.installedDir=installation directory of %1
  78. chs.installedDir=%1安装目录
  79. [Code]
  80. //Source: dd\cppunit-docs-1.10.2.tar.gz; DestDir: {code:getmsysdir}; Components: bininstall
  81. //Source: dd\vv\headbg.jpg; DestDir: {code:getmingwdir}\vv\; Components: libinstall
  82. var
  83. Mingwdir: TLabel;
  84. Msysdir: TLabel;
  85. BitmapImage1: TBitmapImage;
  86. Label1: TLabel;
  87. Label2: TLabel;
  88. Edit1: TEdit;
  89. Edit2: TEdit;
  90. Button1: TButton;
  91. Button2: TButton;
  92. NewStaticText1: TNewStaticText;
  93. NewStaticText2: TNewStaticText;

  94. procedure ChoseMingwFoldersClick(Sender: TObject);
  95. var
  96. choicedDIR:String;
  97. begin
  98. if BrowseForFolder(ExpandConstant('{cm:choicedir,Mingw}'),choicedDIR,True) then
  99.    Edit1.Text := choicedDIR;
  100. end;

  101. procedure ChoseMsysFoldersClick(Sender: TObject);
  102. var
  103. choicedDIR:String;
  104. begin
  105. // if BrowseForFolder('选择Msys的安装目录',choicedDIR,True) then
  106. if BrowseForFolder(ExpandConstant('{cm:choicedir,Msys}'),choicedDIR,True) then
  107.    Edit2.Text := choicedDIR+'\1.0';
  108. end;

  109. procedure choicedir_Activate(Page: TWizardPage);
  110. begin
  111. end;

  112. function choicedir_ShouldSkipPage(Page: TWizardPage): Boolean;
  113. begin
  114. Result := False;
  115. end;

  116. function choicedir_BackButtonClick(Page: TWizardPage): Boolean;
  117. begin
  118. Result := True;
  119. end;

  120. function choicedir_NextButtonClick(Page: TWizardPage): Boolean;
  121. begin
  122. Result := True;
  123. end;

  124. procedure choicedir_CancelButtonClick(Page: TWizardPage; var Cancel, Confirm: Boolean);
  125. begin
  126. end;

  127. function choicedir_CreatePage(PreviousPageId: Integer): Integer;
  128. var
  129. Page: TWizardPage;
  130. begin
  131. Page := CreateCustomPage(
  132.     PreviousPageId,
  133.     ExpandConstant('{cm:choicedirCaption}'),
  134.     ExpandConstant('{cm:choicedirDescription,{cm:Packagename}}')
  135. );

  136. { Mingwdir }
  137. Mingwdir := TLabel.Create(Page);
  138. with Mingwdir do
  139. begin
  140.     Parent := Page.Surface;
  141.     Left := ScaleX(0);
  142.     Top := ScaleY(88);
  143.     Width := ScaleX(24);
  144.     Height := ScaleY(16);
  145. //    Caption := 'Mingw安装目录'+ExpandConstant('{cm:NameAndVersion,fdd,1.0}') ;
  146.     Caption := ExpandConstant('{cm:installedDir,Mingw}') ;
  147.     Font.Color := -16777208;
  148.     Font.Height := ScaleY(-13);
  149.     Font.Name := 'Tahoma';
  150.     Font.Style := [fsBold];
  151. end;

  152. { Msysdir }
  153. Msysdir := TLabel.Create(Page);
  154. with Msysdir do
  155. begin
  156.     Parent := Page.Surface;
  157.     Left := ScaleX(0);
  158.     Top := ScaleY(160);
  159.     Width := ScaleX(24);
  160.     Height := ScaleY(16);
  161.     Caption := ExpandConstant('{cm:installedDir,Msys}') ;
  162.     Font.Color := -16777208;
  163.     Font.Height := ScaleY(-13);
  164.     Font.Name := 'Tahoma';
  165.     Font.Style := [fsBold];
  166. end;

  167. { BitmapImage1 }
  168. BitmapImage1 := TBitmapImage.Create(Page);
  169. with BitmapImage1 do
  170. begin
  171.     Parent := Page.Surface;
  172.     Left := ScaleX(8);
  173.     Top := ScaleY(8);
  174.     Width := ScaleX(57);
  175.     Height := ScaleY(41);
  176. //Bitmap.LoadFromFile(BitmapFileName);
  177. end;

  178. { Label1 }
  179. Label1 := TLabel.Create(Page);
  180. with Label1 do
  181. begin
  182.     Parent := Page.Surface;
  183.     Left := ScaleX(16);
  184.     Top := ScaleY(136);
  185.     Width := ScaleX(18);
  186.     Height := ScaleY(13);
  187. //    Caption := '(主要用于存放一些需要在win32模式下使用的头文件和库)';
  188.     Caption := ExpandConstant('{cm:mingwlabel}');
  189.     Color := -16777206;
  190.     Font.Color := 32768;
  191.     Font.Height := ScaleY(-12);
  192.     Font.Name := 'Tahoma';
  193. end;

  194. { Label2 }
  195. Label2 := TLabel.Create(Page);
  196. with Label2 do
  197. begin
  198.     Parent := Page.Surface;
  199.     Left := ScaleX(16);
  200.     Top := ScaleY(216);
  201.     Width := ScaleX(18);
  202.     Height := ScaleY(13);
  203. //    Caption := '(主要用于存放一些需要在Shell环境里使用程序及数据)';
  204.     Caption := ExpandConstant('{cm:msyslabel}');
  205.     Font.Color := 32768;
  206.     Font.Height := ScaleY(-12);
  207.     Font.Name := 'Tahoma';
  208. end;

  209. { Edit1 }
  210. Edit1 := TEdit.Create(Page);
  211. with Edit1 do
  212. begin
  213.     Parent := Page.Surface;
  214.     Left := ScaleX(16);
  215.     Top := ScaleY(112);
  216.     Width := ScaleX(313);
  217.     Height := ScaleY(21);
  218.     TabOrder := 0;
  219.     Text := 'C:\mingw';
  220. end;

  221. { Edit2 }
  222. Edit2 := TEdit.Create(Page);
  223. with Edit2 do
  224. begin
  225.     Parent := Page.Surface;
  226.     Left := ScaleX(16);
  227.     Top := ScaleY(184);
  228.     Width := ScaleX(313);
  229.     Height := ScaleY(21);
  230.     TabOrder := 1;
  231.     Text := 'C:\MSYS\1.0';
  232. end;

  233. { Button1 }
  234. Button1 := TButton.Create(Page);
  235. with Button1 do
  236. begin
  237.     Parent := Page.Surface;
  238.     Left := ScaleX(336);
  239.     Top := ScaleY(112);
  240.     Width := ScaleX(75);
  241.     Height := ScaleY(23);
  242.     Caption :=ExpandConstant('{cm:Button1Browse}');
  243.     TabOrder := 2;
  244.     OnClick := @ChoseMingwFoldersClick;
  245. end;

  246. { Button2 }
  247. Button2 := TButton.Create(Page);
  248. with Button2 do
  249. begin
  250.     Parent := Page.Surface;
  251.     Left := ScaleX(336);
  252.     Top := ScaleY(184);
  253.     Width := ScaleX(75);
  254.     Height := ScaleY(23);
  255.     Caption := ExpandConstant('{cm:Button2Browse}');
  256.     TabOrder := 3;
  257.     OnClick := @ChoseMsysFoldersClick;
  258. end;

  259. { NewStaticText1 }
  260. NewStaticText1 := TNewStaticText.Create(Page);
  261. with NewStaticText1 do
  262. begin
  263.     Parent := Page.Surface;
  264.     Left := ScaleX(16);
  265.     Top := ScaleY(16);
  266.     Width := ScaleX(22);
  267.     Height := ScaleY(17);
  268.     Caption := ExpandConstant('{cm:SelectDirLabel,{cm:Packagename}}');
  269.     Font.Color := -16777208;
  270.     Font.Height := ScaleY(-13);
  271.     TabOrder := 4;
  272. end;

  273. { NewStaticText2 }
  274. NewStaticText2 := TNewStaticText.Create(Page);
  275. with NewStaticText2 do
  276. begin
  277.     Parent := Page.Surface;
  278.     Left := ScaleX(16);
  279.     Top := ScaleY(50);
  280.     Width := ScaleX(22);
  281.     Height := ScaleY(17);
  282. //    Caption := '单击“下一步”继续。如果你想选择其它文件夹,请单击“浏览”。';
  283.     Caption := ExpandConstant('{cm:SelectDirBrowseLabel,{cm:Packagename}}');
  284.     Font.Color := -16777208;
  285. end;


  286. with Page do
  287. begin
  288.     OnActivate := @choicedir_Activate;
  289.     OnShouldSkipPage := @choicedir_ShouldSkipPage;
  290.     OnBackButtonClick := @choicedir_BackButtonClick;
  291.     OnNextButtonClick := @choicedir_NextButtonClick;
  292.     OnCancelButtonClick := @choicedir_CancelButtonClick;
  293. end;

  294. Result := Page.ID;
  295. end;

  296. function getmingwdir(Param: String): String;
  297. begin
  298. Result := Edit1.Text;
  299. end;

  300. function getmsysdir(Param: String): String;
  301. begin
  302. Result := Edit2.Text;
  303. end;

  304. procedure InitializeWizard();
  305. begin
  306. choicedir_CreatePage(wpUserInfo);
  307. end;
复制代码


回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-19 13:10 , Processed in 0.111146 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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