解包我找到了我一直在尋找,他應該將文件解包安裝 後,這是InnoUnzip.ZIP解壓縮文件與InnoUnzip安裝後 - 錯誤「無效的原型」
我的安裝程序文件夾是這樣的:
我的代碼:
[Setup]
AppName=My Program
AppVersion=1.0
DefaultDirName={pf}\My Program
DisableProgramGroupPage=yes
UninstallDisplayIcon={app}\MyProg.exe
OutputDir=userdocs:Inno Setup Examples Output
[Files]
Source: "unzipper.dll"; Flags: dontcopy
Source: "MyProg.exe"; DestDir: "{app}"
Source: "Somefile.zip"; DestDir: "{app}"; AfterInstall: ExtractMe('{app}\Somefile.zip', '{app}');
[Icons]
Name: "{commonprograms}\My Program"; Filename: "{app}\MyProg.exe"
Name: "{commondesktop}\My Program"; Filename: "{app}\MyProg.exe"
[Code]
procedure unzip(src, target: AnsiString);
external '[email protected]:unzipper.dll stdcall delayload';
procedure ExtractMe(src, target : AnsiString); - ERROR HERE!!!!!
begin
unzip(ExpandConstant(src), ExpandConstant(target));
end;
文本錯誤:「Extract Me」的原型無效
您正在使用Unicode Inno Setup,它需要該AfterInstall原型的Unicode字符串。使用此過程ExtractMe(src,target:string);'。然後,當你將這些參數傳遞給插件類型轉換'unzip(AnsiString(ExpandConstant(src)),AnsiString(ExpandConstant(target)));'。無論如何,該插件有點懶,我相信它的代碼可以直接從Inno Setup腳本執行。 – TLama 2015-04-06 15:54:27