diff --git a/InnoSetup/build_setup.iss b/InnoSetup/build_setup.iss index b335ce3..45db889 100644 --- a/InnoSetup/build_setup.iss +++ b/InnoSetup/build_setup.iss @@ -3,7 +3,7 @@ #define MyAppVersion "0.3.3" #define MyAppPublisher "zhiliao007 QQxiaoming <2014500726@smail.xtu.edu.cn>" #define MyAppURL "https://github.com/zhiliao007/YUVviewer" -#define MyAppExeName "YUVviewer_setup.exe" +#define MyAppExeName "YUVviewer.exe" #define MyAppOutputName "YUVviewer_setup" [Setup] @@ -18,23 +18,28 @@ AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} -VersionInfoVersion=0.3.3.000 -DefaultDirName={pf}\{#MyAppName} -DisableProgramGroupPage=yes -InfoBeforeFile=..\InnoSetup\Info.txt +DefaultDirName={autopf}\{#MyAppName} +DefaultGroupName={#MyAppName} OutputBaseFilename={#MyAppOutputName} -OutPutdir=..\InnoSetup -SetupIconFile=..\img\ico.ico Compression=lzma SolidCompression=yes +UninstallDisplayIcon={app}/{#MyAppExeName} +InfoBeforeFile=..\InnoSetup\Info.txt +OutPutdir=..\InnoSetup +SetupIconFile=..\img\ico.ico +PrivilegesRequired=admin +VersionInfoVersion=0.3.3.000 +AllowNoIcons=no +DisableProgramGroupPage=yes +WizardStyle=modern [Languages] -Name: "chinesesimp"; MessagesFile: "compiler:Default.isl" +Name: "english"; MessagesFile: "compiler:Default.isl" [Tasks] -Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1 -Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 6.1; Check: not IsAdminInstallMode [Files] Source: "..\InnoSetup\build\YUVviewer.exe"; DestDir: "{app}"; Flags: ignoreversion @@ -42,9 +47,18 @@ Source: "..\InnoSetup\build\*"; DestDir: "{app}"; Flags: ignoreversion recursesu ; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion” [Icons] -Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" -Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon +Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" +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] +procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); + begin + if CurUninstallStep = usUninstall then + DeleteFile(ExpandConstant('{app}\YUVviewer.ini')); + end;