让ISSkin与最新的Inno Setup 5.5.9 Unicode一起使用

时间:2018-03-24 13:43:17

标签: inno-setup

我正在尝试使用Inno Setup第一次ISSkin。我想尝试黑色风格。所以我尝试了他们的样本:

; -- Example1.iss --
; Demonstrates copying 3 files and creating an icon.

; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!

[Setup]
AppName=ISSkin Example
AppVerName=ISSkin Example v1.0
AppVersion=1.0.0.2
AppCopyright=© 1998-2008 Codejock Software
DefaultDirName={pf}\ISSkin
DefaultGroupName=ISSkin
Compression=lzma
SolidCompression=true
WizardImageFile=Styles\Office2007Gray.bmp
WizardSmallImageFile=compiler:WizModernSmallImage-IS.bmp
UninstallDisplayIcon={app}\SkinHelper.exe
OutputDir=.\Output
OutputBaseFilename=SetupOffice2007Black
VersionInfoVersion=1.0.0.2
VersionInfoCompany=Codejock Software
VersionInfoDescription=ISSkin Example Setup
VersionInfoTextVersion=1, 0, 0, 2

[Files]
; Add the ISSkin DLL used for skinning Inno Setup installations.
Source: ISSkin.dll; DestDir: {app}; Flags: dontcopy

; Add the Visual Style resource contains resources used for skinning,
; you can also use Microsoft Visual Styles (*.msstyles) resources.
Source: Styles\Office2007.cjstyles; DestDir: {tmp}; Flags: dontcopy

[Icons]
Name: {group}\Uninstall =ISSkin; Filename: {app}\unins000.exe

; The following code block is used to load the ISS, pass in
; NormalBlack.ini as the second parameter to LoadSkin to use
; the Black color scheme instead of the default Blue color
; scheme.
[Code]
// Importing LoadSkin API from ISSkin.DLL
procedure LoadSkin(lpszPath: String; lpszIniFileName: String);
external 'LoadSkin@files:isskin.dll stdcall';

// Importing UnloadSkin API from ISSkin.DLL
procedure UnloadSkin();
external 'UnloadSkin@files:isskin.dll stdcall';

// Importing ShowWindow Windows API from User32.DLL
function ShowWindow(hWnd: Integer; uType: Integer): Integer;
external 'ShowWindow@user32.dll stdcall';

function InitializeSetup(): Boolean;
begin
    ExtractTemporaryFile('Office2007.cjstyles');
    LoadSkin(ExpandConstant('{tmp}\Office2007.cjstyles'), 'NormalBlack.ini');
    Result := True;
end;

procedure DeinitializeSetup();
begin
    // Hide Window before unloading skin so user does not get
    // a glimse of an unskinned window before it is closed.
    ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
    UnloadSkin();
end;

我无法让它发挥作用。该计划看起来很正常。

我注意到他们提供的软件是2010年。我使用的是最新的Unicode Inno Setup。

如何用它进行剥皮?

1 个答案:

答案 0 :(得分:2)

使用Unicode version of Inno Setup,您应该使用插件的Unicode版本:ISSkinU.dll

[Files]
Source: ISSkinU.dll; DestDir: {app}; Flags: dontcopy
[Code]
procedure LoadSkin(lpszPath: String; lpszIniFileName: String);
external 'LoadSkin@files:isskinU.dll stdcall';

procedure UnloadSkin();
external 'UnloadSkin@files:isskinU.dll stdcall';

(其余代码与您的问题相同)

enter image description here