Inno Setup 6一键打包Spring Boot + Redis + mysql + JDK项目

本文介绍了如何使用Inno Setup 6在Windows系统上打包包含Spring Boot、Redis、MySQL和JDK的项目。通过分离环境和jar包的打包,确保迭代更新不影响环境配置。详细步骤包括环境配置、脚本制作、项目结构说明以及WinSW的使用,提供了必要的下载链接和注意事项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

简介

将java项目打包在windows系统上运行,spring boot+redis+mysql+jdk(亲测,已成功)
笔者将环境和jar包分开打成两个exe文件进行打包,便于后期项目的迭代更新不会影响到项目的环境

Inno Setup

下载

	需要使用Inno Setup 工具进行打包
	下载地址:[官网地址](https://jrsoftware.org/isinfo.php)
	笔者使用的是6.1.2版本

在这里插入图片描述

	打包成功后会将.exe写入到此文件夹中

配置

	新建.iss文件

在这里插入图片描述

	笔者将项目环境放在D:\project\tool目录下
	jar包和logo图放在D:\project\park目录下

环境的iss文件

在这里插入图片描述

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppId "hytc.jar" 
#define MyAppName "项目运行环境"
#define MyAppVersion "1.0"
#define MyAppPublisher "Nonstandard Automation Technology Co., Ltd"
#define MyAppURL "http://localhost:8080"
#define MyAppExeName "hytc.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={
   #MyAppId}
AppName={
   #MyAppName}
AppVersion={
   #MyAppVersion}
;AppVerName={
   #MyAppName} {
   #MyAppVersion}
AppPublisher={
   #MyAppPublisher}
AppPublisherURL={
   #MyAppURL}
AppSupportURL={
   #MyAppURL}
AppUpdatesURL={
   #MyAppURL}
DefaultDirName=D:\park
SetupIconFile=D:\project\park\favicon.ico
DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputBaseFilename={
   #MyAppName}
Compression=lzma
SolidCompression=yes
WizardStyle=modern
 
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
 
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
 
; 安装文件
[Files]
; 安装部署的源文件路径
Source: 
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值