目录
简介
将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={
#MyAppN