代码拉取完成,页面将自动刷新
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppVersion "1.0"
#define MyAppName "appName"
#define MyAppExeName "XCurveFit.exe"
#define MyUninstallAppNmae "uninstall "+MyAppName
#define MyAppPublisher "tgtsml"
#define MyCompanyName "tgtsml"
#define MyAppURL "http://www.example.com/"
#define MyAppId "{{F8ECF68A-7393-4DF0-B6EA-723F5A70A914}"
#define MyAppWindowName "MyAppWindowName"
#define MyAppRunningInstallTips "应用软件正在运行,请退出后重试!"
#define MyAppReinstallTips "'软件已安装,是否覆盖安装?'#13#13'覆盖安装可能会丢失数据,请先备份数据。'"
#define MyAppRunningUninstallTips "应用软件正在运行,请退出后再进行卸载操作!"
#define MyAppDir ".\app"
#define MyResourceDir ".\res"
#define MyImageDir MyResourceDir+"\core"
#define MyLanguageDir MyResourceDir+"\language"
#define MyOutputDir ".\setup"
#define MySetupIconFile MyImageDir+"\setup_icon.ico"
#define MyOutputSetupFileName "mysetup"
#define x64BuildOnly
;#undef x64BuildOnly
#define MyDefaultInstallDir "C:\"+MyCompanyName
#undef MyDefaultInstallDir
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={#MyAppId}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
OutputDir={#MyOutputDir}
OutputBaseFilename={#MyOutputSetupFileName}
SetupIconFile={#MySetupIconFile}
DisableProgramGroupPage=yes
Compression=lzma
SolidCompression=yes
WizardStyle=modern
#ifdef x64BuildOnly
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
DefaultDirName={commonpf64}\{#MyCompanyName}\{#MyAppName}
#else
ArchitecturesAllowed=x86 x64
DefaultDirName={commonpf32}\{#MyCompanyName}\{#MyAppName}
#endif
#ifdef MyDefaultInstallDir
DefaultDirName={#MyDefaultInstallDir}\{#MyAppName}
#endif
[Languages]
Name: "chinese"; MessagesFile: "{#MyLanguageDir}\Chinese.isl"
;Name: "english"; MessagesFile: "{#MyLanguageDir}\English.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "{#MyAppDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{autoprograms}\{#MyCompanyName}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autoprograms}\{#MyCompanyName}\{#MyUninstallAppNmae}"; Filename:{uninstallexe}; WorkingDir: {app};
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[Registry]
Root: HKLM; Subkey: "SOFTWARE\{#MyCompanyName}"; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: "SOFTWARE\{#MyCompanyName}\{#MyAppName}"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\{#MyCompanyName}\{#MyAppName}"; ValueType: string; ValueName: "Version"; ValueData: "{#MyAppVersion}"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\{#MyCompanyName}\{#MyAppName}"; ValueType: string; ValueName: "ExecuteName"; ValueData: "{#MyAppExeName}"; Flags: uninsdeletekey
[Code]
function IsAppRunning(const AppName : string) : Boolean;
begin
Result := (FindWindowByWindowName(AppName) <> 0);
end;
function IsAppInstalled() : Boolean;
begin
Result := RegKeyExists(HKLM64, 'SOFTWARE\{#MyCompanyName}\{#MyAppName}');
end;
function InitializeSetup(): Boolean;
begin
Result := true;
if IsAppRunning('{#MyAppWindowName}') then
begin
Msgbox('{#MyAppRunningInstallTips}', mbInformation, MB_OK);
Result := false;
end;
if Result and IsAppInstalled() then
begin
Result := (Msgbox({#MyAppReinstallTips}, mbConfirmation, MB_YESNO) = IDYES);
end;
end;
procedure InitializeWizard();
begin
with WizardForm do
begin
Position := poDesktopCenter;
end;
end;
function InitializeUninstall(): Boolean;
begin
Result:= true;
if IsAppRunning('{#MyAppWindowName}') then
begin
MsgBox('{#MyAppRunningUninstallTips}', mbInformation, MB_OK)
Result:= false;
end;
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep = usDone then
begin
DelTree(ExpandConstant('{app}'), True, True, True);
end;
end;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。