Compare commits
4 Commits
4446d382a2
...
bae2e9d675
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bae2e9d675 | ||
![]() |
86fdaf7f54 | ||
![]() |
7c7c177d15 | ||
![]() |
9330ef814e |
@ -112,6 +112,7 @@ Source: "Resources\mysql\*"; DestDir: "{app}\mysql\"; Flags: onlyifdoesntexist r
|
|||||||
|
|
||||||
;; 创建必要目录
|
;; 创建必要目录
|
||||||
[Dirs]
|
[Dirs]
|
||||||
|
Name: "{app}\nginx\logs"; Permissions: users-modify; Components: Nginx;
|
||||||
Name: "{app}\nginx\dist"; Permissions: users-modify; Components: Nginx;
|
Name: "{app}\nginx\dist"; Permissions: users-modify; Components: Nginx;
|
||||||
|
|
||||||
|
|
||||||
|
0
server/eval/Execute/Readme.md
Normal file
0
server/eval/Execute/Readme.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
## 编译流程
|
||||||
|
|
||||||
|
- 1、 运行 `resources-initialize.bat` 初始化默认资源获取目录
|
||||||
|
- 2、 dist 存放前端 build 内容
|
||||||
|
- 3、 fonts 存放后端 template 功能字体
|
||||||
|
- 4、 lib 存放后端 lib 分离依赖库
|
||||||
|
- 5、 script 将按照数据库名称,存放SQL脚本
|
||||||
|
- 6、 server 存放后端 jar
|
||||||
|
- 7、 web 存放 nginx 程序
|
||||||
|
- 8、 启动 `install-win7-eval.iss` 进行编译,编译完成后 Release 文件夹中会出现编译后的安装包
|
||||||
|
- 9、 配合 base 编译后安装程序,形成完整运行环境,支持 Windows 7 运行
|
0
server/eval/Release/Readme.md
Normal file
0
server/eval/Release/Readme.md
Normal file
18
server/eval/Resources/eval.bat
Normal file
18
server/eval/Resources/eval.bat
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001
|
||||||
|
title Eval Quick Start
|
||||||
|
|
||||||
|
cd %EVAL_MAIN%
|
||||||
|
if exist "%EVAL_MANAGE%" (
|
||||||
|
start "Eval Server" cmd /k "java -jar %EVAL_VM_PARAMS% -jar %EVAL_MANAGE_BIN%"
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "%EVAL_MANAGE%" (
|
||||||
|
start "Eval Website" cmd /k "cd web && eval-web.exe -c conf/web.conf"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Eval:
|
||||||
|
echo - EvalServer (Port: 28480)
|
||||||
|
echo - EvalWebsite (Port: 18480)
|
||||||
|
|
||||||
|
pause
|
55
server/eval/Resources/web/conf/eval-windows.conf
Normal file
55
server/eval/Resources/web/conf/eval-windows.conf
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
server {
|
||||||
|
listen 18480;
|
||||||
|
server_name _;
|
||||||
|
gzip on;
|
||||||
|
gzip_min_length 1k;
|
||||||
|
gzip_comp_level 9;
|
||||||
|
gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_disable "MSIE [1-6]\.";
|
||||||
|
|
||||||
|
root dist;
|
||||||
|
include mime.types;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/ {
|
||||||
|
proxy_pass http://127.0.0.1:28480/;
|
||||||
|
client_max_body_size 100M;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /dev-api/ {
|
||||||
|
proxy_pass http://127.0.0.1:28480/;
|
||||||
|
client_max_body_size 100M;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /file/ {
|
||||||
|
proxy_pass http://127.0.0.1:9000/;
|
||||||
|
client_max_body_size 5000M;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
error_page 405 =200 $request_uri;
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*';
|
||||||
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
||||||
|
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
|
||||||
|
if ($request_method = 'OPTIONS') {
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*';
|
||||||
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
||||||
|
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
|
||||||
|
add_header 'Access-Control-Max-Age' 1728000;
|
||||||
|
add_header 'Content-Type' 'text/plain charset=UTF-8';
|
||||||
|
add_header 'Content-Length' 0;
|
||||||
|
return 204;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
server/eval/Resources/web/conf/web.conf
Normal file
11
server/eval/Resources/web/conf/web.conf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
worker_processes 1;
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
include eval-windows.conf;
|
||||||
|
}
|
282
server/eval/install-win7-eval.iss
Normal file
282
server/eval/install-win7-eval.iss
Normal file
@ -0,0 +1,282 @@
|
|||||||
|
;iss
|
||||||
|
|
||||||
|
#define MyAppName "效能评估"
|
||||||
|
#define MyAppVersion "v1.0.0"
|
||||||
|
#define MyAppPublisher "X"
|
||||||
|
#define MyAppURL "~"
|
||||||
|
#define MyAppExeName "eval"
|
||||||
|
#define MyAppExeNameHump "Eval"
|
||||||
|
#define MyAppExeNameUpper "EVAL"
|
||||||
|
#define MyAppAssocName MyAppName + " File"
|
||||||
|
#define MyAppAssocExt ".myp"
|
||||||
|
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
|
||||||
|
|
||||||
|
|
||||||
|
; 默认配置
|
||||||
|
[Setup]
|
||||||
|
AppId={{6BA7B810-9DAD-11D1-80B4-00C04FD430C8}
|
||||||
|
; 默认安装路径
|
||||||
|
DefaultDirName={localappdata}\XManage
|
||||||
|
; 安装密码
|
||||||
|
Password=20250813
|
||||||
|
; 是否加密
|
||||||
|
Encryption=yes
|
||||||
|
; ICO图标
|
||||||
|
;SetupIconFile=Resources\icon.ico
|
||||||
|
VersionInfoProductVersion=1.0.0
|
||||||
|
VersionInfoCompany=
|
||||||
|
VersionInfoDescription={#MyAppName}服务
|
||||||
|
VersionInfoCopyright=CopyRight © 2025
|
||||||
|
VersionInfoProductName={#MyAppName}
|
||||||
|
|
||||||
|
|
||||||
|
; 默认配置
|
||||||
|
AppName={#MyAppName}
|
||||||
|
AppVersion={#MyAppVersion}
|
||||||
|
AppPublisher={#MyAppPublisher}
|
||||||
|
AppPublisherURL={#MyAppURL}
|
||||||
|
AppSupportURL={#MyAppURL}
|
||||||
|
AppUpdatesURL={#MyAppURL}
|
||||||
|
ChangesAssociations=yes
|
||||||
|
DisableDirPage=no
|
||||||
|
DisableProgramGroupPage=yes
|
||||||
|
Compression=lzma2
|
||||||
|
SolidCompression=yes
|
||||||
|
WizardStyle=modern
|
||||||
|
ChangesEnvironment=yes
|
||||||
|
PrivilegesRequired=admin
|
||||||
|
ArchitecturesAllowed=x64compatible
|
||||||
|
ArchitecturesInstallIn64BitMode=x64compatible
|
||||||
|
OutputDir=Release\
|
||||||
|
OutputBaseFilename={#MyAppExeNameHump}Setup-{#MyAppVersion}
|
||||||
|
UninstallFilesDir={app}\{#MyAppExeName}
|
||||||
|
UninstallDisplayIcon={app}\{#MyAppExeName}\{#MyAppExeName}.bat
|
||||||
|
|
||||||
|
|
||||||
|
; 语言选择
|
||||||
|
[Languages]
|
||||||
|
Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl"
|
||||||
|
|
||||||
|
|
||||||
|
;; 任务
|
||||||
|
[Tasks]
|
||||||
|
; 是否创建桌面图标
|
||||||
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||||
|
|
||||||
|
|
||||||
|
;; 程序 ICO
|
||||||
|
[Icons]
|
||||||
|
;Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}.exe"
|
||||||
|
;Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}.exe"; Tasks: desktopicon
|
||||||
|
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}\{#MyAppExeName}.bat"; Tasks: desktopicon
|
||||||
|
|
||||||
|
|
||||||
|
;; 组件安装方式
|
||||||
|
[Types]
|
||||||
|
; 完整安装所有组件
|
||||||
|
Name: full; Description: 完整组件安装;
|
||||||
|
Name: "mini"; Description: "最小安装";
|
||||||
|
; 自定义安装
|
||||||
|
Name: custom; Description: 自定义安装; Flags: iscustom
|
||||||
|
|
||||||
|
|
||||||
|
;; 组件列表选择项
|
||||||
|
[Components]
|
||||||
|
Name: Starter; Description: {#MyAppName} 启动; Types: full;
|
||||||
|
Name: UI; Description: {#MyAppName} UI; Types: full mini;
|
||||||
|
Name: Server; Description: {#MyAppName} Server; Types: full mini;
|
||||||
|
Name: Data; Description: {#MyAppName} Data; Types: full;
|
||||||
|
|
||||||
|
|
||||||
|
;; 安装包引入文件列表
|
||||||
|
[Files]
|
||||||
|
; 后端工程+启动器
|
||||||
|
;Source: "Resources\{#MyAppExeName}.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
||||||
|
;Source: "Resources\{#MyAppExeName}-console.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
||||||
|
;Source: "Resources\{#MyAppExeName}-x64.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
||||||
|
;Source: "Resources\{#MyAppExeName}-x86.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
||||||
|
;Source: "Resources\patch.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
||||||
|
|
||||||
|
Source: "Resources\{#MyAppExeName}.bat"; DestDir: "{app}\{#MyAppExeName}"; DestName: "{#MyAppExeName}.bat"; Flags: ignoreversion; Components: Starter
|
||||||
|
Source: "Resources\server\demo-0.0.1.jar"; DestDir: "{app}\{#MyAppExeName}\bin"; Flags: ignoreversion; Components: Server
|
||||||
|
|
||||||
|
Source: "Resources\lib\*"; DestDir: "{app}\eval\lib"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: Server
|
||||||
|
Source: "Resources\fonts\*"; DestDir: "{app}\eval\fonts"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: Server
|
||||||
|
|
||||||
|
; 更新数据库脚本
|
||||||
|
Source: "Resources\script\*"; DestDir: "{app}\{#MyAppExeName}\script"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: Data
|
||||||
|
|
||||||
|
; 前端工程 + Nginx
|
||||||
|
Source: "Resources\web\*"; DestDir: "{app}\{#MyAppExeName}\web"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: Starter;
|
||||||
|
Source: "Resources\dist\*"; DestDir: "{app}\{#MyAppExeName}\web\dist"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: UI;
|
||||||
|
|
||||||
|
|
||||||
|
;; 创建必要目录
|
||||||
|
[Dirs]
|
||||||
|
Name: "{app}\{#MyAppExeName}\web\logs"; Permissions: users-modify; Components: Starter;
|
||||||
|
Name: "{app}\{#MyAppExeName}\web\temp"; Permissions: users-modify; Components: Starter;
|
||||||
|
|
||||||
|
|
||||||
|
;; 安装时注册表与环境变量列表
|
||||||
|
[Registry]
|
||||||
|
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \
|
||||||
|
ValueName: "{#MyAppExeNameUpper}_MAIN"; ValueData: "{app}\{#MyAppExeName}";
|
||||||
|
; 启动jar
|
||||||
|
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \
|
||||||
|
ValueName: "{#MyAppExeNameUpper}_MANAGE_BIN"; ValueData: "{app}\{#MyAppExeName}\bin\demo-0.0.1.jar";
|
||||||
|
; 扩展启动vm变量
|
||||||
|
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \
|
||||||
|
ValueName: "{#MyAppExeNameUpper}_VM_PARAMS"; ValueData: " \
|
||||||
|
-Dloader.path=lib \
|
||||||
|
--enable-preview \
|
||||||
|
-Dserver.port=28480 \
|
||||||
|
-Dproject.database-ip=127.0.0.1 \
|
||||||
|
-Dproject.database-port=33306 \
|
||||||
|
-Dproject.database-name=eval \
|
||||||
|
-Dproject.redis-url=127.0.0.1 \
|
||||||
|
-Dproject.minio-url=http://127.0.0.1:9000 \
|
||||||
|
-Dproject.minio-k=minio_FEaTQx \
|
||||||
|
-Dproject.minio-v=minio_34KYwR \
|
||||||
|
";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;; 安装完运行的菜单与后续操作
|
||||||
|
; [Run]
|
||||||
|
;; 安装完成后运行 startup.exe
|
||||||
|
; Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: postinstall runascurrentuser waituntilterminated skipifsilent hidewizard;
|
||||||
|
; Filename: "timeout"; Parameters: "/t 2 /nobreak >nul && {app}\{#MyAppExeName}.exe"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: postinstall runascurrentuser waituntilterminated skipifsilent hidewizard;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;; 自定义函数
|
||||||
|
[Code]
|
||||||
|
|
||||||
|
const
|
||||||
|
WM_SETTINGCHANGE = 26; // 0x001A 的十进制
|
||||||
|
SMTO_ABORTIFHUNG = 2; // 0x0002 的十进制
|
||||||
|
|
||||||
|
// 定义 VC++ 2019 运行时的注册表检查路径
|
||||||
|
VC2019_REDIST_X64 = '{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}';
|
||||||
|
VC2019_REDIST_X86 = '{422B21A3-06FA-3F2F-A6C6-21BCC9B8E2F3}';
|
||||||
|
|
||||||
|
function SendMessageTimeout(
|
||||||
|
hWnd: Integer;
|
||||||
|
Msg: Integer;
|
||||||
|
wParam: Integer;
|
||||||
|
lParamStr: String;
|
||||||
|
fuFlags: Integer;
|
||||||
|
uTimeout: Integer;
|
||||||
|
var lpdwResult: Integer
|
||||||
|
): Integer;
|
||||||
|
external 'SendMessageTimeoutW@user32.dll stdcall';
|
||||||
|
|
||||||
|
|
||||||
|
// 给 Path 系统环境变量追加环境
|
||||||
|
function NeedsAddPath(Param: string): boolean;
|
||||||
|
var
|
||||||
|
OrigPath: string;
|
||||||
|
begin
|
||||||
|
if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
|
||||||
|
'SYSTEM\CurrentControlSet\Control\Session Manager\Environment',
|
||||||
|
'Path', OrigPath)
|
||||||
|
then begin
|
||||||
|
Result := True;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
// 检查路径是否已存在
|
||||||
|
Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;
|
||||||
|
if Result = True then
|
||||||
|
Result := Pos(';' + Param + '\;', ';' + OrigPath + ';') = 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
// 刷新系统环境
|
||||||
|
procedure RefreshEnvironment;
|
||||||
|
var
|
||||||
|
Res: Integer;
|
||||||
|
begin
|
||||||
|
SendMessageTimeout(
|
||||||
|
HWND_BROADCAST,
|
||||||
|
WM_SETTINGCHANGE,
|
||||||
|
0,
|
||||||
|
'Environment',
|
||||||
|
SMTO_ABORTIFHUNG,
|
||||||
|
5000,
|
||||||
|
Res
|
||||||
|
);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
// 检查环境变量,路径是否存在空格
|
||||||
|
function CheckRegistryPath(Path: string): Boolean;
|
||||||
|
begin
|
||||||
|
if Pos(' ', Path) > 0 then
|
||||||
|
begin
|
||||||
|
SuppressibleMsgBox('安装程序错误: 检测到无效的注册表路径 "' + Path + '"。路径不能包含空格。', mbCriticalError, MB_OK, IDOK);
|
||||||
|
Abort;
|
||||||
|
Result := False;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
// 以 UTF-8 写入文件
|
||||||
|
function SaveStringToUTF8File(const FileName, Content: String; Append: Boolean): Boolean;
|
||||||
|
var
|
||||||
|
UTF8Content: AnsiString;
|
||||||
|
begin
|
||||||
|
UTF8Content := UTF8Encode(Content);
|
||||||
|
Result := SaveStringToFile(FileName, UTF8Content, Append);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
// 检查是否已安装 VC++ 2019 运行时
|
||||||
|
function IsVC2019Installed: Boolean;
|
||||||
|
var
|
||||||
|
Version: String;
|
||||||
|
begin
|
||||||
|
// 检查64位版本
|
||||||
|
Result := RegQueryStringValue(
|
||||||
|
HKLM,
|
||||||
|
'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64',
|
||||||
|
'Version',
|
||||||
|
Version
|
||||||
|
) or RegKeyExists(
|
||||||
|
HKLM,
|
||||||
|
'SOFTWARE\Classes\Installer\Dependencies\' + VC2019_REDIST_X64
|
||||||
|
);
|
||||||
|
|
||||||
|
// 如果是32位系统或需要检查32位运行时
|
||||||
|
if not Result and (not IsWin64) then
|
||||||
|
Result := RegQueryStringValue(
|
||||||
|
HKLM,
|
||||||
|
'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x86',
|
||||||
|
'Version',
|
||||||
|
Version
|
||||||
|
) or RegKeyExists(
|
||||||
|
HKLM,
|
||||||
|
'SOFTWARE\Classes\Installer\Dependencies\' + VC2019_REDIST_X86
|
||||||
|
);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
// 在安装前检查
|
||||||
|
function InitializeSetup: Boolean;
|
||||||
|
begin
|
||||||
|
// 默认允许安装继续
|
||||||
|
Result := True;
|
||||||
|
// 如果 VC++ 2019 未安装
|
||||||
|
if not IsVC2019Installed then
|
||||||
|
begin
|
||||||
|
MsgBox('本程序需要 Microsoft Visual C++ 2019 运行时才能继续(1001)', mbError, MB_OK)
|
||||||
|
// 中止安装
|
||||||
|
Result := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
[UninstallRun]
|
||||||
|
Filename: "taskkill"; Parameters: "-f -im {#MyAppExeName}-web.exe"; Flags: runascurrentuser runhidden waituntilterminated
|
||||||
|
|
30
server/eval/resources-initialize.bat
Normal file
30
server/eval/resources-initialize.bat
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal enabledelayedexpansion
|
||||||
|
chcp 65001 >nul
|
||||||
|
title Initialization
|
||||||
|
|
||||||
|
set "BASE_PATH=Resources/"
|
||||||
|
|
||||||
|
:: fonts 模版扩展字体
|
||||||
|
:: lib 启动依赖库
|
||||||
|
:: server 启动 jar
|
||||||
|
:: script 或数据库初始化脚本、或数据库补丁脚本
|
||||||
|
:: web Nginx程序与代理配置
|
||||||
|
:: dist 服务Web UI
|
||||||
|
|
||||||
|
echo [INFO] 正在创建 【评估】 初始化构建安装包目录结构
|
||||||
|
for %%f in (
|
||||||
|
"dist"
|
||||||
|
"fonts"
|
||||||
|
"lib"
|
||||||
|
"script/eval"
|
||||||
|
"server"
|
||||||
|
"web"
|
||||||
|
) do (
|
||||||
|
echo [INFO] 创建: %%~f
|
||||||
|
mkdir "%BASE_PATH%%%~f"
|
||||||
|
echo.
|
||||||
|
)
|
||||||
|
|
||||||
|
pause
|
||||||
|
endlocal
|
0
server/simulation/Release/Readme.md
Normal file
0
server/simulation/Release/Readme.md
Normal file
@ -2,12 +2,13 @@
|
|||||||
chcp 65001 >nul
|
chcp 65001 >nul
|
||||||
title Simulation Quick Start
|
title Simulation Quick Start
|
||||||
|
|
||||||
|
cd %SIMULATION_MAIN%
|
||||||
if exist "%SIMULATION_MANAGE_BIN%" (
|
if exist "%SIMULATION_MANAGE_BIN%" (
|
||||||
start "Simulation Server" cmd /k "chcp 65001 && title Simulation Server && java -Dspring.profiles.active=test,mysql,redis,rocketmq,springdoc %SIMULATION_VM_PARAMS% -jar %SIMULATION_MANAGE_BIN%"
|
start "Simulation Server" cmd /k "chcp 65001 && title Simulation Server && java -Dspring.profiles.active=test,mysql,redis,rocketmq,springdoc %SIMULATION_VM_PARAMS% -jar %SIMULATION_MANAGE_BIN%"
|
||||||
)
|
)
|
||||||
|
|
||||||
if exist "%SIMULATION_MANAGE_BIN%" (
|
if exist "%SIMULATION_MANAGE_BIN%" (
|
||||||
cd %SIMULATION_MAIN%\web
|
cd web
|
||||||
start "Simulation Website" cmd /k "title Simulation Website && simulation-web.exe -c conf/web.conf"
|
start "Simulation Website" cmd /k "title Simulation Website && simulation-web.exe -c conf/web.conf"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#define MyAppPublisher "X"
|
#define MyAppPublisher "X"
|
||||||
#define MyAppURL "~"
|
#define MyAppURL "~"
|
||||||
#define MyAppExeName "simulation"
|
#define MyAppExeName "simulation"
|
||||||
|
#define MyAppExeNameHump "Simulation"
|
||||||
|
#define MyAppExeNameUpper "SIMULATION"
|
||||||
#define MyAppAssocName MyAppName + " File"
|
#define MyAppAssocName MyAppName + " File"
|
||||||
#define MyAppAssocExt ".myp"
|
#define MyAppAssocExt ".myp"
|
||||||
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
|
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
|
||||||
@ -47,7 +49,7 @@ PrivilegesRequired=admin
|
|||||||
ArchitecturesAllowed=x64compatible
|
ArchitecturesAllowed=x64compatible
|
||||||
ArchitecturesInstallIn64BitMode=x64compatible
|
ArchitecturesInstallIn64BitMode=x64compatible
|
||||||
OutputDir=Release\
|
OutputDir=Release\
|
||||||
OutputBaseFilename=SimulationSetup-{#MyAppVersion}
|
OutputBaseFilename={#MyAppExeNameHump}Setup-{#MyAppVersion}
|
||||||
UninstallFilesDir={app}\{#MyAppExeName}
|
UninstallFilesDir={app}\{#MyAppExeName}
|
||||||
UninstallDisplayIcon={app}\{#MyAppExeName}\{#MyAppExeName}.bat
|
UninstallDisplayIcon={app}\{#MyAppExeName}\{#MyAppExeName}.bat
|
||||||
|
|
||||||
@ -63,6 +65,13 @@ Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl"
|
|||||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||||
|
|
||||||
|
|
||||||
|
;; 程序 ICO
|
||||||
|
[Icons]
|
||||||
|
;Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}.exe"
|
||||||
|
;Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}.exe"; Tasks: desktopicon
|
||||||
|
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}\{#MyAppExeName}.bat"; Tasks: desktopicon
|
||||||
|
|
||||||
|
|
||||||
;; 组件安装方式
|
;; 组件安装方式
|
||||||
[Types]
|
[Types]
|
||||||
; 完整安装所有组件
|
; 完整安装所有组件
|
||||||
@ -109,13 +118,13 @@ Name: "{app}\{#MyAppExeName}\web\temp"; Permissions: users-modify; Components: S
|
|||||||
;; 安装时注册表与环境变量列表
|
;; 安装时注册表与环境变量列表
|
||||||
[Registry]
|
[Registry]
|
||||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \
|
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \
|
||||||
ValueName: "SIMULATION_MAIN"; ValueData: "{app}\{#MyAppExeName}";
|
ValueName: "{#MyAppExeNameUpper}_MAIN"; ValueData: "{app}\{#MyAppExeName}";
|
||||||
; 启动jar
|
; 启动jar
|
||||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \
|
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \
|
||||||
ValueName: "SIMULATION_MANAGE_BIN"; ValueData: "{app}\{#MyAppExeName}\bin\demo-0.0.1.jar";
|
ValueName: "{#MyAppExeNameUpper}_MANAGE_BIN"; ValueData: "{app}\{#MyAppExeName}\bin\demo-0.0.1.jar";
|
||||||
; 扩展启动vm变量
|
; 扩展启动vm变量
|
||||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \
|
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \
|
||||||
ValueName: "SIMULATION_VM_PARAMS"; ValueData: " \
|
ValueName: "{#MyAppExeNameUpper}_VM_PARAMS"; ValueData: " \
|
||||||
--enable-preview \
|
--enable-preview \
|
||||||
-Dserver.port=28280 \
|
-Dserver.port=28280 \
|
||||||
-Djasypt.encryptor.password=jwnwfA1pIoLihBptgbR8S6UEEAfGurjG \
|
-Djasypt.encryptor.password=jwnwfA1pIoLihBptgbR8S6UEEAfGurjG \
|
||||||
@ -129,12 +138,6 @@ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environmen
|
|||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
;; 程序 ICO
|
|
||||||
[Icons]
|
|
||||||
;Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}.exe"
|
|
||||||
;Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}.exe"; Tasks: desktopicon
|
|
||||||
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}\{#MyAppExeName}.bat"; Tasks: desktopicon
|
|
||||||
|
|
||||||
|
|
||||||
;; 安装完运行的菜单与后续操作
|
;; 安装完运行的菜单与后续操作
|
||||||
; [Run]
|
; [Run]
|
||||||
@ -272,6 +275,6 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
[UninstallRun]
|
[UninstallRun]
|
||||||
Filename: "taskkill"; Parameters: "-f -im simulation-web.exe"; Flags: runascurrentuser runhidden waituntilterminated
|
Filename: "taskkill"; Parameters: "-f -im {#MyAppExeName}-web.exe"; Flags: runascurrentuser runhidden waituntilterminated
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ for %%f in (
|
|||||||
"dist"
|
"dist"
|
||||||
) do (
|
) do (
|
||||||
echo [INFO] 创建: %%~f
|
echo [INFO] 创建: %%~f
|
||||||
mkdir "%BASE_PATH%/%%~f"
|
mkdir "%BASE_PATH%%%~f"
|
||||||
echo.
|
echo.
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user