星火微课系统客户端
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Inno Setup星火微课.iss 6.5KB

3 år sedan
3 år sedan
3 år sedan
3 år sedan
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. ; ű Inno Setup ű ɣ
  2. ; йش Inno Setup űļϸİĵ
  3. #define MyAppName "ǻ΢"
  4. #define MyAppDir "xhwk"
  5. #define MyAppVersion "2.6.6"
  6. #define MyAppPublisher "ǻԭƼ޹˾"
  7. #define MyAppURL "http://www.xhkjedu.com/"
  8. #define MySourcePath "D:\Project\C#\xhwkclient\XHWK.WKTool\bin\x86\Debug\"
  9. #define MyAppExeName "ǻ΢.exe"
  10. #define MyIcoName "256.ico"
  11. #define MyTargetPath "D:\\ǻ΢\"
  12. [Setup]
  13. ; ע: AppIdֵΪʶӦó
  14. ; ҪΪװʹͬAppIdֵ
  15. ; (Ҫµ GUIDڲ˵е "| GUID")
  16. AppId={{5869900A-3BE4-463E-B0A6-462AA7454AE2}
  17. AppName={#MyAppName}
  18. AppVersion={#MyAppVersion}
  19. ;AppVerName={#MyAppName} {#MyAppVersion}
  20. AppPublisher={#MyAppPublisher}
  21. AppPublisherURL={#MyAppURL}
  22. AppSupportURL={#MyAppURL}
  23. AppUpdatesURL={#MyAppURL}
  24. DefaultDirName={autopf}\{#MyAppDir}
  25. DisableProgramGroupPage=yes
  26. ; [Icons] ġquicklaunchiconĿʹ {userappdata} [Tasks] Ŀʺ IsAdminInstallMode ļ顣
  27. UsedUserAreasWarning=no
  28. ; ȡעͣڷǹװģʽУΪǰûװ
  29. ;PrivilegesRequired=lowest
  30. OutputDir={#MyTargetPath}
  31. OutputBaseFilename="{#MyAppName} v{#MyAppVersion}"
  32. SetupIconFile="{#MySourcePath}{#MyIcoName}"
  33. Compression=lzma
  34. SolidCompression=yes
  35. WizardStyle=modern
  36. [Languages]
  37. Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
  38. [Tasks]
  39. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone
  40. Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone; OnlyBelowVersion: 6.1; Check: not IsAdminInstallMode
  41. [Files]
  42. Source: "{#MySourcePath}{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
  43. Source: "{#MySourcePath}*"; Excludes: "ffmpeg.exe,\Log\*,\Temp,\Data";DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
  44. [Icons]
  45. Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
  46. Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
  47. Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
  48. [Run]
  49. Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
  50. [Code]
  51. // Indicates whether the specified version and service pack of the .NET Framework is installed.
  52. //
  53. // version -- Specify one of these strings for the required .NET Framework version:
  54. // 'v1.1' .NET Framework 1.1
  55. // 'v2.0' .NET Framework 2.0
  56. // 'v3.0' .NET Framework 3.0
  57. // 'v3.5' .NET Framework 3.5
  58. // 'v4\Client' .NET Framework 4.0 Client Profile
  59. // 'v4\Full' .NET Framework 4.0 Full Installation
  60. // 'v4.5' .NET Framework 4.5
  61. // 'v4.5.1' .NET Framework 4.5.1
  62. // 'v4.5.2' .NET Framework 4.5.2
  63. // 'v4.6' .NET Framework 4.6
  64. // 'v4.6.1' .NET Framework 4.6.1
  65. // 'v4.6.2' .NET Framework 4.6.2
  66. // 'v4.7' .NET Framework 4.7
  67. // 'v4.7.1' .NET Framework 4.7.1
  68. // 'v4.7.2' .NET Framework 4.7.2
  69. // 'v4.8' .NET Framework 4.8
  70. //
  71. // service -- Specify any non-negative integer for the required service pack level:
  72. // 0 No service packs required
  73. // 1, 2, etc. Service pack 1, 2, etc. required
  74. function IsDotNetDetected(version: string; service: cardinal): boolean;
  75. var
  76. key, versionKey: string;
  77. install, release, serviceCount, versionRelease: cardinal;
  78. success: boolean;
  79. begin
  80. versionKey := version;
  81. versionRelease := 0;
  82. // .NET 1.1 and 2.0 embed release number in version key
  83. if version = 'v1.1' then begin
  84. versionKey := 'v1.1.4322';
  85. end
  86. else if version = 'v2.0' then begin
  87. versionKey := 'v2.0.50727';
  88. end
  89. // .NET 4.5 and newer install as update to .NET 4.0 Full
  90. else if Pos('v4.', version) = 1 then begin
  91. versionKey := 'v4\Full';
  92. case version of
  93. 'v4.5': versionRelease := 378389;
  94. 'v4.5.1': versionRelease := 378675; // 378758 on Windows 8 and older
  95. 'v4.5.2': versionRelease := 379893;
  96. 'v4.6': versionRelease := 393295; // 393297 on Windows 8.1 and older
  97. 'v4.6.1': versionRelease := 394254; // 394271 on Windows 8.1 and older
  98. 'v4.6.2': versionRelease := 394802; // 394806 on Windows 8.1 and older
  99. 'v4.7': versionRelease := 460798; // Windows 10
  100. 'v4.7.1': versionRelease := 461308; // Windows 10
  101. 'v4.7.2': versionRelease := 461808; // Windows 10
  102. 'v4.8' : versionRelease := 528040; // Windows 10
  103. end;
  104. end;
  105. // installation key group for all .NET versions
  106. key := 'SOFTWARE\Microsoft\NET Framework Setup\NDP\' + versionKey;
  107. // .NET 3.0 uses value InstallSuccess in subkey Setup
  108. if Pos('v3.0', version) = 1 then begin
  109. success := RegQueryDWordValue(HKLM, key + '\Setup', 'InstallSuccess', install);
  110. end else begin
  111. success := RegQueryDWordValue(HKLM, key, 'Install', install);
  112. end;
  113. // .NET 4.0 and newer use value Servicing instead of SP
  114. if Pos('v4', version) = 1 then begin
  115. success := success and RegQueryDWordValue(HKLM, key, 'Servicing', serviceCount);
  116. end else begin
  117. success := success and RegQueryDWordValue(HKLM, key, 'SP', serviceCount);
  118. end;
  119. // .NET 4.5 and newer use additional value Release
  120. if versionRelease > 0 then begin
  121. success := success and RegQueryDWordValue(HKLM, key, 'Release', release);
  122. success := success and (release >= versionRelease);
  123. end;
  124. result := success and (install = 1) and (serviceCount >= service);
  125. end;
  126. function InitializeSetup: Boolean;
  127. var Path:string;
  128. ResultCode: Integer;
  129. begin
  130. if IsDotNetDetected('v4.5.2', 0) then
  131. begin
  132. Result := true;
  133. end
  134. else
  135. begin
  136. if MsgBox('ϵͳ⵽ûаװ.Net Framework4.5.2Ƿزװ', mbConfirmation, MB_YESNO) = idYes then
  137. begin
  138. Path := ExpandConstant('{pf}/Internet Explorer/iexplore.exe');
  139. Exec(Path, 'https://xhkjedu.oss-cn-huhehaote.aliyuncs.com/runtime/NDP452-KB2901907-x86-x64-AllOS-ENU.exe', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
  140. MsgBox('밲װ.Net Frameworkбװ',mbInformation,MB_OK);
  141. Result := false;
  142. end
  143. else
  144. begin
  145. MsgBox('ûаװ.Net Framework޷г򣬱װ򼴽˳',mbInformation,MB_OK);
  146. Result := false;
  147. end;
  148. end;
  149. end;