标签: pascalscript

如何将DLL函数添加到Inno Setup iss文件中?

我尝试阅读示例代码以了解如何在 Inno Setup 中加载 DLL,但我很困惑。

我有一个DLL(ChkArchInfo.dll),内容很简单:

extern "C" __declspec(dllexport) bool __stdcall IsARM()
{
    SYSTEM_INFO si; 
    GetNativeSystemInfo(&si); 

    if(PROCESSOR_ARCHITECTURE_ARM == si.wProcessorArchitecture)
       return true;

    return false;
}
Run Code Online (Sandbox Code Playgroud)

我知道我需要使用[Files]节来加载 DLL 文件。但是如何在 .iss 中声明这个函数让我使用它呢?

顺便问一下,Inno Setup 中有没有获取 ARM 架构的函数?(ProcessorArchitecture不包括ARM架构)

dll inno-setup pascalscript

3
推荐指数
1
解决办法
3274
查看次数

让 ISSkin 与最新的 Inno Setup Unicode 配合使用

我第一次尝试使用 Inno Setup 进行ISSkin。我想尝试一下黑色风格。所以我尝试了他们的示例:

[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
Run Code Online (Sandbox Code Playgroud)
[Setup]
AppName=ISSkin Example
AppVersion=1.0.0.2
DefaultDirName={pf}\ISSkin

[Files]
; Add the ISSkin DLL used for skinning Inno Setup installations.
Source: …
Run Code Online (Sandbox Code Playgroud)

inno-setup pascalscript

3
推荐指数
1
解决办法
957
查看次数

如何在过程 InitializeWizard() 中显示自定义页面之前显示 Inno Setup 许可证页面

我用来LicenseFile=D:\authorized\Builds\Integration\License.rtf显示许可证页面和程序InitializeWizard()

问题是在该过程之后显示许可证页面InitializeWizard()。有什么办法可以让我们之前显示它吗?

procedure InitializeWizard;
begin
  // Create the pages
  UsagePage := CreateInputOptionPage(wpWelcome,
    'App setup information', 'How would you like to install App?',
    'Would you like to install App as a service?.',
    True, False);
  UsagePage.Add('Yes');
  UsagePage.Add('No');
  UsagePage.Values[0] := true;
end;
Run Code Online (Sandbox Code Playgroud)

inno-setup pascalscript

3
推荐指数
1
解决办法
743
查看次数

如何在 Pascal 脚本 (Inno Setup) 中添加睡眠,该脚本将在提取文件之前执行

我正在尝试制作一个安装程序,它将在安装新安装之前卸载旧安装。

我面临的问题是,卸载程序停止然后删除已安装的服务,删除服务后,Windows 需要 15 秒才能删除该服务,waituntilterminated标志没有帮助,

因为删除服务命令 (Ie service.exe remove) 在 1 秒内完成

我想要的只是添加一个 15 秒的睡眠时间,该睡眠时间将在所有进程完成后[UninstallRun]或实际提取文件之前执行

因为否则卸载程序无法删除所有文件,因为该进程仍在运行 15 秒

因此,重新安装会引发错误,删除文件失败,访问被拒绝,

如果我等待 15 秒然后单击重试,则安装程序能够覆盖旧文件

inno-setup pascalscript

3
推荐指数
1
解决办法
481
查看次数

Inno Setup脚本中的基本电子邮件验证

我想在Inno Setup脚本中进行基本的字符串验证,以确保字符串是电子邮件地址.我只想看到有一个'@'字符后跟一个'.' 字符,并且这两个字符的两边至少有一个字符.类似于这个正则表达式的东西:

[^@]+@.+\.[^\.]
Run Code Online (Sandbox Code Playgroud)

对象pascal中缺少正则表达式和有限的字符串函数会让我感到悲伤.反转字符串很简单,找到第一个'.' 和'@'然后做一些比较,但没有可用的反向(字符串)功能.

我知道我可以从我写的助手DLL中调用导出的函数,但我希望避免这种解决方案.

还有其他建议吗?

delphi inno-setup pascalscript

2
推荐指数
1
解决办法
2810
查看次数

GetEnvironmentVariable在Inno Setup(Delphi)中不起作用

嗨我正在使用Inno Setup(基于Delphi)来安装我的安装程序.我想要的只是将用户名放在一个字符串中:我的代码:

var
usrname: string;
begin
usrname := GetEnvironmentVariable('USERNAME');
end;
Run Code Online (Sandbox Code Playgroud)

当我尝试编译我的代码时,总是会出现以下错误消息:

未知标识符'GetEnvironmentVariable'

我究竟做错了什么?我是delphi中的新手,所以正确的方法可能是显而易见的.

inno-setup environment-variables pascalscript

2
推荐指数
1
解决办法
1364
查看次数

如何在Inno Setup中翻译MsgBox中包含的文本?

我的inno设置脚本中包含一个[code]部分,该部分在安装过程中为用户显示一些信息。我希望能够以用户在安装过程中选择的相同语言翻译这些内容。他们目前使用的是英文文本,例如想将其翻译成俄语,等等。我知道我必须在Language.isl文件中做一些事情。以下是此类文字的示例。

if MsgBox('Previous program found. It is recommendeded to uninstall it and install a fresh program. Please note that your data will not be deleted during the uninstallation. Do you want to continue?', mbConfirmation, MB_YESNO) = IDYES then
      begin etc
Run Code Online (Sandbox Code Playgroud)

installation translation inno-setup pascalscript

2
推荐指数
1
解决办法
2067
查看次数

在Inno Setup的Run部分中使用全局字符串脚本变量

我在Inno Setup中需要一个全局字符串变量,该变量将在本[Code]节中初始化并在本[Run]节中使用。

这可能吗?

inno-setup pascalscript

2
推荐指数
1
解决办法
2239
查看次数

比较Inno Setup中的版本字符串

我正在读取INF文件的值,现在我需要将它与安装程序版本进行比较,但是当我编译时出现错误:

未知标识符:CompareVersion

怎么了?

[Code]

function GetKeyValue(const AKeyName, AFileName, ADefault: string): string;
var  
  I: Integer;
  KeyPos: Integer;
  KeyFull: string;
  FileLines: TArrayOfString;
begin
  Result := ADefault;
  if LoadStringsFromFile(AFileName, FileLines) then
  begin
    KeyFull := AKeyName + '=';
    for I := 0 to GetArrayLength(FileLines) - 1 do
    begin
      FileLines[I] := TrimLeft(FileLines[I]);
      KeyPos := Pos(KeyFull, FileLines[I]);
      if KeyPos > 0 then
      begin
        Result := Copy(FileLines[I], KeyPos + Length(AKeyName) + 1, MaxInt);
        Break;
      end;
    end;
  end;
end;

var
  L2Ver2: TLabel;

procedure DirEditChange(Sender: TObject);
var
  FilePath: string; …
Run Code Online (Sandbox Code Playgroud)

inno-setup version pascalscript

2
推荐指数
1
解决办法
2067
查看次数

Inno Setup和Check中的两个条件

我正在为我的应用程序编写一个简单的Inno Setup脚本。我做了我想要的所有东西,但是我阻止了某些事情。

我的应用程序有两种模式,用户在安装开始时选择“计算机”和“客户端”。如果选择了客户端模式,则应用程序必须从Windows启动。另外,我的应用程序可以同时安装在Windows版本(32位和64位)上,因此注册表项的路径不同。

为了使它从Windows开始,我在Inno安装脚本的末尾添加了它:

[Registry]
Check: IsWin64; Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; Permissions: users-full; ValueName: "MyApp"; ValueData: "{app}\AutoexecX86.cmd";

Check: Not IsWin64; Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; Permissions: users-full; ValueName: "MyApp"; ValueData: "{app}\Autoexec.cmd";
Run Code Online (Sandbox Code Playgroud)

如何添加条件,即我的应用仅以条件“选择客户端模式”开始。(ClientRadioButton.Checked

inno-setup pascalscript

2
推荐指数
1
解决办法
925
查看次数