1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- ; 脚本由 Inno Setup 脚本向导 生成!
- ; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档!
-
- #define MyAppName "星火微课"
- #define MyAppDir "xhwk"
- #define MyAppVersion "2.6.1"
- #define MyAppPublisher "河南星火燎原软件科技有限公司"
- #define MyAppURL "http://www.xhkjedu.com/"
- #define MySourcePath "D:\Project\C#\xhwkclient\XHWK.WKTool\bin\x86\Debug\"
- #define MyAppExeName "星火微课.exe"
- #define MyIcoName "256.ico"
- #define MyTargetPath "D:\程序打包\星火微课\"
-
- [Setup]
- ; 注: AppId的值为单独标识该应用程序。
- ; 不要为其他安装程序使用相同的AppId值。
- ; (若要生成新的 GUID,可在菜单中点击 "工具|生成 GUID"。)
- AppId={{5869900A-3BE4-463E-B0A6-462AA7454AE2}
- AppName={#MyAppName}
- AppVersion={#MyAppVersion}
- ;AppVerName={#MyAppName} {#MyAppVersion}
- AppPublisher={#MyAppPublisher}
- AppPublisherURL={#MyAppURL}
- AppSupportURL={#MyAppURL}
- AppUpdatesURL={#MyAppURL}
- DefaultDirName={autopf}\{#MyAppDir}
- DisableProgramGroupPage=yes
- ; [Icons] 的“quicklaunchicon”条目使用 {userappdata},而其 [Tasks] 条目具有适合 IsAdminInstallMode 的检查。
- UsedUserAreasWarning=no
- ; 以下行取消注释,以在非管理安装模式下运行(仅为当前用户安装)。
- ;PrivilegesRequired=lowest
- OutputDir={#MyTargetPath}
- OutputBaseFilename="{#MyAppName} v{#MyAppVersion}"
- SetupIconFile="{#MySourcePath}{#MyIcoName}"
- Compression=lzma
- SolidCompression=yes
- WizardStyle=modern
-
- [Languages]
- Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
-
- [Tasks]
- Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone
- Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone; OnlyBelowVersion: 6.1; Check: not IsAdminInstallMode
-
- [Files]
- Source: "{#MySourcePath}{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
- Source: "{#MySourcePath}*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
- ; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”
-
- [Icons]
- Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
- Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
- Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
-
- [Run]
- Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
-
- [Code]
- function InitializeSetup: Boolean;
- var Path:string;
- ResultCode: Integer;
- begin
- if RegValueExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Screen Capturer Recorder_is1', 'DisplayName') then
- begin
- Result := true;
- end
- else
- begin
- if MsgBox('系统检测到您没有安装录制环境,是否立刻下载并安装?', mbConfirmation, MB_YESNO) = idYes then
- begin
- Path := ExpandConstant('{pf}/Internet Explorer/iexplore.exe');
- Exec(Path, 'https://xhkjedu.oss-cn-huhehaote.aliyuncs.com/runtime/Setup%20Screen%20Capturer%20Recorder%20v0.12.10.exe', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
- MsgBox('请安装好录制环境后,再运行本安装包程序!',mbInformation,MB_OK);
- Result := false;
- end
- else
- begin
- MsgBox('取消后请手动安装录制环境!',mbInformation,MB_OK);
- Result := true;
- end;
- end;
- end;
|