论坛风格切换切换到宽版
  • 3249阅读
  • 4回复

也不知道虎版在不在?有一个问题求教,关于inno setup的修复问题 [复制链接]

上一主题 下一主题
离线jimo040911
 

发帖
12
金钱
120
威望
12
只看楼主 倒序阅读 0 发表于: 2014-06-23
下载了一个 UninsHs.exe  版本号是2.1.0.283

找到之前虎版帮助别人的一帖子,试着把 UninsHs加进去,编译调试没反应,不知道脚本问题出在哪里?希望虎版或者高手帮忙,代码如下:





#define MyAppVersion "1.5"
#define MyAppPublisher "我的公司"
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "IPCConfigurator.exe"

[Setup]
; 注: AppId的值为单独标识该应用程序。
; 不要为其他安装程序使用相同的AppId值。
; (生成新的GUID,点击 工具|在IDE中生成GUID。)
AppId={{301FA7AF-8515-43DD-90A2-D88AC9C07CD0}
AppName={cm:MyAppName}
;AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=Program Files\IPCConfigurator
DefaultGroupName={cm:MyAppName}
;DefaultGroupName={#MyAppName}
OutputDir=D:\IPCSetup
OutputBaseFilename=IPCSetup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
Name: "english"; MessagesFile: "compiler:Languages\English.isl"

[Messages]
english.BeveledLabel=English
chinesesimp.BeveledLabel=Chineses




[CustomMessages]

english.MyAppName=IPCConfigurator



chinesesimp.MyAppName=IPC配置工具

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Files]
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\IPCConfigurator.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\autodis.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\chmod.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\chmod.bat.bak"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\D3DX9_43.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\DelDeskTop.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\delFile.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\dis.log"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\Huawei_IPC配置工具系统帮助文档.chm"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\HWPuSDK.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\IPC_Pref.cfg"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\IPC_Pref.cfg.bak"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\IPCConfigurator.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\IVS_PU_Player.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\libmpg123.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\Microsoft.VC90.CRT.manifest"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\ModfiyFile.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\mp4DLL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\Mp4Prase.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\msvcm90.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\msvcm90d.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\msvcp100.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\msvcp100d.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\msvcp90.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\msvcp90d.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\msvcr100.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\msvcr100d.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\msvcr90.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\msvcr90d.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\msxml.msi"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\npptools.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\Packet.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\Setup.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\Unwise.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\Unwise.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\WinPcap_4_1_3.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\wpcap.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\hw-dsgnj-ipc\04.Implement\01.SRC\IPCConfigurator\Debug\IPCConfigurator.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "compiler:UninsHs.exe"; DestDir: "{app}"; Flags: ignoreversion onlyifdoesntexist
; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”
[Code]
function ComponentList(Default: string):string;
begin
Result := WizardSelectedComponents(False);
end;


function ShouldSkipPage(CurPage: Integer): Boolean;
begin
if Pos('/SP-', UpperCase(GetCmdTail)) > 0 then
   case CurPage of
   wpWelcome, wpLicense, wpPassword, wpInfoBefore, wpUserInfo,
   wpSelectDir, wpSelectProgramGroup, wpInfoAfter:
     Result := True;
   end;
end;


procedure  CurStepChanged(CurStep: TSetupStep);
begin
if CurStep=ssPostinstall then
begin
if ExpandConstant('{cm:MyAppName}')= 'IPC配置工具' then
begin
SaveStringToFile(ExpandConstant('{app}/IPC_Pref.cfg'),  'lang=zh_cn'+ #13#10, True);
end
else
begin
SaveStringToFile(ExpandConstant('{app}/IPC_Pref.cfg'),  'lang=en_us' + #13#10, True);
end;
end;
end;




[Icons]
;Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
;Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{group}\{cm:MyAppName}"; Filename: "{app}\{cm:MyAppName}" ;IconFilename: "{app}\IPCConfigurator.ico"
Name: "{commondesktop}\{cm:MyAppName}"; Filename: "{app}\{cm:MyAppName}"; Tasks: desktopicon; IconFilename: "{app}\IPCConfigurator.ico"
;Name: "{group}\{cm:UninstallProgram,}"; Filename: "{uninstallexe}"
Name: "{group}\{cm:UninstallProgram,}"; Filename: "{app}\UninsHs.exe"
[Run]
Filename: "msiexec.exe"; Parameters: "/i ""{app}\msxml.msi"" /quiet"
Filename: "{app}\WinPcap_4_1_3.exe"; Parameters: "/S"
Filename: "{app}\UninsHs.exe"; Parameters: "/r"; Flags: runminimized

[Registry]
Root:HKLM;Subkey:SYSTEM\CurrentControlSet\Control\Session Manager\Environment;ValueType:string;ValueName:IPC_LOG_FILE_PATH;ValueData:{app};Flags:uninsdeletevalue
Root:HKLM;Subkey:SYSTEM\ControlSet001\Control\Session Manager\Environment;ValueType:string;ValueName:IPC_LOG_FILE_PATH;ValueData:{app};Flags:uninsdeletevalue
Root:HKLM;Subkey:SYSTEM\ControlSet002\Control\Session Manager\Environment;ValueType:string;ValueName:IPC_LOG_FILE_PATH;ValueData:{app};Flags:uninsdeletevalue


[UninstallDelete]
Type: filesandordirs; Name: "{app}\UninsHs.dat"

[Ini]
FileName: "{app}\UninsHs.dat"; Section: "Common"; Key: "Software";    String: "{cm:MyAppName}"
   FileName: "{app}\UninsHs.dat"; Section: "Common"; Key: "Install";     String: "{srcexe}"
   FileName: "{app}\UninsHs.dat"; Section: "Common"; Key: "Language";    String: "{language}"
   FileName: "{app}\UninsHs.dat"; Section: "Common"; Key: "Remove";      String: "{uninstallexe}"
   FileName: "{app}\UninsHs.dat"; Section: "Common"; Key: "Group";       String: "{groupname}"
   FileName: "{app}\UninsHs.dat"; Section: "Common"; Key: "Components";  String: "{code:ComponentList|x}"
   FileName: "{app}\UninsHs.dat"; Section: "Common"; Key: "Dir";         String: "{app}"
   FileName: "{app}\UninsHs.dat"; Section: "Common"; Key: "Uninstall";   String: "AppId"


[InstallDelete]
Type: files; Name: "{app}\IPCConfigurator.exe"
Type: files; Name: "{app}\autodis.dll"
Type: files; Name: "{app}\chmod.bat"
Type: files; Name: "{app}\chmod.bat.bak"
Type: files; Name: "{app}\D3DX9_43.dll"
Type: files; Name: "{app}\DelDeskTop.bat"
Type: files; Name: "{app}\delFile.bat"
Type: files; Name: "{app}\dis.log";
Type: files; Name: "{app}\Huawei_IPC配置工具系统帮助文档.chm"
Type: files; Name: "{app}\HWPuSDK.dll"
Type: files; Name: "{app}\IPC_Pref.cfg"
Type: files; Name: "{app}\IPC_Pref.cfg.bak"
Type: files; Name: "{app}\IPCConfigurator.exe"
Type: files; Name: "{app}\IVS_PU_Player.dll"
Type: files; Name: "{app}\libeay32.dll"
Type: files; Name: "{app}\libmpg123.dll"
Type: files; Name: "{app}\Microsoft.VC90.CRT.manifest"
Type: files; Name: "{app}\ModfiyFile.bat"
Type: files; Name: "{app}\mp4DLL.dll"
Type: files; Name: "{app}\Mp4Prase.dll"
Type: files; Name: "{app}\Debug\msvcm90.dll"
Type: files; Name: "{app}\msvcm90d.dll"
Type: files; Name: "{app}\msvcp100.dll"
Type: files; Name: "{app}\msvcp100d.dll"
Type: files; Name: "{app}\msvcp90.dll"
Type: files; Name: "{app}\msvcp90d.dll"
Type: files; Name: "{app}\msvcr100.dll"
Type: files; Name: "{app}\msvcr100d.dll"
Type: files; Name: "{app}\msvcr90.dll"
Type: files; Name: "{app}\msvcr90d.dll"
Type: files; Name: "{app}\msxml.msi"
Type: files; Name: "{app}\npptools.dll"
Type: files; Name: "{app}\Packet.dll"
Type: files; Name: "{app}\Setup.bat"
Type: files; Name: "{app}\ssleay32.dll"
Type: files; Name: "{app}\Unwise.exe"
Type: files; Name: "{app}\Unwise.ini"
Type: files; Name: "{app}\WinPcap_4_1_3.exe"
Type: files; Name: "{app}\wpcap.dll"
离线gnatix

发帖
7696
金钱
-8279
威望
-828
只看该作者 1 发表于: 2014-06-24
离线jimo040911

发帖
12
金钱
120
威望
12
只看该作者 2 发表于: 2014-06-24
谢谢虎版,已经能成功调用了。

但虎版 还有一个问题,不管是语言是中文还是英文。修复的的界面一直是英文?

我上面的代码哪里配错了?麻烦指点下。谢谢!
离线jimo040911

发帖
12
金钱
120
威望
12
只看该作者 3 发表于: 2014-06-25
虎版,UninsHs 调用一直是英文的啊。麻烦你帮我看看哪里错了?
离线jimo040911

发帖
12
金钱
120
威望
12
只看该作者 4 发表于: 2014-06-25
[Run]
Filename: "msiexec.exe"; Parameters: "/i ""{app}\msxml.msi"" /quiet"
Filename: "{app}\WinPcap_4_1_3.exe"; Parameters: "/S"

Filename: {app}\UninsHs.exe; Parameters: /r0=AppId,{language},{srcexe}; Flags: runminimized