This commit is contained in:
moxh 2024-06-01 09:20:53 +08:00
parent f1edaead21
commit 2912110a1b
3 changed files with 95 additions and 1 deletions

Binary file not shown.

View File

@ -1,5 +1,5 @@
{ {
"Version": 1027, "Version": 1028,
"Url": "DwoodAutoSetup.exe", "Url": "DwoodAutoSetup.exe",
"Content": "", "Content": "",
"history_version": [ "history_version": [

View File

@ -0,0 +1,94 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "DwoodAuto"
#define MyAppVersion "1.0.2.8"
#define MyAppPublisher "江苏德木供应链管理有限公司, Inc."
#define MyAppURL "https://www.example.com/"
#define MyAppExeName "mes-admin-win.exe"
#define MyAppAssocName MyAppName + " File"
#define MyAppAssocExt ".myp"
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
[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={{5FB14BED-AC62-4022-A224-396FDE9D9B99}
AppName={#MyAppName}{#MyAppVersion}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=D:\Program Files\{#MyAppName}
ChangesAssociations=yes
DisableProgramGroupPage=yes
PrivilegesRequired=admin
;文件介绍 TODO
LicenseFile=C:\Users\11964\Desktop\德木网\工具\DwoodOutput\DwoodOutput\default.txt
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
UninstallDisplayName=我要卸载{#MyAppName}
;安装包图标 TODO
UninstallDisplayIcon=C:\Users\11964\Desktop\德木网\工具\DwoodOutput\DwoodOutput\logo.ico
;输出目录 TODO
OutputDir=C:\Users\11964\Desktop\德木网\工具\DwoodOutput\DwoodOutput
OutputBaseFilename=DwoodAutoSetup
Compression=zip
SolidCompression=yes
WizardStyle=modern
[Code]
procedure TaskKill(FileName: String);
var
ResultCode: Integer;
begin
Exec('taskkill.exe', '/f /im ' + '"' + FileName + '"', '', SW_HIDE,
ewWaitUntilTerminated, ResultCode);
end;
function InitializeSetup: Boolean;
begin
// MsgBox('这是一个示例消息框。', mbInformation, MB_OK);
TaskKill('mes-admin-win.exe');
Result := true;
end;
[Languages]
Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
;TODO 本地Release文件
[Files]
Source: "C:\demuProject\jason\mes-admin-windows.git\Files\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "C:\demuProject\jason\mes-admin-windows.git\Common\bin\Release\Common.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\demuProject\jason\mes-admin-windows.git\mes_admin_win-Controls\bin\Release\mes_admin_win-Controls.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\demuProject\jason\mes-admin-windows.git\mes-admin-win-pullrtsp\bin\x64\Release\mes-admin-win-pullrtsp.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\demuProject\jason\mes-admin-windows.git\mes-admin-win\bin\x64\Release\mes-admin-win.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\demuProject\jason\mes-admin-windows.git\mes-admin-win\bin\x64\Release\mes-admin-win.exe.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\demuProject\jason\mes-admin-windows.git\mes-admin-win\bin\x64\Release\log4net.config"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Registry]
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
Root: HKA; Subkey: "Software\Classes\Applications\{#MyAppExeName}\SupportedTypes"; ValueType: string; ValueName: ".myp"; ValueData: ""
;写注册表,防止被拷贝软件使用,只能通过安装使用 ,软件中有对此注册表的验证
Root:HKLM;Subkey:SOFTWARE\Classes\{#MyAppName};ValueType: string; ValueName:"Version";ValueData:"{#MyAppVersion}";Flags: uninsdeletevalue
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}";IconFilename:"{app}\logo.ico"
Name: "{autodesktop}\德木自动化控制系统"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon;IconFilename:"{app}\logo.ico"
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent