我已将我的应用程序添加到安装脚本中,但是当程序构建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]
答案 0 :(得分:0)
您是否将已安装的TokenServer.exe
与来源main.exe
进行了比较?
请注意,安装程序可能小于已安装的应用程序,因为它已被压缩。
我想问题是你没有包含应用程序依赖的一些.dll。