让 ISSkin 使用最新的 Inno Setup Unicode

Getting ISSkin to work with latest Inno Setup Unicode

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

[Setup]
AppName=ISSkin Example
AppVersion=1.0.0.2
DefaultDirName={pf}\ISSkin

[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
[Code]
// 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.

// 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。

如何用它做这个蒙皮?

对于 ,您应该使用插件的 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';

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