Inno Setup 5打包exe遇到的坑,做一个学习记录
; 脚本由 Inno Setup 脚本向导 生成!
; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档!
#define MyAppName "人员管理系统"
#define MyAppVersion "1.0"
#define MyAppPublisher "谷多软件"
#define MyAppURL "http://www.goldou.com/"
#define MyAppExeName "Goldou.UserBase.exe"
[Setup]
; 注: AppId的值为单独标识该应用程序。
; 不要为其他安装程序使用相同的AppId值。
; (生成新的GUID,点击 工具|在IDE中生成GUID。)
AppId={{5FAE5728-06AB-401F-AD4D-34D8979DA96A}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=D:\Program Files\Microsoft Goldou User
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
OutputBaseFilename=setup
SetupIconFile=E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Resources\logo.ico
Compression=lzma
SolidCompression=yes
[Languages]
Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone; OnlyBelowVersion: 0,8.1
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone
[Files]
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.UserBase.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Aspose.Cells.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Aspose.Words.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\AxInterop.EloamThumbnailLib.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\AxInterop.EloamViewLib.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.BLL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.BLL.pdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.Common.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.Common.pdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.DAL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.DAL.pdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.DBHelper.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.DBHelper.pdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.Model.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.Model.pdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.UserBase.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.UserBase.exe.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.UserBase.pdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.UserBase.vshost.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.UserBase.vshost.exe.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Goldou.UserBase.vshost.exe.manifest"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\goldou_salary.db"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\HandyControl.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\HandyControl.pdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\HandyControl.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Interop.EloamThumbnailLib.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Interop.EloamViewLib.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\libzkfpcsharp.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Microsoft.Windows.Shell.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\OpenSmtp.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\org.in2bits.MyXls.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\System.Data.SQLite.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\ToastNotifications.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\ToastNotifications.Messages.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\环境\shoping_client\Goldou.prsion_shopping\Goldou.prsion_shopping\bin\Release - 副本\dotNetFx40_Full_x86_x64.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\scanFile\*"; DestDir: "{app}\scanFile"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "E:\Project\2020\0507人员管理系统\Goldou_fire_Hoody_aotoscan\Goldou.UserBase\bin\Debug\Resources\*"; DestDir: "{app}\Resources"; Flags: ignoreversion recursesubdirs createallsubdirs
; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion,注意文件夹输出”
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[Code]
function InitializeSetup: Boolean;
var
Path,tmppath:string ;
ResultCode: Integer;
dotNetV2RegPath:string;
dotNetV2DownUrl:string;
dotNetV2PackFile:string;
begin
dotNetV2RegPath:='SOFTWARE\Microsoft\.NETFramework\Policy\v4.0';
dotNetV2DownUrl:='http://dl1sw.baidu.com/soft/9b/15910/Microsoft.NET.exe?version=585709662';
dotNetV2PackFile:='{src}\dotNetFx40_Full_x86_x64.exe';
//先在注册表查找.net4.0是否存在
if RegKeyExists(HKLM, dotNetV2RegPath) then
begin
Result := true;
end
//如果注册表里面没有发现.net4.0
else
begin
if MsgBox('系统检测到您没有安装.Net Framework4.0运行环境,是否立即安装?', mbConfirmation, MB_YESNO) = idYes then
begin
//和setup同级目录下的donet安装包
Path := ExpandConstant(dotNetV2PackFile);
//先抽取到临时目录
tmppath := ExpandConstant('{tmp}\dotNetFx40_Full_x86_x64.exe');
ExtractTemporaryFile('dotNetFx40_Full_x86_x64.exe');
msgbox(tmppath, mbConfirmation, MB_YESNO);
Exec(tmppath, '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
if(FileOrDirExists(tmppath)) then
begin
Exec(tmppath, '/q', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
if RegKeyExists(HKLM, dotNetV2RegPath) then
begin
Result := true;
end
else
begin
MsgBox('未能成功安装.Net Framework4.0运行环境,系统将无法运行,本安装程序即将退出!',mbInformation,MB_OK);
end
end
else
begin
if MsgBox('软件安装目录中没有包含.Net Framework4.0的安装程序,是否立即下载后安装?', mbConfirmation, MB_YESNO) = idYes then
begin
Path := ExpandConstant('{pf}/Internet Explorer/iexplore.exe');
Exec(Path, dotNetV2DownUrl , '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
MsgBox('请安装好.Net Framework4.0环境后,再运行本安装包程序!',mbInformation,MB_OK);
Result := false;
end
else
begin
MsgBox('不下载安装.Net Framework4.0运行环境,系统将无法运行,本安装程序即将退出!',mbInformation,MB_OK);
Result := false;
end
end
end
else
begin
MsgBox('没有安装.Net Framework2.0运行环境,系统将无法运行,本安装程序即将退出!',mbInformation,MB_OK);
Result := false;
end;
end;
end;
Inno Setup 5打包exe遇到的坑,做一个学习记录的更多相关文章
- Inno setup 简单打包教程
转自:http://blog.csdn.net/ruifangcui7758/article/details/6662646 前段时间关注了VC6.0自带的Installshield打包的使用方法,感 ...
- 使用Inno SetUp脚本打包Winform程序
在开发桌面程序时,往往需要用到打包工具将程序打包为exe可执行文件. 之前在项目中用了下 InstallShield Limited Edition for Visual Studio 2015,它 ...
- [InnoSetup]Inno Setup软件打包脚本
脚本由 Inno Setup 脚本向导 生成! ; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档! #define MyAppName "SFT期货交易系统&quo ...
- Inno Setup Winfrom 打包工具
1.下载并安装Inno Setup 编译器 2.安装完成后打开Inno Setup 编译器: 3.选择[用「脚本向导」创建新的脚本文件(S)]: 4.点击[下一步]: 5.填写制作后程序的基本信息: ...
- pyinstaller打包exe程序各种坑!!!
pyinstaller打包python成exe可执行程序,各种报错,各种坑,在次记录下 一.pyinstaller打包报错for real_module_name, six_moduleAttribu ...
- 分享一个自用的 Inno Setup 软件打包脚本
此脚本支持打包mysql.安装mysql服务.安装windows服务.操作ini文件.操作注册表.高效压缩文件等功能,基本能满足常用的软件打包需求. ;定义各种常量 #define MyAppName ...
- inno setup 软件打包
2017-05-26 软件开发完毕以后,要进行打包发布,有几款打包用的软件很常见:innosetup,nullsoft,installshield.本人今天终于把自己独立开发的呈现软件打了包.第一个版 ...
- exe4j 打包jar包程序,inno setup complier打包所有
关于库: jar包中对于引用第三方库的话,需要再exe4j中引用. rxtx http://rxtx.qbang.org/wiki/index.php/Download
- 使用Inno Setup 打包jdk、mysql、tomcat、webapp等为一个exe安装包(转)
之前一直都没涉及到打包安装方面的东西,都是另一个同事负责的,使用的工具(installshield)也比较高大上一点,可是后来他离职以后接受的同事也只能是在这个基础上做个简单的配置,然后打包,可是现在 ...
随机推荐
- 3. 站在使用层面,Bean Validation这些标准接口你需要烂熟于胸
乔丹是我听过的篮球之神,科比是我亲眼见过的篮球之神.本文已被 https://www.yourbatman.cn 收录,里面一并有Spring技术栈.MyBatis.JVM.中间件等小而美的专栏供以免 ...
- 12_进程,线程,协程,IO多路复用的区别
1.进程 1.进程可以使用计算机多核 2.进程是资源分配的单位 3.进程的创建要比线程消耗更多的资源效率很低 4.进程空间独立,数据安全性跟好操作有专门的进程间通信方式 5.一个进程可以包含多个线程, ...
- 官网安装Python包太慢?教你三种下载安装方式-PiP、conda、轮子,教你三种Pytorch的下载安装方式,保证你再也不用出现Error
上一期我们介绍了CUDA下载安装以及其总结,这一期教大家如何在Anaconda中使用CUDA来进行加速.神经网络依赖cuDNN的下载安装,以及下载和安装Pytorch-GPU安装包的三种方式(cond ...
- Solon详解(六)- Solon的校验扩展框架使用与扩展
Solon详解系列文章: Solon详解(一)- 快速入门 Solon详解(二)- Solon的核心 Solon详解(三)- Solon的web开发 Solon详解(四)- Solon的事务传播机制 ...
- Istio 运维实战系列(1):应用容器对 Envoy Sidecar 的启动依赖问题
本系列文章将介绍用户从 Spring Cloud,Dubbo 等传统微服务框架迁移到 Istio 服务网格时的一些经验,以及在使用 Istio 过程中可能遇到的一些常见问题的解决方法. 故障现象 该问 ...
- HTML-CSS-JS Prettify 代码格式化插件
前提:已经安装 node.js.安装插件 HTML-CSS-JS Prettify,修改node路径,即可通过单击右键 HTML-CSS-JS Prettify 中的 Prettify Code 使用 ...
- 单应用模式 - Layuiadmin单页版放入TP6.0的部署方案
thinkphp6.0.3单应用模式.layuiadmin1.4.0单页版,不需要tp的视图驱动 1. 复制 src.start 两个文件夹 2. 粘贴到 thinkphp 的 public 目录下 ...
- HTML标签语言一览表
<html> ● 文件声明 让浏览器知道这是 html 文件 <head> ● 开头 提供文件整体资讯 <title> ● 标题 定义文件标题,将显示于浏览顶端 & ...
- Hadoop框架:单服务下伪分布式集群搭建
本文源码:GitHub·点这里 || GitEE·点这里 一.基础环境 1.环境版本 环境:centos7 hadoop版本:2.7.2 jdk版本:1.8 2.Hadoop目录结构 bin目录:存放 ...
- Redis集群模式(Cluster)部署
1. 安装依赖包 注意:本节需要使用root用户操作 1.1 安装ruby yum install ruby -y yum install ruby-devel.x86_64 -y 1.2 安装rub ...