Compare commits
8 Commits
6a71e9188f
...
8e466e7d4f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8e466e7d4f | ||
![]() |
a439414753 | ||
![]() |
a351db0861 | ||
![]() |
bb506fa031 | ||
![]() |
f2323d6be3 | ||
![]() |
a9ec6c2a52 | ||
![]() |
56bb7ba222 | ||
![]() |
15c3cbc4f0 |
@ -1,7 +1,7 @@
|
|||||||
;iss
|
;iss
|
||||||
|
|
||||||
#define MyAppName "基础环境"
|
#define MyAppName "基础环境"
|
||||||
#define MyAppVersion "1.0.0"
|
#define MyAppVersion "1.0.1"
|
||||||
#define MyAppPublisher "X"
|
#define MyAppPublisher "X"
|
||||||
#define MyAppURL "~"
|
#define MyAppURL "~"
|
||||||
#define MyAppExeName "command"
|
#define MyAppExeName "command"
|
||||||
@ -18,7 +18,7 @@
|
|||||||
; 默认配置
|
; 默认配置
|
||||||
[Setup]
|
[Setup]
|
||||||
; 不得复用,每个应用必须有唯一AppId
|
; 不得复用,每个应用必须有唯一AppId
|
||||||
AppId={{517C2278-C7C9-43D0-8E94-BFD2039C7BB8}
|
AppId={{517C2278-C7C9-43D0-8E94-BFD2039C1690}
|
||||||
; 默认安装路径
|
; 默认安装路径
|
||||||
DefaultDirName={autopf}\{#MyAppFirstPath}
|
DefaultDirName={autopf}\{#MyAppFirstPath}
|
||||||
; 是否加密
|
; 是否加密
|
||||||
@ -88,12 +88,12 @@ Name: "custom"; Description: "自定义组件安装"; Flags: iscustom;
|
|||||||
[Components]
|
[Components]
|
||||||
;; ============================================== 自定义组件的 Types 可以不参与任何固定式 ==============================================
|
;; ============================================== 自定义组件的 Types 可以不参与任何固定式 ==============================================
|
||||||
Name: "MainApp"; Description: "{#MyAppName}主程序"; Types: full mini; Flags: checkablealone;
|
Name: "MainApp"; Description: "{#MyAppName}主程序"; Types: full mini; Flags: checkablealone;
|
||||||
Name: "JDK"; Description: "JDK程序"; Types: full; Flags: checkablealone;
|
Name: "JDK"; Description: "JDK"; Types: full; Flags: checkablealone;
|
||||||
Name: "Redis"; Description: "Redis程序"; Types: full; Flags: checkablealone;
|
Name: "Redis"; Description: "Redis"; Types: full; Flags: checkablealone;
|
||||||
Name: "MinIO"; Description: "MinIO程序"; Types: full; Flags: checkablealone;
|
Name: "MinIO"; Description: "MinIO"; Types: full; Flags: checkablealone;
|
||||||
Name: "RocketMQ"; Description: "RocketMQ程序"; Types: full; Flags: checkablealone;
|
Name: "RocketMQ"; Description: "RocketMQ"; Types: full; Flags: checkablealone;
|
||||||
Name: "Nginx"; Description: "Nginx程序"; Types: full; Flags: checkablealone;
|
Name: "Nginx"; Description: "Nginx"; Types: full; Flags: checkablealone;
|
||||||
Name: "MySQL"; Description: "MySQL程序"; Types: full; Flags: checkablealone;
|
Name: "MySQL"; Description: "MySQL"; Types: full; Flags: checkablealone;
|
||||||
|
|
||||||
|
|
||||||
;; 引入文件列表
|
;; 引入文件列表
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
;iss
|
;iss
|
||||||
|
|
||||||
#define MyAppName "基础环境"
|
#define MyAppName "基础环境"
|
||||||
#define MyAppVersion "1.0.0"
|
#define MyAppVersion "1.0.1"
|
||||||
#define MyAppPublisher "X"
|
#define MyAppPublisher "X"
|
||||||
#define MyAppURL "~"
|
#define MyAppURL "~"
|
||||||
#define MyAppExeName "command"
|
#define MyAppExeName "command"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
;iss
|
;iss
|
||||||
|
|
||||||
#define MyAppName "效能评估"
|
#define MyAppName "效能评估"
|
||||||
#define MyAppVersion "1.0.0"
|
#define MyAppVersion "1.0.1"
|
||||||
#define MyAppPublisher "X"
|
#define MyAppPublisher "X"
|
||||||
#define MyAppURL "~"
|
#define MyAppURL "~"
|
||||||
#define MyAppExeName "eval"
|
#define MyAppExeName "eval"
|
||||||
@ -101,24 +101,24 @@ Name: Data; Description: {#MyAppName} Data; Types: full;
|
|||||||
;; 安装包引入文件列表
|
;; 安装包引入文件列表
|
||||||
[Files]
|
[Files]
|
||||||
; 后端工程+启动器
|
; 后端工程+启动器
|
||||||
;Source: "Resources\{#MyAppExeName}.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
;Source: "{#MyAppResources}\{#MyAppExeName}.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
||||||
;Source: "Resources\{#MyAppExeName}-console.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
;Source: "{#MyAppResources}\{#MyAppExeName}-console.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
||||||
;Source: "Resources\{#MyAppExeName}-x64.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
;Source: "{#MyAppResources}\{#MyAppExeName}-x64.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
||||||
;Source: "Resources\{#MyAppExeName}-x86.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
;Source: "{#MyAppResources}\{#MyAppExeName}-x86.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
||||||
;Source: "Resources\patch.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
;Source: "{#MyAppResources}\patch.exe"; DestDir: "{app}\{#MyAppExeName}"; Flags: ignoreversion; Components: Starter
|
||||||
|
|
||||||
Source: "Resources\{#MyAppExeName}.bat"; DestDir: "{app}\{#MyAppExeName}"; DestName: "{#MyAppExeName}.bat"; Flags: ignoreversion; Components: Starter
|
Source: "{#MyAppResources}\{#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: "{#MyAppResources}\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: "{#MyAppResources}\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: "{#MyAppResources}\fonts\*"; DestDir: "{app}\eval\fonts"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: Server
|
||||||
|
|
||||||
; 更新数据库脚本
|
; 更新数据库脚本
|
||||||
Source: "Resources\script\*"; DestDir: "{app}\{#MyAppExeName}\script"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: Data
|
Source: "{#MyAppResources}\script\*"; DestDir: "{app}\{#MyAppExeName}\script"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: Data
|
||||||
|
|
||||||
; 前端工程 + Nginx
|
; 前端工程 + Nginx
|
||||||
Source: "Resources\web\*"; DestDir: "{app}\{#MyAppExeName}\web"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: Starter;
|
Source: "{#MyAppResources}\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;
|
Source: "{#MyAppResources}\dist\*"; DestDir: "{app}\{#MyAppExeName}\web\dist"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: UI;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
;iss
|
;iss
|
||||||
|
|
||||||
#define MyAppName "模型管理"
|
#define MyAppName "模型管理"
|
||||||
#define MyAppVersion "1.0.0"
|
#define MyAppVersion "1.0.1"
|
||||||
#define MyAppPublisher "X"
|
#define MyAppPublisher "X"
|
||||||
#define MyAppURL "~"
|
#define MyAppURL "~"
|
||||||
#define MyAppExeName "model"
|
#define MyAppExeName "model"
|
||||||
|
@ -15,14 +15,14 @@ Import-Module ps2exe -ErrorAction Stop
|
|||||||
$PS1_NAME = "startup"
|
$PS1_NAME = "startup"
|
||||||
$APPLICATION_NAME = "model"
|
$APPLICATION_NAME = "model"
|
||||||
$APPLICATION_VERSION = "1.0.0"
|
$APPLICATION_VERSION = "1.0.0"
|
||||||
$COPY_RIGHT = "© 2025"
|
$COPY_RIGHT = "2025"
|
||||||
|
|
||||||
# 基本启动,无 console,可配置开机自启
|
# 基本启动,无 console,可配置开机自启
|
||||||
Invoke-PS2EXE -InputFile "${PS1_NAME}.ps1" -OutputFile "${APPLICATION_NAME}.exe" -version "${APPLICATION_VERSION}" -copyright "${COPY_RIGHT}" -requireAdmin -ErrorAction Stop
|
Invoke-PS2EXE -InputFile "${PS1_NAME}.ps1" -OutputFile "${APPLICATION_NAME}.exe" -IconFile "icon.ico" -version "${APPLICATION_VERSION}" -copyright "${COPY_RIGHT}" -requireAdmin -ErrorAction Stop
|
||||||
# 基本启动,提供 console,用于 debug
|
# 基本启动,提供 console,用于 debug
|
||||||
Invoke-PS2EXE -InputFile "${PS1_NAME}-console.ps1" -OutputFile "${APPLICATION_NAME}-console.exe" -version "${APPLICATION_VERSION}" -copyright "${COPY_RIGHT}" -requireAdmin -ErrorAction Stop
|
Invoke-PS2EXE -InputFile "${PS1_NAME}-console.ps1" -OutputFile "${APPLICATION_NAME}-console.exe" -IconFile "icon.ico" -version "${APPLICATION_VERSION}" -copyright "${COPY_RIGHT}" -requireAdmin -ErrorAction Stop
|
||||||
# 基本启动,两种x
|
# 基本启动,两种x
|
||||||
Invoke-PS2EXE -InputFile "${PS1_NAME}.ps1" -OutputFile "${APPLICATION_NAME}-x86.exe" -version "${APPLICATION_VERSION}" -copyright "${COPY_RIGHT}" -x86 -requireAdmin -ErrorAction Stop
|
Invoke-PS2EXE -InputFile "${PS1_NAME}.ps1" -OutputFile "${APPLICATION_NAME}-x86.exe" -IconFile "icon.ico" -version "${APPLICATION_VERSION}" -copyright "${COPY_RIGHT}" -x86 -requireAdmin -ErrorAction Stop
|
||||||
Invoke-PS2EXE -InputFile "${PS1_NAME}.ps1" -OutputFile "${APPLICATION_NAME}-x64.exe" -version "${APPLICATION_VERSION}" -copyright "${COPY_RIGHT}" -x64 -requireAdmin -ErrorAction Stop
|
Invoke-PS2EXE -InputFile "${PS1_NAME}.ps1" -OutputFile "${APPLICATION_NAME}-x64.exe" -IconFile "icon.ico" -version "${APPLICATION_VERSION}" -copyright "${COPY_RIGHT}" -x64 -requireAdmin -ErrorAction Stop
|
||||||
Write-Host "Complete." -ForegroundColor Green
|
Write-Host "Complete." -ForegroundColor Green
|
||||||
Start-Sleep -Seconds 1
|
Start-Sleep -Seconds 1
|
||||||
|
BIN
server/model_full/Execute/win10_203/icon.ico
Normal file
BIN
server/model_full/Execute/win10_203/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
@ -24,6 +24,7 @@ $SERVER_NAME = $env:X_MANAGE_DB_SC
|
|||||||
# Nginx executable name
|
# Nginx executable name
|
||||||
$NGINX_EXE = "model-web.exe"
|
$NGINX_EXE = "model-web.exe"
|
||||||
|
|
||||||
|
$logFile = "debug.log"
|
||||||
|
|
||||||
# Log recording function
|
# Log recording function
|
||||||
function Write-Log {
|
function Write-Log {
|
||||||
@ -149,7 +150,7 @@ function Import-Script {
|
|||||||
# cmd /c rar a -pPassword -hp "target.rar" "file"
|
# cmd /c rar a -pPassword -hp "target.rar" "file"
|
||||||
# Start-Process -FilePath "rar" -ArgumentList "a -pPassword -hp "target.rar" "file"" -NoNewWindow -Wait
|
# Start-Process -FilePath "rar" -ArgumentList "a -pPassword -hp "target.rar" "file"" -NoNewWindow -Wait
|
||||||
# Start-Process -FilePath "rar" -ArgumentList 'a', '-pPassword', '-hpPassword', 'target.rar', 'file' -NoNewWindow -Wait
|
# Start-Process -FilePath "rar" -ArgumentList 'a', '-pPassword', '-hpPassword', 'target.rar', 'file' -NoNewWindow -Wait
|
||||||
Start-Process -FilePath "rar" -ArgumentList "a -pPassword#20250810! -hp $target\$($random).rar `"$($sqlFile.FullName)`"" -NoNewWindow -Wait
|
Start-Process -FilePath "rar" -ArgumentList "a -pPassword#$($date)! -hp $target\$($random).rar `"$($sqlFile.FullName)`"" -NoNewWindow -Wait
|
||||||
|
|
||||||
# Remove script-file
|
# Remove script-file
|
||||||
if (Test-Path $sqlFile.FullName) {
|
if (Test-Path $sqlFile.FullName) {
|
||||||
@ -470,6 +471,88 @@ End If
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Start-MinIO {
|
||||||
|
|
||||||
|
# 进入 minio 目录下
|
||||||
|
Set-Location "$MAIN_PATH"
|
||||||
|
Set-Location ".."
|
||||||
|
$WORKSPACE_PATH = Get-Location
|
||||||
|
Set-Location "io"
|
||||||
|
|
||||||
|
if($outputWriteHost) {
|
||||||
|
Write-Host "Start Minio ..."
|
||||||
|
}
|
||||||
|
$logMessage = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') - 准备启动 Minio..."
|
||||||
|
Append-Utf8NoBomContent -FilePath $outputLogFile -Content $logMessage
|
||||||
|
|
||||||
|
# 停止现有的 minio 进程
|
||||||
|
Get-Process -Name "minio" -ErrorAction SilentlyContinue | Stop-Process -Force
|
||||||
|
|
||||||
|
# 配置默认启动参数
|
||||||
|
$MINIO_PATH = "minio.exe"
|
||||||
|
if (-not (Test-Path $MINIO_PATH)) {
|
||||||
|
if($outputWriteHost) {
|
||||||
|
Write-Host "Error: Cannot find minio.exe executable file."
|
||||||
|
}
|
||||||
|
pause
|
||||||
|
Go-Home
|
||||||
|
}
|
||||||
|
|
||||||
|
# 配置用户名和密码(可以改为从参数传入)
|
||||||
|
$MINIO_ROOT_USER = "minio_34KYwR" # 默认用户名
|
||||||
|
$MINIO_ROOT_PASSWORD = "minio_FEaTQx" # 默认密码
|
||||||
|
|
||||||
|
if($outputWriteHost) {
|
||||||
|
Write-Host "$MINIO_PATH"
|
||||||
|
}
|
||||||
|
$logMessage = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') - Minio executable file: $MINIO_PATH"
|
||||||
|
Append-Utf8NoBomContent -FilePath $outputLogFile -Content $logMessage
|
||||||
|
|
||||||
|
# Minio 配置参数
|
||||||
|
$MINIO_DATA_DIR = "data" # 数据目录
|
||||||
|
$MINIO_PORT = 9000 # API 端口
|
||||||
|
$MINIO_CONSOLE_PORT = 9001 # 控制台端口
|
||||||
|
|
||||||
|
# 创建以管理员身份运行的 VBS脚本
|
||||||
|
$vbsContent = @"
|
||||||
|
Set UAC = CreateObject("Shell.Application")
|
||||||
|
Set WshShell = CreateObject("WScript.Shell")
|
||||||
|
|
||||||
|
On Error Resume Next
|
||||||
|
Set fso = CreateObject("Scripting.FileSystemObject")
|
||||||
|
Set tempFile = fso.OpenTextFile("%SystemRoot%\System32\config\systemprofile", 1)
|
||||||
|
If Err.Number = 0 Then
|
||||||
|
WshShell.Run "cmd /c set MINIO_ROOT_USER=$MINIO_ROOT_USER && set MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD && $MINIO_PATH server $MINIO_DATA_DIR --console-address :$MINIO_CONSOLE_PORT", 0, False
|
||||||
|
Else
|
||||||
|
UAC.ShellExecute "cmd", "/c set MINIO_ROOT_USER=$MINIO_ROOT_USER && set MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD && $MINIO_PATH server $MINIO_DATA_DIR --console-address :$MINIO_CONSOLE_PORT", "", "runas", 0
|
||||||
|
End If
|
||||||
|
"@
|
||||||
|
|
||||||
|
# 以 ANSI 写入文件 temp.vbs
|
||||||
|
$vbsContent | Out-File -FilePath "$WORKSPACE_PATH\io\temp.vbs" -Encoding ASCII
|
||||||
|
if($outputWriteHost) {
|
||||||
|
Write-Host "Temporary startup script has been created."
|
||||||
|
}
|
||||||
|
|
||||||
|
# 运行 vbs 脚本
|
||||||
|
Start-Process "cscript.exe" -ArgumentList "//nologo temp.vbs"
|
||||||
|
|
||||||
|
# 等待1秒后删除临时文件
|
||||||
|
Start-Sleep -Seconds 1
|
||||||
|
Remove-Item "temp.vbs" -Force
|
||||||
|
|
||||||
|
# 输出访问信息
|
||||||
|
if($outputWriteHost) {
|
||||||
|
Write-Host "Minio:"
|
||||||
|
Write-Host "WEB: http://localhost:$MINIO_CONSOLE_PORT"
|
||||||
|
Write-Host "API: http://localhost:$MINIO_PORT"
|
||||||
|
Write-Host "user: $MINIO_ROOT_USER"
|
||||||
|
Write-Host "pass: $MINIO_ROOT_PASSWORD"
|
||||||
|
}
|
||||||
|
$logMessage = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') - Minio started successfully! Console port: $MINIO-CONSOLE-PORT, API port: $MINIO-PORT, username: $MINIO-COOT_USER"
|
||||||
|
Append-Utf8NoBomContent -FilePath $outputLogFile -Content $logMessage
|
||||||
|
}
|
||||||
|
|
||||||
function Start-SpringBoot {
|
function Start-SpringBoot {
|
||||||
|
|
||||||
# 准备启动后台服务
|
# 准备启动后台服务
|
||||||
@ -484,7 +567,12 @@ function Start-SpringBoot {
|
|||||||
# 指定环境变量 MODEL_MANAGE_DB_SERVER
|
# 指定环境变量 MODEL_MANAGE_DB_SERVER
|
||||||
# 指定环境变量 MODEL_MANAGE_DB_PORT
|
# 指定环境变量 MODEL_MANAGE_DB_PORT
|
||||||
# 追加自定义JVM参数 MODEL_VM_PARAMS
|
# 追加自定义JVM参数 MODEL_VM_PARAMS
|
||||||
$arguments = "-Dspring.profiles.active=dev,mysql -Dmybatis-flex.datasource.ds1.password=Wfbke8!LeMY5Fwwe -Dproject.database-ip=$env:MODEL_MANAGE_DB_SERVER -Dproject.database-port=$env:MODEL_MANAGE_DB_PORT $env:MODEL_VM_PARAMS"
|
$arguments = "-Dspring.profiles.active=dev,mysql" +
|
||||||
|
" -Dmybatis-flex.datasource.ds1.username=model" +
|
||||||
|
" -Dmybatis-flex.datasource.ds1.password=Wfbke8!LeMY5Fwwe" +
|
||||||
|
" -Dproject.database-ip=$env:MODEL_MANAGE_DB_SERVER" +
|
||||||
|
" -Dproject.database-port=$env:MODEL_MANAGE_DB_PORT" +
|
||||||
|
" $env:MODEL_VM_PARAMS "
|
||||||
$logMessage = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') - 启动JVM参数: $arguments"
|
$logMessage = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') - 启动JVM参数: $arguments"
|
||||||
Append-Utf8NoBomContent -FilePath $outputLogFile -Content $logMessage
|
Append-Utf8NoBomContent -FilePath $outputLogFile -Content $logMessage
|
||||||
|
|
||||||
@ -496,6 +584,7 @@ function Start-SpringBoot {
|
|||||||
|
|
||||||
# 构建最终的调用命令
|
# 构建最终的调用命令
|
||||||
if($outputWriteHost) {
|
if($outputWriteHost) {
|
||||||
|
# [debug]
|
||||||
# Write-Host "$($env:JDK_21)\bin\java.exe" $argumentList -jar "$env:MODEL_MANAGE_BIN"
|
# Write-Host "$($env:JDK_21)\bin\java.exe" $argumentList -jar "$env:MODEL_MANAGE_BIN"
|
||||||
}
|
}
|
||||||
$logMessage = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') - 启动完整命令: $($env:JDK_21)\bin\java.exe $argumentList -jar $env:MODEL_MANAGE_BIN"
|
$logMessage = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') - 启动完整命令: $($env:JDK_21)\bin\java.exe $argumentList -jar $env:MODEL_MANAGE_BIN"
|
||||||
@ -514,17 +603,20 @@ Start-Sleep -Seconds 2
|
|||||||
# 导入数据
|
# 导入数据
|
||||||
Import-Script "127.0.0.1" "33306" "root" "Root@2025"
|
Import-Script "127.0.0.1" "33306" "root" "Root@2025"
|
||||||
|
|
||||||
Start-Sleep -Seconds 1
|
|
||||||
# 检查 Web 运行环境
|
# 检查 Web 运行环境
|
||||||
Check-Web
|
Check-Web
|
||||||
# 启动 Nginx 服务
|
# 启动 Nginx 服务
|
||||||
Start-Web
|
Start-Web
|
||||||
|
|
||||||
Start-Sleep -Seconds 1
|
Start-Sleep -Seconds 2
|
||||||
|
# 启动 MinIO 服务
|
||||||
|
Start-MinIO
|
||||||
|
|
||||||
|
Start-Sleep -Seconds 2
|
||||||
# 检查 SpringBoot 运行环境
|
# 检查 SpringBoot 运行环境
|
||||||
Check-SpringBoot
|
Check-SpringBoot
|
||||||
# 启动 SpringBoot 服务
|
# 启动 SpringBoot 服务
|
||||||
Start-SpringBoot
|
Start-SpringBoot
|
||||||
|
|
||||||
Write-Host "已启动模型"
|
Write-Host "已启动模型"
|
||||||
Start-Sleep -Seconds 3
|
Start-Sleep -Seconds 6
|
||||||
|
@ -420,6 +420,89 @@ End If
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function Start-MinIO {
|
||||||
|
|
||||||
|
# 进入 minio 目录下
|
||||||
|
Set-Location "$MAIN_PATH"
|
||||||
|
Set-Location ".."
|
||||||
|
$WORKSPACE_PATH = Get-Location
|
||||||
|
Set-Location "io"
|
||||||
|
|
||||||
|
if($outputWriteHost) {
|
||||||
|
Write-Host "Start Minio ..."
|
||||||
|
}
|
||||||
|
$logMessage = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') - 准备启动 Minio..."
|
||||||
|
Append-Utf8NoBomContent -FilePath $outputLogFile -Content $logMessage
|
||||||
|
|
||||||
|
# 停止现有的 minio 进程
|
||||||
|
Get-Process -Name "minio" -ErrorAction SilentlyContinue | Stop-Process -Force
|
||||||
|
|
||||||
|
# 配置默认启动参数
|
||||||
|
$MINIO_PATH = "minio.exe"
|
||||||
|
if (-not (Test-Path $MINIO_PATH)) {
|
||||||
|
if($outputWriteHost) {
|
||||||
|
Write-Host "Error: Cannot find minio.exe executable file."
|
||||||
|
}
|
||||||
|
pause
|
||||||
|
Go-Home
|
||||||
|
}
|
||||||
|
|
||||||
|
# 配置用户名和密码(可以改为从参数传入)
|
||||||
|
$MINIO_ROOT_USER = "minio_34KYwR" # 默认用户名
|
||||||
|
$MINIO_ROOT_PASSWORD = "minio_FEaTQx" # 默认密码
|
||||||
|
|
||||||
|
if($outputWriteHost) {
|
||||||
|
Write-Host "$MINIO_PATH"
|
||||||
|
}
|
||||||
|
$logMessage = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') - Minio executable file: $MINIO_PATH"
|
||||||
|
Append-Utf8NoBomContent -FilePath $outputLogFile -Content $logMessage
|
||||||
|
|
||||||
|
# Minio 配置参数
|
||||||
|
$MINIO_DATA_DIR = "data" # 数据目录
|
||||||
|
$MINIO_PORT = 9000 # API 端口
|
||||||
|
$MINIO_CONSOLE_PORT = 9001 # 控制台端口
|
||||||
|
|
||||||
|
# 创建以管理员身份运行的 VBS脚本
|
||||||
|
$vbsContent = @"
|
||||||
|
Set UAC = CreateObject("Shell.Application")
|
||||||
|
Set WshShell = CreateObject("WScript.Shell")
|
||||||
|
|
||||||
|
On Error Resume Next
|
||||||
|
Set fso = CreateObject("Scripting.FileSystemObject")
|
||||||
|
Set tempFile = fso.OpenTextFile("%SystemRoot%\System32\config\systemprofile", 1)
|
||||||
|
If Err.Number = 0 Then
|
||||||
|
WshShell.Run "cmd /c set MINIO_ROOT_USER=$MINIO_ROOT_USER && set MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD && $MINIO_PATH server $MINIO_DATA_DIR --console-address :$MINIO_CONSOLE_PORT", 0, False
|
||||||
|
Else
|
||||||
|
UAC.ShellExecute "cmd", "/c set MINIO_ROOT_USER=$MINIO_ROOT_USER && set MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD && $MINIO_PATH server $MINIO_DATA_DIR --console-address :$MINIO_CONSOLE_PORT", "", "runas", 0
|
||||||
|
End If
|
||||||
|
"@
|
||||||
|
|
||||||
|
# 以 ANSI 写入文件 temp.vbs
|
||||||
|
$vbsContent | Out-File -FilePath "$WORKSPACE_PATH\io\temp.vbs" -Encoding ASCII
|
||||||
|
if($outputWriteHost) {
|
||||||
|
Write-Host "Temporary startup script has been created."
|
||||||
|
}
|
||||||
|
|
||||||
|
# 运行 vbs 脚本
|
||||||
|
Start-Process "cscript.exe" -ArgumentList "//nologo temp.vbs"
|
||||||
|
|
||||||
|
# 等待1秒后删除临时文件
|
||||||
|
Start-Sleep -Seconds 1
|
||||||
|
Remove-Item "temp.vbs" -Force
|
||||||
|
|
||||||
|
# 输出访问信息
|
||||||
|
if($outputWriteHost) {
|
||||||
|
Write-Host "Minio:"
|
||||||
|
Write-Host "WEB: http://localhost:$MINIO_CONSOLE_PORT"
|
||||||
|
Write-Host "API: http://localhost:$MINIO_PORT"
|
||||||
|
Write-Host "user: $MINIO_ROOT_USER"
|
||||||
|
Write-Host "pass: $MINIO_ROOT_PASSWORD"
|
||||||
|
}
|
||||||
|
$logMessage = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') - Minio started successfully! Console port: $MINIO-CONSOLE-PORT, API port: $MINIO-PORT, username: $MINIO-COOT_USER"
|
||||||
|
Append-Utf8NoBomContent -FilePath $outputLogFile -Content $logMessage
|
||||||
|
}
|
||||||
|
|
||||||
function Start-SpringBoot {
|
function Start-SpringBoot {
|
||||||
|
|
||||||
# 准备启动后台服务
|
# 准备启动后台服务
|
||||||
@ -434,7 +517,12 @@ function Start-SpringBoot {
|
|||||||
# 指定环境变量 MODEL_MANAGE_DB_SERVER
|
# 指定环境变量 MODEL_MANAGE_DB_SERVER
|
||||||
# 指定环境变量 MODEL_MANAGE_DB_PORT
|
# 指定环境变量 MODEL_MANAGE_DB_PORT
|
||||||
# 追加自定义JVM参数 MODEL_VM_PARAMS
|
# 追加自定义JVM参数 MODEL_VM_PARAMS
|
||||||
$arguments = "-Dspring.profiles.active=dev,mysql -Dmybatis-flex.datasource.ds1.password=Wfbke8!LeMY5Fwwe -Dproject.database-ip=$env:MODEL_MANAGE_DB_SERVER -Dproject.database-port=$env:MODEL_MANAGE_DB_PORT $env:MODEL_VM_PARAMS"
|
$arguments = "-Dspring.profiles.active=dev,mysql" +
|
||||||
|
" -Dmybatis-flex.datasource.ds1.username=model" +
|
||||||
|
" -Dmybatis-flex.datasource.ds1.password=Wfbke8!LeMY5Fwwe" +
|
||||||
|
" -Dproject.database-ip=$env:MODEL_MANAGE_DB_SERVER" +
|
||||||
|
" -Dproject.database-port=$env:MODEL_MANAGE_DB_PORT" +
|
||||||
|
" $env:MODEL_VM_PARAMS "
|
||||||
$logMessage = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') - 启动JVM参数: $arguments"
|
$logMessage = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') - 启动JVM参数: $arguments"
|
||||||
Append-Utf8NoBomContent -FilePath $outputLogFile -Content $logMessage
|
Append-Utf8NoBomContent -FilePath $outputLogFile -Content $logMessage
|
||||||
$argumentList = $arguments -split " -"
|
$argumentList = $arguments -split " -"
|
||||||
@ -478,6 +566,9 @@ Check-Web
|
|||||||
# 启动 Nginx 服务
|
# 启动 Nginx 服务
|
||||||
Start-Web
|
Start-Web
|
||||||
|
|
||||||
|
# 启动 MinIO 服务
|
||||||
|
Start-MinIO
|
||||||
|
|
||||||
Start-Sleep -Seconds 1
|
Start-Sleep -Seconds 1
|
||||||
# 检查 SpringBoot 运行环境
|
# 检查 SpringBoot 运行环境
|
||||||
Check-SpringBoot
|
Check-SpringBoot
|
||||||
@ -485,4 +576,4 @@ Check-SpringBoot
|
|||||||
Start-SpringBoot
|
Start-SpringBoot
|
||||||
|
|
||||||
Write-Host "已启动模型"
|
Write-Host "已启动模型"
|
||||||
Start-Sleep -Seconds 3
|
Start-Sleep -Seconds 5
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +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"}}
|
{"version":"1","format":"xl-single","id":"6133385a-4fa8-486e-a315-396fe6649c3e","xl":{"version":"3","this":"a8f97955-51e0-4948-9bdc-cde0897deb52","sets":[["a8f97955-51e0-4948-9bdc-cde0897deb52"]],"distributionAlgo":"SIPMOD+PARITY"}}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -14,8 +14,8 @@ if not exist "%MINIO_EXE%" (
|
|||||||
)
|
)
|
||||||
|
|
||||||
:: 设置MinIO凭据
|
:: 设置MinIO凭据
|
||||||
:: set MINIO_ROOT_USER=minio_FEaTQx
|
set MINIO_ROOT_USER=minio_FEaTQx
|
||||||
:: set MINIO_ROOT_PASSWORD=minio_34KYwR
|
set MINIO_ROOT_PASSWORD=minio_34KYwR
|
||||||
|
|
||||||
:: 检查数据目录是否存在,不存在则创建
|
:: 检查数据目录是否存在,不存在则创建
|
||||||
if not exist "%DATA_DIR%" (
|
if not exist "%DATA_DIR%" (
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user