我使用 Inno Setup 来制作游戏安装程序,但我发现了一些问题。
当我运行“Setup_1.0.121.exe”时,大约需要 6 分钟才会出现第一个屏幕。我的设置总大小是 4.76GB,这是文件列表
- Setup_1.0.121.exe:623,863 字节
- Setup_1.0.121-1a.bin:1,707,575,872 字节
- setup_1.0.121-1b.bin:1,708,200,000 字节
- Setup_1.0.121-1c.bin:1,697,243,193 字节
我尝试深入了解初始过程发生了什么,并procexp发现了这个
- Setup_1.0.121.tmp:I/O 读取字节 5,085,307,002:I/O 写入字节 1,061,076
我的Setup_1.0.121.exe 在初始阶段读取每个字节。这就是为什么需要这么长时间。
我的怀疑是插件“Isskin”,我只是添加用于装饰。
function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('Office2007.cjstyles');
LoadSkin(ExpandConstant('{tmp}\Office2007.cjstyles'), '');
Result := True;
end;
Run Code Online (Sandbox Code Playgroud)
我怎么解决这个问题?
我尝试制作安装文件来修补以前的程序。安装程序必须能够检查是否安装了以前的程序。
这是我无法使用的代码
[Code]
function GetHKLM() : Integer;
begin
if IsWin64 then
begin
Result := HKLM64;
end
else
begin
Result := HKEY_LOCAL_MACHINE;
end;
end;
function InitializeSetup(): Boolean;
var
V: string;
begin
if RegKeyExists(GetHKLM(), 'SOFTWARE\ABC\Option\Settings')
then
MsgBox('please install ABC first!!',mbError,MB_OK);
end;
Run Code Online (Sandbox Code Playgroud)
我的条件是
RegKeyExists如何修改代码?
先感谢您。
**更新修复Wow6432Node问题。我尝试修改我的代码
[Code]
function InitializeSetup: Boolean;
begin
// allow the setup to continue initially
Result := True;
// if the registry key based on current OS bitness doesn't exist, …Run Code Online (Sandbox Code Playgroud) 我正在使用Inno设置.我需要将我的程序图标放在公司组下的"开始"菜单中.
我的#defines:
MyAppPublisher = publisher
MyAppName = game name
Run Code Online (Sandbox Code Playgroud)
一些示例代码:
[Icons]
Name: {group}\{#MyAppPublisher}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; IconFilename: {app}\{#MyAppIcon}
Name: {group}\{#MyAppPublisher}\{cm:ProgramOnTheWeb,{#MyAppName}}; Filename: {#MyAppURL}
Name: {group}\{#MyAppPublisher}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon
Run Code Online (Sandbox Code Playgroud)
我有
但我需要的是
我该怎么做才能得到我想要的布局?