diff --git a/server/model_full/Execute/Readme.md b/server/model_full/Execute/Readme.md new file mode 100644 index 0000000..e69de29 diff --git a/server/model_full/Readme.md b/server/model_full/Readme.md new file mode 100644 index 0000000..4a4ab26 --- /dev/null +++ b/server/model_full/Readme.md @@ -0,0 +1,35 @@ + +## 编译流程 783 + + - 1、 运行 `resources-initialize.bat` 初始化默认资源获取目录 + - 2、 Resource/database 存放数据库程序 + - 3、 Resource/dist 存放前端 build 内容 + - 4、 Resource/io 存放 MinIO 服务 + - 5、 Resource/java 存放 JDK21 内容 + - 6、 Resource/script 将按照数据库名称,存放SQL脚本 + - 7、 Resource/server 存放后端 jar + - 8、 Resource/usr 存放脚本运行环境命令 + - 9、 Resource/web 存放 nginx 程序 + - 10、 Resource/ 存放一个 `icon.ico` 图标 + - 11、 Resource/ 存放一个 `model*.exe` 可执行程序,用于安装数据库、启动前后端服务 + - 12、 Resource/ 存放一个 `patch.exe` 可执行程序,用于运行库补丁 + - 13、 启动 `install-win10-model-783.iss` 进行编译,编译完成后 Release 文件夹中会出现编译后的安装包 + - 14、 配合 base 编译后安装程序,形成完整运行环境,支持 Windows 10 运行 + + +## 编译流程 203 + + - 1、 运行 `resources-initialize.bat` 初始化默认资源获取目录 + - 2、 Resource/database 存放数据库程序 + - 3、 Resource/dist 存放前端 build 内容 + - 4、 Resource/io 存放 MinIO 服务 + - 5、 Resource/java 存放 JDK21 内容 + - 6、 Resource/script 将按照数据库名称,存放SQL脚本 + - 7、 Resource/server 存放后端 jar + - 8、 Resource/usr 存放脚本运行环境命令 + - 9、 Resource/web 存放 nginx 程序 + - 10、 Resource/ 存放一个 `icon.ico` 图标 + - 11、 Resource/ 存放一个 `model*.exe` 可执行程序,用于安装数据库、启动前后端服务 + - 12、 Resource/ 存放一个 `patch.exe` 可执行程序,用于运行库补丁 + - 13、 启动 `install-win10-model-203.iss` 进行编译,编译完成后 Release 文件夹中会出现编译后的安装包 + - 14、 配合 base 编译后安装程序,形成完整运行环境,支持 Windows 10 运行 \ No newline at end of file diff --git a/server/model_full/Release/Readme.md b/server/model_full/Release/Readme.md new file mode 100644 index 0000000..e69de29 diff --git a/server/model_full/Resources_203/icon.ico b/server/model_full/Resources_203/icon.ico new file mode 100644 index 0000000..b9bdeb7 Binary files /dev/null and b/server/model_full/Resources_203/icon.ico differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/buckets/.bloomcycle.bin/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/buckets/.bloomcycle.bin/xl.meta new file mode 100644 index 0000000..e424425 Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/buckets/.bloomcycle.bin/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/buckets/.usage-cache.bin.bkp/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/buckets/.usage-cache.bin.bkp/xl.meta new file mode 100644 index 0000000..7d9f2b1 Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/buckets/.usage-cache.bin.bkp/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/buckets/.usage-cache.bin/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/buckets/.usage-cache.bin/xl.meta new file mode 100644 index 0000000..4e96d3d Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/buckets/.usage-cache.bin/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/buckets/.usage.json/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/buckets/.usage.json/xl.meta new file mode 100644 index 0000000..8affa2b Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/buckets/.usage.json/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/buckets/dev/.metadata.bin/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/buckets/dev/.metadata.bin/xl.meta new file mode 100644 index 0000000..dc5e308 Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/buckets/dev/.metadata.bin/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/buckets/dev/.usage-cache.bin.bkp/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/buckets/dev/.usage-cache.bin.bkp/xl.meta new file mode 100644 index 0000000..2bcf1e2 Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/buckets/dev/.usage-cache.bin.bkp/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/buckets/dev/.usage-cache.bin/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/buckets/dev/.usage-cache.bin/xl.meta new file mode 100644 index 0000000..30f7588 Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/buckets/dev/.usage-cache.bin/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/buckets/log/.usage-cache.bin.bkp/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/buckets/log/.usage-cache.bin.bkp/xl.meta new file mode 100644 index 0000000..5ea74e7 Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/buckets/log/.usage-cache.bin.bkp/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/buckets/log/.usage-cache.bin/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/buckets/log/.usage-cache.bin/xl.meta new file mode 100644 index 0000000..e8694e4 Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/buckets/log/.usage-cache.bin/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/config/config.json/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/config/config.json/xl.meta new file mode 100644 index 0000000..a3663db Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/config/config.json/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/config/iam/format.json/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/config/iam/format.json/xl.meta new file mode 100644 index 0000000..8b362e0 Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/config/iam/format.json/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/config/iam/service-accounts/V8UDKIII9ynU6MPGteUZ/identity.json/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/config/iam/service-accounts/V8UDKIII9ynU6MPGteUZ/identity.json/xl.meta new file mode 100644 index 0000000..71b870b Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/config/iam/service-accounts/V8UDKIII9ynU6MPGteUZ/identity.json/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/config/iam/sts/G680P189S3N429MKFIGR/identity.json/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/config/iam/sts/G680P189S3N429MKFIGR/identity.json/xl.meta new file mode 100644 index 0000000..de89915 Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/config/iam/sts/G680P189S3N429MKFIGR/identity.json/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/config/iam/sts/MGNJS0JU5DYVAMNM0BXD/identity.json/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/config/iam/sts/MGNJS0JU5DYVAMNM0BXD/identity.json/xl.meta new file mode 100644 index 0000000..b8773fc Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/config/iam/sts/MGNJS0JU5DYVAMNM0BXD/identity.json/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/config/iam/sts/NAQQXCG2KYH500ON0KTK/identity.json/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/config/iam/sts/NAQQXCG2KYH500ON0KTK/identity.json/xl.meta new file mode 100644 index 0000000..ac0b374 Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/config/iam/sts/NAQQXCG2KYH500ON0KTK/identity.json/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/config/iam/sts/W85Y521PI7DYKDD79PN5/identity.json/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/config/iam/sts/W85Y521PI7DYKDD79PN5/identity.json/xl.meta new file mode 100644 index 0000000..cfdb03a Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/config/iam/sts/W85Y521PI7DYKDD79PN5/identity.json/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/format.json b/server/model_full/Resources_203/io/data/.minio.sys/format.json new file mode 100644 index 0000000..71b0382 --- /dev/null +++ b/server/model_full/Resources_203/io/data/.minio.sys/format.json @@ -0,0 +1 @@ +{"version":"1","format":"xl-single","id":"336b01aa-5890-4b41-a360-4cc54cf00592","xl":{"version":"3","this":"20dd394e-1e16-4f61-81f7-e40bbe4768a0","sets":[["20dd394e-1e16-4f61-81f7-e40bbe4768a0"]],"distributionAlgo":"SIPMOD+PARITY"}} \ No newline at end of file diff --git a/server/model_full/Resources_203/io/data/.minio.sys/pool.bin/xl.meta b/server/model_full/Resources_203/io/data/.minio.sys/pool.bin/xl.meta new file mode 100644 index 0000000..e32b202 Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/pool.bin/xl.meta differ diff --git a/server/model_full/Resources_203/io/data/.minio.sys/tmp/097e35c2-610c-4d66-bfeb-81c1dec2941c b/server/model_full/Resources_203/io/data/.minio.sys/tmp/097e35c2-610c-4d66-bfeb-81c1dec2941c new file mode 100644 index 0000000..e36ee44 Binary files /dev/null and b/server/model_full/Resources_203/io/data/.minio.sys/tmp/097e35c2-610c-4d66-bfeb-81c1dec2941c differ diff --git a/server/model_full/Resources_203/io/minio-server.bat b/server/model_full/Resources_203/io/minio-server.bat new file mode 100644 index 0000000..cd54bf5 --- /dev/null +++ b/server/model_full/Resources_203/io/minio-server.bat @@ -0,0 +1,35 @@ +@echo off +chcp 65001 >nul +title MinIO Quick Start + +set MINIO_EXE=minio.exe +set DATA_DIR=./data +set CONSOLE_PORT=9001 + +:: 检查minio.exe是否存在 +if not exist "%MINIO_EXE%" ( + echo Error: %MINIO_EXE% 不存在! + pause + exit /b 1 +) + +:: 设置MinIO凭据 +:: set MINIO_ROOT_USER=minio_FEaTQx +:: set MINIO_ROOT_PASSWORD=minio_34KYwR + +:: 检查数据目录是否存在,不存在则创建 +if not exist "%DATA_DIR%" ( + mkdir "%DATA_DIR%" +) + + +if exist "%MINIO_EXE%" ( + echo Starting MinIO server... + start "Scenario Server" cmd /k "%MINIO_EXE% server ^"%DATA_DIR%^" --console-address ^":%CONSOLE_PORT%^"" +) + +echo MinIO: +echo - MinIO API (Port: 9000) +echo - MinIO Web (Port: 9001) + +pause \ No newline at end of file diff --git a/server/model_full/Resources_203/model-console.exe b/server/model_full/Resources_203/model-console.exe new file mode 100644 index 0000000..caa6075 Binary files /dev/null and b/server/model_full/Resources_203/model-console.exe differ diff --git a/server/model_full/Resources_203/model-x64.exe b/server/model_full/Resources_203/model-x64.exe new file mode 100644 index 0000000..d36c469 Binary files /dev/null and b/server/model_full/Resources_203/model-x64.exe differ diff --git a/server/model_full/Resources_203/model-x86.exe b/server/model_full/Resources_203/model-x86.exe new file mode 100644 index 0000000..3de2b18 Binary files /dev/null and b/server/model_full/Resources_203/model-x86.exe differ diff --git a/server/model_full/Resources_203/model.exe b/server/model_full/Resources_203/model.exe new file mode 100644 index 0000000..9ada27f Binary files /dev/null and b/server/model_full/Resources_203/model.exe differ diff --git a/server/model_full/Resources_203/patch.exe b/server/model_full/Resources_203/patch.exe new file mode 100644 index 0000000..7766dab Binary files /dev/null and b/server/model_full/Resources_203/patch.exe differ diff --git a/server/model_full/Resources_203/web/conf/model-windows.conf b/server/model_full/Resources_203/web/conf/model-windows.conf new file mode 100644 index 0000000..86f58b5 --- /dev/null +++ b/server/model_full/Resources_203/web/conf/model-windows.conf @@ -0,0 +1,48 @@ +server { + listen 18680; + server_name _; + # gzip config + 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:28680/; + 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; + } + } +} diff --git a/server/model_full/Resources_203/web/conf/web.conf b/server/model_full/Resources_203/web/conf/web.conf new file mode 100644 index 0000000..4341e50 --- /dev/null +++ b/server/model_full/Resources_203/web/conf/web.conf @@ -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 model-windows.conf; +} diff --git a/server/model_full/Resources_783/icon.ico b/server/model_full/Resources_783/icon.ico new file mode 100644 index 0000000..b9bdeb7 Binary files /dev/null and b/server/model_full/Resources_783/icon.ico differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/buckets/.bloomcycle.bin/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/buckets/.bloomcycle.bin/xl.meta new file mode 100644 index 0000000..e424425 Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/buckets/.bloomcycle.bin/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/buckets/.usage-cache.bin.bkp/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/buckets/.usage-cache.bin.bkp/xl.meta new file mode 100644 index 0000000..7d9f2b1 Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/buckets/.usage-cache.bin.bkp/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/buckets/.usage-cache.bin/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/buckets/.usage-cache.bin/xl.meta new file mode 100644 index 0000000..4e96d3d Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/buckets/.usage-cache.bin/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/buckets/.usage.json/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/buckets/.usage.json/xl.meta new file mode 100644 index 0000000..8affa2b Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/buckets/.usage.json/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/buckets/dev/.metadata.bin/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/buckets/dev/.metadata.bin/xl.meta new file mode 100644 index 0000000..dc5e308 Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/buckets/dev/.metadata.bin/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/buckets/dev/.usage-cache.bin.bkp/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/buckets/dev/.usage-cache.bin.bkp/xl.meta new file mode 100644 index 0000000..2bcf1e2 Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/buckets/dev/.usage-cache.bin.bkp/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/buckets/dev/.usage-cache.bin/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/buckets/dev/.usage-cache.bin/xl.meta new file mode 100644 index 0000000..30f7588 Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/buckets/dev/.usage-cache.bin/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/buckets/log/.usage-cache.bin.bkp/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/buckets/log/.usage-cache.bin.bkp/xl.meta new file mode 100644 index 0000000..5ea74e7 Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/buckets/log/.usage-cache.bin.bkp/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/buckets/log/.usage-cache.bin/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/buckets/log/.usage-cache.bin/xl.meta new file mode 100644 index 0000000..e8694e4 Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/buckets/log/.usage-cache.bin/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/config/config.json/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/config/config.json/xl.meta new file mode 100644 index 0000000..a3663db Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/config/config.json/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/config/iam/format.json/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/config/iam/format.json/xl.meta new file mode 100644 index 0000000..8b362e0 Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/config/iam/format.json/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/config/iam/service-accounts/V8UDKIII9ynU6MPGteUZ/identity.json/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/config/iam/service-accounts/V8UDKIII9ynU6MPGteUZ/identity.json/xl.meta new file mode 100644 index 0000000..71b870b Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/config/iam/service-accounts/V8UDKIII9ynU6MPGteUZ/identity.json/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/config/iam/sts/G680P189S3N429MKFIGR/identity.json/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/config/iam/sts/G680P189S3N429MKFIGR/identity.json/xl.meta new file mode 100644 index 0000000..de89915 Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/config/iam/sts/G680P189S3N429MKFIGR/identity.json/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/config/iam/sts/MGNJS0JU5DYVAMNM0BXD/identity.json/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/config/iam/sts/MGNJS0JU5DYVAMNM0BXD/identity.json/xl.meta new file mode 100644 index 0000000..b8773fc Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/config/iam/sts/MGNJS0JU5DYVAMNM0BXD/identity.json/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/config/iam/sts/NAQQXCG2KYH500ON0KTK/identity.json/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/config/iam/sts/NAQQXCG2KYH500ON0KTK/identity.json/xl.meta new file mode 100644 index 0000000..ac0b374 Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/config/iam/sts/NAQQXCG2KYH500ON0KTK/identity.json/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/config/iam/sts/W85Y521PI7DYKDD79PN5/identity.json/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/config/iam/sts/W85Y521PI7DYKDD79PN5/identity.json/xl.meta new file mode 100644 index 0000000..cfdb03a Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/config/iam/sts/W85Y521PI7DYKDD79PN5/identity.json/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/format.json b/server/model_full/Resources_783/io/data/.minio.sys/format.json new file mode 100644 index 0000000..71b0382 --- /dev/null +++ b/server/model_full/Resources_783/io/data/.minio.sys/format.json @@ -0,0 +1 @@ +{"version":"1","format":"xl-single","id":"336b01aa-5890-4b41-a360-4cc54cf00592","xl":{"version":"3","this":"20dd394e-1e16-4f61-81f7-e40bbe4768a0","sets":[["20dd394e-1e16-4f61-81f7-e40bbe4768a0"]],"distributionAlgo":"SIPMOD+PARITY"}} \ No newline at end of file diff --git a/server/model_full/Resources_783/io/data/.minio.sys/pool.bin/xl.meta b/server/model_full/Resources_783/io/data/.minio.sys/pool.bin/xl.meta new file mode 100644 index 0000000..e32b202 Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/pool.bin/xl.meta differ diff --git a/server/model_full/Resources_783/io/data/.minio.sys/tmp/097e35c2-610c-4d66-bfeb-81c1dec2941c b/server/model_full/Resources_783/io/data/.minio.sys/tmp/097e35c2-610c-4d66-bfeb-81c1dec2941c new file mode 100644 index 0000000..e36ee44 Binary files /dev/null and b/server/model_full/Resources_783/io/data/.minio.sys/tmp/097e35c2-610c-4d66-bfeb-81c1dec2941c differ diff --git a/server/model_full/Resources_783/io/minio-server.bat b/server/model_full/Resources_783/io/minio-server.bat new file mode 100644 index 0000000..cd54bf5 --- /dev/null +++ b/server/model_full/Resources_783/io/minio-server.bat @@ -0,0 +1,35 @@ +@echo off +chcp 65001 >nul +title MinIO Quick Start + +set MINIO_EXE=minio.exe +set DATA_DIR=./data +set CONSOLE_PORT=9001 + +:: 检查minio.exe是否存在 +if not exist "%MINIO_EXE%" ( + echo Error: %MINIO_EXE% 不存在! + pause + exit /b 1 +) + +:: 设置MinIO凭据 +:: set MINIO_ROOT_USER=minio_FEaTQx +:: set MINIO_ROOT_PASSWORD=minio_34KYwR + +:: 检查数据目录是否存在,不存在则创建 +if not exist "%DATA_DIR%" ( + mkdir "%DATA_DIR%" +) + + +if exist "%MINIO_EXE%" ( + echo Starting MinIO server... + start "Scenario Server" cmd /k "%MINIO_EXE% server ^"%DATA_DIR%^" --console-address ^":%CONSOLE_PORT%^"" +) + +echo MinIO: +echo - MinIO API (Port: 9000) +echo - MinIO Web (Port: 9001) + +pause \ No newline at end of file diff --git a/server/model_full/Resources_783/model-console.exe b/server/model_full/Resources_783/model-console.exe new file mode 100644 index 0000000..caa6075 Binary files /dev/null and b/server/model_full/Resources_783/model-console.exe differ diff --git a/server/model_full/Resources_783/model-x64.exe b/server/model_full/Resources_783/model-x64.exe new file mode 100644 index 0000000..d36c469 Binary files /dev/null and b/server/model_full/Resources_783/model-x64.exe differ diff --git a/server/model_full/Resources_783/model-x86.exe b/server/model_full/Resources_783/model-x86.exe new file mode 100644 index 0000000..3de2b18 Binary files /dev/null and b/server/model_full/Resources_783/model-x86.exe differ diff --git a/server/model_full/Resources_783/model.exe b/server/model_full/Resources_783/model.exe new file mode 100644 index 0000000..9ada27f Binary files /dev/null and b/server/model_full/Resources_783/model.exe differ diff --git a/server/model_full/Resources_783/patch.exe b/server/model_full/Resources_783/patch.exe new file mode 100644 index 0000000..7766dab Binary files /dev/null and b/server/model_full/Resources_783/patch.exe differ diff --git a/server/model_full/Resources_783/web/conf/model-windows.conf b/server/model_full/Resources_783/web/conf/model-windows.conf new file mode 100644 index 0000000..86f58b5 --- /dev/null +++ b/server/model_full/Resources_783/web/conf/model-windows.conf @@ -0,0 +1,48 @@ +server { + listen 18680; + server_name _; + # gzip config + 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:28680/; + 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; + } + } +} diff --git a/server/model_full/Resources_783/web/conf/web.conf b/server/model_full/Resources_783/web/conf/web.conf new file mode 100644 index 0000000..4341e50 --- /dev/null +++ b/server/model_full/Resources_783/web/conf/web.conf @@ -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 model-windows.conf; +} diff --git a/server/model_full/install-win10-203-model.iss b/server/model_full/install-win10-203-model.iss new file mode 100644 index 0000000..9f1996b --- /dev/null +++ b/server/model_full/install-win10-203-model.iss @@ -0,0 +1,371 @@ +;iss + +; 构建时间:2025-8-18 10:28:45 +#define MyAppName "模型管理" +#define MyAppVersion "v1.0.19" +#define MyAppPublisher "X" +#define MyAppURL "~" +#define MyAppExeName "model" +#define MyAppExeNameHump "Model" +#define MyAppExeNameUpper "MODEL" +#define MyAppAssocName MyAppName + " File" +#define MyAppAssocExt ".myp" +#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt +#define MyAppFirstPath "XManage" +#define MyAppResources "Resources_203" +#define InstallPassword GetDateTimeString('yyyymmdd', '', '') + + +; 默认配置 +[Setup] +AppId={{7C6B5A4D-3E2F-1G0H-9I8J-7K6L5M4N3O2P} +; 默认安装路径 +DefaultDirName={autopf}\{#MyAppFirstPath} +; 安装密码 +Password={#InstallPassword} +; 是否加密 +Encryption=yes +; ICO图标 +SetupIconFile={#MyAppResources}\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}.exe + + + +; 语言选择 +[Languages] +Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl" + + + +;; 任务 +[Tasks] +; 是否创建桌面图标 +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + + + +;; 程序 ICO +[Icons] +Name: "{autoprograms}\{#MyAppFirstPath}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}\{#MyAppExeName}.exe" +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}\{#MyAppExeName}.exe"; 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: MySQL/BIN; Description: MySQL数据库; Types: full; Flags: checkablealone +Name: MySQL/DATA; Description: {#MyAppName} Data; Types: full; + +Name: USR; Description: 运行时环境; Types: full mini; Flags: checkablealone +Name: JDK21; Description: JDK 21 运行时环境; Types: full; Flags: checkablealone +;Name: Redis; Description: 缓存; Types: full; Flags: checkablealone +Name: IO; Description: 文件资源服务; Types: full; Flags: checkablealone + + + +;; 安装包引入文件列表 +[Files] +; 后端工程+启动器 +Source: "{#MyAppResources}\{#MyAppExeName}.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter; +Source: "{#MyAppResources}\{#MyAppExeName}-console.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter; +Source: "{#MyAppResources}\{#MyAppExeName}-x64.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter; +Source: "{#MyAppResources}\{#MyAppExeName}-x86.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter; +Source: "{#MyAppResources}\patch.exe"; DestDir: "{app}\{#MyAppExeName}"; DestName: "patch.exe"; Flags: ignoreversion; Components: Starter; + +;Windows 10 环境,不提供 bat 启动 +;Source: "{#MyAppResources}\{#MyAppExeName}.bat"; DestDir: "{app}\{#MyAppExeName}"; DestName: "{#MyAppExeName}.bat"; Flags: ignoreversion; Components: Starter; +Source: "{#MyAppResources}\server\demo-0.0.1.jar"; DestDir: "{app}\{#MyAppExeName}\bin"; Flags: ignoreversion; Components: Server; + +; 更新数据库脚本 +Source: "{#MyAppResources}\script\*"; DestDir: "{app}\{#MyAppExeName}\script"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: Server; + +; 前端工程 + Nginx +Source: "{#MyAppResources}\web\*"; DestDir: "{app}\{#MyAppExeName}\web"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: Starter; +Source: "{#MyAppResources}\dist\*"; DestDir: "{app}\{#MyAppExeName}\web\dist"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: UI; + +; Linux 命令集(通用服务) +Source: "{#MyAppResources}\usr\*"; DestDir: "{app}\usr\"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: USR; + +; 后端启动 JDK 依赖(通用服务) +Source: "{#MyAppResources}\java\*"; DestDir: "{app}\jre"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: JDK21; + +; 数据库依赖 +Source: "{#MyAppResources}\database\ProgramData\*"; DestDir: "{commonappdata}\MySQL"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: MySQL/DATA; +Source: "{#MyAppResources}\database\ProgramFiles\*"; DestDir: "{pf}\MySQL"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: MySQL/BIN; + +; MinIO 服务(通用服务) +Source: "{#MyAppResources}\io\*"; DestDir: "{app}\io"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: IO; + + + +;; 创建必要目录 +[Dirs] +Name: "{app}\{#MyAppExeName}\web\logs"; Permissions: users-modify; Components: Starter; +Name: "{app}\{#MyAppExeName}\web\temp"; Permissions: users-modify; Components: Starter; + + + +;; 安装时注册表与环境变量列表 +[Registry] +; 默认注册信息 +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName}\{#MyAppExeName}.exe,0" +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}\{#MyAppExeName}.exe"" ""%1""" + + + +; 配置JDK环境变量(通用服务) +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: JDK21; \ + ValueName: "JDK_21"; ValueData: "{app}\jre"; + + + +;; MinIO环境变量(通用服务) +;Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: IO; \ + ValueName: "X_MIO"; ValueData: "{app}\io"; + + + +;; Linux(通用服务) +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: USR; \ + ValueName: "X_COMMAND"; ValueData: "{app}\usr"; +; 追加到 PATH 变量 +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Flags: preservestringtype; Components: USR; AfterInstall: RefreshEnvironment; \ + ValueName: "Path"; ValueData: "{olddata};%X_COMMAND%"; Check: NeedsAddPath('%X_COMMAND%'); + + + +;; MySQL环境变量(注册服务使用) +; 可能存在多个服务打通,MySQL环境变量由此变为 X +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: MySQL/BIN; \ + ValueName: "X_MANAGE_DB_SC"; ValueData: "x_database"; +; 这两个值,将作为后续判断程序是否已经安装做依据 +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: MySQL/BIN; \ + ValueName: "X_MANAGE_DB_EXE"; ValueData: "{pf}\MySQL\MySQL Server 8.4.5\bin\mysqld.exe"; +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: MySQL/BIN; \ + ValueName: "X_MANAGE_DB_COF"; ValueData: "{commonappdata}\MySQL\MySQL Server 8.4\my.ini"; + +;; MySQL(通用服务),导入脚本数据使用 +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: MySQL/BIN; \ + ValueName: "X_COMMAND_MYSQL"; ValueData: "{pf}\MySQL\MySQL Server 8.4.5"; +; 追加到 PATH 变量 +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Flags: preservestringtype; Components: MySQL/BIN; AfterInstall: RefreshEnvironment; \ + ValueName: "Path"; ValueData: "{olddata};%X_COMMAND_MYSQL%\bin"; Check: NeedsAddPath('%X_COMMAND_MYSQL%\bin'); + + + +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \ + ValueName: "{#MyAppExeNameUpper}_MAIN"; ValueData: "{app}\{#MyAppExeName}"; + +;; springboot启动变量(启动程序使用) +; 可能存在多个服务打通,变量由lib变为服务名 +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: Server; \ + ValueName: "{#MyAppExeNameUpper}_MANAGE_BIN"; ValueData: "{app}\{#MyAppExeName}\bin\demo-0.0.1.jar"; +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: Server; \ + ValueName: "{#MyAppExeNameUpper}_MANAGE_DB_SERVER"; ValueData: "127.0.0.1"; +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: Server; \ + ValueName: "{#MyAppExeNameUpper}_MANAGE_DB_PORT"; ValueData: "33306"; +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: Server; \ + ValueName: "{#MyAppExeNameUpper}_VM_PARAMS"; ValueData: " \ + --enable-preview \ + -Dserver.port=28680 \ + -Dproject.database-name=model \ + "; + + + + +;; 安装完运行的菜单与后续操作 +; [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 GetInstallPassword(): string; +begin + Result := GetDateTimeString('yyyymmdd', '', ''); +end; + + +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 + + +;; 卸载时删除的文件 +[UninstallDelete] +Type: filesandordirs; Name: "{app}\{#MyAppExeName}\log" +Type: filesandordirs; Name: "{app}\{#MyAppExeName}\script" diff --git a/server/model_full/install-win10-783-model.iss b/server/model_full/install-win10-783-model.iss new file mode 100644 index 0000000..42001ed --- /dev/null +++ b/server/model_full/install-win10-783-model.iss @@ -0,0 +1,379 @@ +;iss + +; 构建时间:2025-8-18 14:13:19 +#define MyAppName "模型管理" +#define MyAppVersion "v1.0.19" +#define MyAppPublisher "X" +#define MyAppURL "~" +#define MyAppExeName "model" +#define MyAppExeNameHump "Model" +#define MyAppExeNameUpper "MODEL" +#define MyAppAssocName MyAppName + " File" +#define MyAppAssocExt ".myp" +#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt +#define MyAppFirstPath "XManage" +#define MyAppResources "Resources_783" +#define InstallPassword GetDateTimeString('yyyymmdd', '', '') + + +; 默认配置 +[Setup] +AppId={{7C6B5A4D-3E2F-1G0H-9I8J-7K6L5M4N3O2P} +; 默认安装路径 +DefaultDirName={autopf}\{#MyAppFirstPath} +; 安装密码 +Password={#InstallPassword} +; 是否加密 +Encryption=yes +; ICO图标 +SetupIconFile={#MyAppResources}\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}-783 +UninstallFilesDir={app}\{#MyAppExeName} +UninstallDisplayIcon={app}\{#MyAppExeName}\{#MyAppExeName}.exe + + + +; 语言选择 +[Languages] +Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl" + + + +;; 任务 +[Tasks] +; 是否创建桌面图标 +; checkablealone 默认选中 +; unchecked 默认不选中 +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone + + + +;; 程序 ICO +[Icons] +; ====================== ========================================================= 此处使用 console 显式console启动 +Name: "{autoprograms}\{#MyAppFirstPath}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}\{#MyAppExeName}-console.exe" +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}\{#MyAppExeName}-console.exe"; 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: MySQL_BIN; Description: MySQL数据库; Types: full; Flags: checkablealone +Name: MySQL_DATA; Description: {#MyAppName} Data; Types: full; + +Name: USR; Description: 运行时环境; Types: full mini; Flags: checkablealone +Name: JDK21; Description: JDK 21 运行时环境; Types: full; Flags: checkablealone +;Name: Redis; Description: 缓存; Types: full; Flags: checkablealone +Name: IO; Description: 文件资源服务; Types: full; Flags: checkablealone + + + +;; 安装包引入文件列表 +[Files] +; 后端工程+启动器 +Source: "{#MyAppResources}\{#MyAppExeName}.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter; +Source: "{#MyAppResources}\{#MyAppExeName}-console.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter; +Source: "{#MyAppResources}\{#MyAppExeName}-x64.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter; +Source: "{#MyAppResources}\{#MyAppExeName}-x86.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter; +Source: "{#MyAppResources}\patch.exe"; DestDir: "{app}\{#MyAppExeName}"; DestName: "patch.exe"; Flags: ignoreversion; Components: Starter; + +;Windows 10 环境,不提供 bat 启动 +;Source: "{#MyAppResources}\{#MyAppExeName}.bat"; DestDir: "{app}\{#MyAppExeName}"; DestName: "{#MyAppExeName}.bat"; Flags: ignoreversion; Components: Starter; +Source: "{#MyAppResources}\server\demo-0.0.1.jar"; DestDir: "{app}\{#MyAppExeName}\bin"; Flags: ignoreversion; Components: Server; + +; 更新数据库脚本 +Source: "{#MyAppResources}\script\*"; DestDir: "{app}\{#MyAppExeName}\script"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: Server; + +; 前端工程 + Nginx +Source: "{#MyAppResources}\web\*"; DestDir: "{app}\{#MyAppExeName}\web"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: Starter; +Source: "{#MyAppResources}\dist\*"; DestDir: "{app}\{#MyAppExeName}\web\dist"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: UI; + +; Linux 命令集(通用服务) +Source: "{#MyAppResources}\usr\*"; DestDir: "{app}\usr\"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: USR; + +; 后端启动 JDK 依赖(通用服务) +Source: "{#MyAppResources}\java\*"; DestDir: "{app}\jre"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: JDK21; + +; 数据库依赖 +Source: "{#MyAppResources}\database\ProgramData\*"; DestDir: "{commonappdata}\MySQL"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: MySQL_DATA; +Source: "{#MyAppResources}\database\ProgramFiles\*"; DestDir: "{pf}\MySQL"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: MySQL_BIN; + +; MinIO 服务(通用服务) +Source: "{#MyAppResources}\io\*"; DestDir: "{app}\io"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: IO; + + + +;; 创建必要目录 +[Dirs] +Name: "{app}\{#MyAppExeName}\web\logs"; Permissions: users-modify; Components: Starter; +Name: "{app}\{#MyAppExeName}\web\temp"; Permissions: users-modify; Components: Starter; + + + +;; 安装时注册表与环境变量列表 +[Registry] +; 默认注册信息 +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName}\{#MyAppExeName}.exe,0" +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}\{#MyAppExeName}.exe"" ""%1""" + + + +; 配置JDK环境变量(通用服务) +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: JDK21; \ + ValueName: "JDK_21"; ValueData: "{app}\jre"; + + + +;; MinIO环境变量(通用服务) +;Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: IO; \ + ValueName: "X_MIO"; ValueData: "{app}\io"; + + + +;; Linux(通用服务) +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: USR; \ + ValueName: "X_COMMAND"; ValueData: "{app}\usr"; +; 追加到 PATH 变量 +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Flags: preservestringtype; Components: USR; AfterInstall: RefreshEnvironment; \ + ValueName: "Path"; ValueData: "{olddata};%X_COMMAND%"; Check: NeedsAddPath('%X_COMMAND%'); + + + +;; MySQL环境变量(注册服务使用) +; 可能存在多个服务打通,MySQL环境变量由此变为 X +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: MySQL_BIN; \ + ValueName: "X_MANAGE_DB_SC"; ValueData: "x_database"; +; 这两个值,将作为后续判断程序是否已经安装做依据 +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: MySQL_BIN; \ + ValueName: "X_MANAGE_DB_EXE"; ValueData: "{pf}\MySQL\MySQL Server 8.4.5\bin\mysqld.exe"; +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: MySQL_BIN; \ + ValueName: "X_MANAGE_DB_COF"; ValueData: "{commonappdata}\MySQL\MySQL Server 8.4\my.ini"; + +;; MySQL(通用服务),导入脚本数据使用 +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: MySQL_BIN; \ + ValueName: "X_COMMAND_MYSQL"; ValueData: "{pf}\MySQL\MySQL Server 8.4.5"; +; 追加到 PATH 变量 +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Flags: preservestringtype; Components: MySQL_BIN; AfterInstall: RefreshEnvironment; \ + ValueName: "Path"; ValueData: "{olddata};%X_COMMAND_MYSQL%\bin"; Check: NeedsAddPath('%X_COMMAND_MYSQL%\bin'); + + + +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \ + ValueName: "{#MyAppExeNameUpper}_MAIN"; ValueData: "{app}\{#MyAppExeName}"; + +;; springboot启动变量(启动程序使用) +; 可能存在多个服务打通,变量由lib变为服务名 +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: Server; \ + ValueName: "{#MyAppExeNameUpper}_MANAGE_BIN"; ValueData: "{app}\{#MyAppExeName}\bin\demo-0.0.1.jar"; +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: Server; \ + ValueName: "{#MyAppExeNameUpper}_MANAGE_DB_SERVER"; ValueData: "127.0.0.1"; +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: Server; \ + ValueName: "{#MyAppExeNameUpper}_MANAGE_DB_PORT"; ValueData: "33306"; +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; Components: Server; \ + ValueName: "{#MyAppExeNameUpper}_VM_PARAMS"; ValueData: " \ + --enable-preview \ + -Dserver.port=28680 \ + -Dproject.database-name=model \ + "; + + + + +;; 安装完运行的菜单与后续操作 +; [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 GetInstallPassword(): string; +begin + Result := GetDateTimeString('yyyymmdd', '', ''); +end; + + +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 +Filename: "taskkill"; Parameters: "-f -im {#MyAppExeName}-console.exe"; Flags: runascurrentuser runhidden waituntilterminated +Filename: "taskkill"; Parameters: "-f -im {#MyAppExeName}-x86.exe"; Flags: runascurrentuser runhidden waituntilterminated +Filename: "taskkill"; Parameters: "-f -im {#MyAppExeName}-x64.exe"; Flags: runascurrentuser runhidden waituntilterminated +Filename: "taskkill"; Parameters: "-f -im {#MyAppExeName}.exe"; Flags: runascurrentuser runhidden waituntilterminated + + +;; 卸载时删除的文件 +[UninstallDelete] +Type: filesandordirs; Name: "{app}\{#MyAppExeName}\log" +Type: filesandordirs; Name: "{app}\{#MyAppExeName}\script" +Type: filesandordirs; Name: "{app}\{#MyAppExeName}\patch" diff --git a/server/model_full/resources-initialize.bat b/server/model_full/resources-initialize.bat new file mode 100644 index 0000000..fe31df6 --- /dev/null +++ b/server/model_full/resources-initialize.bat @@ -0,0 +1,25 @@ +@echo off +setlocal enabledelayedexpansion +chcp 65001 >nul +title Initialization + +set "BASE_PATH=Resources/" + +echo [INFO] 正在创建 【模型】 初始化构建安装包目录结构 +for %%f in ( + "database" + "dist" + "io" + "java" + "script/model" + "server" + "usr" + "web" +) do ( + echo [INFO] 创建: %%~f + mkdir "%BASE_PATH%/%%~f" + echo. +) + +pause +endlocal \ No newline at end of file