info setup制作安装包

本文详细介绍了如何使用Inno Setup制作Windows安装包,包括下载软件、编辑脚本生成EXE以及遇到的坑,如安装后程序运行提示缺少库、安装时需要管理员权限等问题的解决方案。此外,还分享了如何设置安装界面为中文。
摘要由CSDN通过智能技术生成

一 安装包制作

  1. 准备好可执行的应用程序
  2. 下载info setup软件 (下载地址:http://www.jrsoftware.org/isdl.php#stable
  3. 编辑脚本,生成exe https://www.cnblogs.com/linuxAndMcu/p/10974927.html

二 走过的坑

  • 生成 安装程序.exe,双击开始安装 ,但是安装完成后点击界面生成的可执行程序会提示少库, 通过可执行程序找到路径下的原来的可执行程序,双击可以正常运行,查看是因为在安装exe时,会默认在路径下面创建一个exe,(直接把原来的exe拷贝过来),所以在执行应用程序的时候,可执行程序会按照原来的路径依赖关系去查找库,查找不到就会提示找不到库,找不到资源文件。

需要设置运行程序的路径:

; Script generated by the Inno Setup Script Wizard.

; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!



#define MyAppName "Test"

#define MyAppVersion "2020.0115"

#define MyAppPublisher "mycompany.Inc."

#define MyAppURL "http://www.mycompany.com/"

#define MyAppExeName "Tesy.exe"



[Setup]

; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.

; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)

AppId={
  {5DEDA9C7-6A3D-4898-AB9B-5B5BEEC15922}

AppName={#MyAppName}

AppVersion={#MyAppVersion}

;AppVerName={#MyAppName} {#MyAppVersion}

AppPublisher={#MyAppPublisher}

AppPublisherURL={#MyAppURL}

AppSupportURL={#MyAppURL}

AppUpdatesURL={#MyAppURL}

DefaultDirName={autopf}\{#MyAppName}

DisableProgramGroupPage=yes

; The [Icons] "quicklaunchicon" entry uses {userappdata} but its [Tasks] entry has a proper IsAdminInstallMode Check.

UsedUserAreasWarning=no

; Uncomment the following line to run in non administrative install mode (install for current user only.)

;PrivilegesRequired=lowest

OutputDir=D:\output

OutputBaseFilename=Test
SetupIconFile=D:\work\Test\Test\Test.ico

Compression=lzma

SolidCompression=yes

WizardStyle=modern



[Languages]

Name: "english"; MessagesFile: "compiler:Default.isl"



[Tasks]

Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

Name:
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值