【问题标题】:Inno Setup creates installer without including applicationInno Setup 创建安装程序而不包括应用程序
【发布时间】:2015-03-11 17:49:24
【问题描述】:

我已将我的应用程序添加到安装脚本中,但是当程序构建 main.exe (Go) 应用程序安装程序时,我的应用程序未包含在安装程序中。

安装程序会按预期安装目标应用程序,但程序在执行时会立即退出。

Go 程序约为 8mb,安装程序为 1.5mb。编译时,如果我拼错了我的应用程序的名称,它无法构建,证明它以某种方式链接到正确的 main.exe 应用程序。

我正在运行 Windows 8 64 位,这是 Inno Setup 使用的安装程序脚本(取自 64 位示例):

[Setup]
AppName=TokenServer
AppVersion=1.5
DefaultDirName={pf}\TokenServer
DefaultGroupName=TokenServer
UninstallDisplayIcon={app}\TokenServer.exe
Compression=lzma2
SolidCompression=yes
OutputDir=g:/_GOLANG/tokenserver/output
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
[Files]
Source: "main.exe"; DestDir: "{app}"; DestName: "TokenServer.exe"
[Icons]
Name: "{group}\TokenServer"; Filename: "{app}\TokenServer.exe"

编译日志:

 *** Starting compile.  [12:00:42]

[ISPP] Preprocessing.
[ISPP] Preprocessed.

Parsing [Setup] section, line 3
Parsing [Setup] section, line 4
Parsing [Setup] section, line 5
Parsing [Setup] section, line 6
Parsing [Setup] section, line 7
Parsing [Setup] section, line 8
Parsing [Setup] section, line 9
Parsing [Setup] section, line 10
Parsing [Setup] section, line 13
Parsing [Setup] section, line 17
Reading file (WizardImageFile)
   File: C:\Program Files (x86)\Inno Setup 5\WIZMODERNIMAGE.BMP
Reading file (WizardSmallImageFile)
   File: C:\Program Files (x86)\Inno Setup 5\WIZMODERNSMALLIMAGE.BMP
Preparing Setup program executable
Reading default messages from Default.isl
Parsing [LangOptions], [Messages], and [CustomMessages] sections
   File: C:\Program Files (x86)\Inno Setup 5\Default.isl
   Messages in script file
Reading [Code] section
Parsing [Icons] section, line 23
Parsing [Files] section, line 20
Reading version info: G:\_GOLANG\tokenserver\main.exe
Deleting setup.exe from output directory
Creating setup files
   Compressing: G:\_GOLANG\tokenserver\main.exe
   Compressing Setup program executable
   Updating version info

*** Finished.  [12:00:55, 00:12.250 elapsed]

【问题讨论】:

  • 能否包含 InnoSetup 编译器日志?
  • @martin-prikryl 添加了控制台日志,谢谢
  • 在编译过程中压缩 main.exe 时显然花费了正确的时间(根据压缩速度和所用时间判断)

标签: inno-setup


【解决方案1】:

您是否将安装的TokenServer.exe 与源main.exe 进行了比较?

请注意,安装程序可以小于已安装的应用程序,因为它是压缩的。

我猜问题是您没有包含应用程序所依赖的某些 .dll。

【讨论】:

  • Golang 不使用任何 DLL 文件,我的意思是说安装的应用程序是 1.5 mb。世界上没有任何压缩可以将任意 8+mb 的文件压缩成 1.5mb。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-01-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-06-27
相关资源
最近更新 更多