Compare commits

..

No commits in common. "3442840175832e2a5f7b4ef9d74ce5794b6577bb" and "64c5f6bf3ddb12b298e53fb4da315f5f34ec54ac" have entirely different histories.

50 changed files with 156 additions and 1552 deletions

View File

@ -1,20 +1,23 @@
@echo off
chcp 65001 >nul
:: title MinIO Quick Start
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% is not exist!
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%"
)
@ -22,14 +25,11 @@ if not exist "%DATA_DIR%" (
if exist "%MINIO_EXE%" (
echo Starting MinIO server...
start "Scenario Server" /B cmd /c "%MINIO_EXE% server ^"%DATA_DIR%^" --console-address ^":%CONSOLE_PORT%^""
start "Scenario Server" cmd /k "%MINIO_EXE% server ^"%DATA_DIR%^" --console-address ^":%CONSOLE_PORT%^""
)
echo.
echo ========================================
echo MinIO Services Status
echo ========================================
echo - MinIO Web (Port: 9001)
echo MinIO:
echo - MinIO API (Port: 9000)
echo ========================================
echo.
echo - MinIO Web (Port: 9001)
pause

View File

@ -3,171 +3,75 @@ setlocal enabledelayedexpansion
chcp 65001 >nul
title Import Data Into MySQL
set "SCRIPT_PATH=%~dp0"
:: MySQL connection configuration
set MYSQL_HOST=127.0.0.1
set MYSQL_PORT=33306
set MYSQL_USER=root
set MYSQL_PASS=Root@2025
set MYSQL_EXE=mysql.exe
:: Script directory
set SCRIPTS_DIR=script
:: 1. Check if mysql.exe exists
where %MYSQL_EXE% >nul 2>&1
if %errorLevel% neq 0 (
call :log_error Error: mysql.exe not found in PATH
pause && exit /b 1
)
where rar.exe >nul 2>&1
if %errorLevel% neq 0 (
call :log_error Error: rar.exe not found in PATH
call :log_error Please install WinRAR or add it to PATH
pause && exit /b 1
)
if not exist "%SCRIPTS_DIR%" (
call :log_error Error: Scripts directory not found at %SCRIPTS_DIR%
pause && exit /b 1
)
call :log_info Testing MySQL connection...
%MYSQL_EXE% -h %MYSQL_HOST% -P %MYSQL_PORT% -u %MYSQL_USER% -p%MYSQL_PASS% -e "SELECT 1" >nul 2>&1
if %errorLevel% neq 0 (
call :log_error Failed to connect to MySQL server
call :log_error Please verify your connection parameters:
call :log_error Host: %MYSQL_HOST%
call :log_error Port: %MYSQL_PORT%
call :log_error User: %MYSQL_USER%
pause && exit /b 1
)
call :log_info MySQL connection successful. Starting import process...
call :GetDate
set CURRENT_DATE=%FormattedDate%
call :log_info CURRENT_DATE: %CURRENT_DATE%
set TEMP_SQL_DIR=%temp%\%CURRENT_DATE%
if not exist "!TEMP_SQL_DIR!" mkdir "!TEMP_SQL_DIR!"
call :log_info TEMP_SQL_DIR: %TEMP_SQL_DIR%
for /d %%D in ("%SCRIPTS_DIR%\*") do (
set "folder=%%~nxD"
call :log_info Processing database: !folder!
call :log_info Creating database '!folder!' if not exists...
%MYSQL_EXE% -h %MYSQL_HOST% -P %MYSQL_PORT% -u %MYSQL_USER% -p%MYSQL_PASS% -e "CREATE DATABASE IF NOT EXISTS `!folder!`;"
if %errorLevel% neq 0 (
call :log_error Failed to create database '!folder!'
pause && exit /b 1
)
for %%F in ("%%D\*.sql") do (
call :log_info Importing file: %%~nxF into database !folder!
%MYSQL_EXE% -h %MYSQL_HOST% -P %MYSQL_PORT% -u %MYSQL_USER% -p%MYSQL_PASS% !folder! < "%%F"
if %errorLevel% neq 0 (
call :log_error Failed to import file %%~nxF
pause && exit /b 1
)
copy "%%F" "!TEMP_SQL_DIR!\" >nul
del "%%F" >nul
)
call :log_info Completed processing database: !folder!
call :log_info ----------------------------------------
)
call :log_info All SQL files imported successfully!
call :rar
exit /b 0
:log_info
call :GetFormattedTime
echo [%FormattedTime%] - [INFO] - %*
exit /b 0
:log_warn
call :GetFormattedTime
echo [%FormattedTime%] - [WARN] - %*
exit /b 0
:log_error
call :GetFormattedTime
echo [%FormattedTime%] - [ERROR] - %*
exit /b 0
:rar
call :RandomStr 16 RAND_NAME
set TARGET_DIR=%temp%\!CURRENT_DATE!
if not exist "!TARGET_DIR!" mkdir "!TARGET_DIR!"
call :log_info Creating encrypted archive...
rar a -ep1 -hp"Password#!CURRENT_DATE!" "!TARGET_DIR!\!RAND_NAME!.rar" "!TEMP_SQL_DIR!\*" >nul
if %errorLevel% neq 0 (
call :log_error Error: Failed to create encrypted archive
echo Error: mysql.exe not found in PATH
pause
exit /b 1
)
if not exist "%SCRIPT_PATH%/patch/!CURRENT_DATE!" mkdir "%SCRIPT_PATH%/patch/!CURRENT_DATE!"
call :log_info TEMP_SQL_DIR: %TEMP_SQL_DIR%
mv !TEMP_SQL_DIR!/*.rar "%SCRIPT_PATH%/patch/!CURRENT_DATE!"
rd /s /q "!TEMP_SQL_DIR!" 2>nul
call :log_info Encryption completed successfully!
call :log_info Archive: !TARGET_DIR!\!RAND_NAME!.rar
call :log_info Password: Password#!CURRENT_DATE!
exit /b 0
:RandomStr
setlocal
set "len=%~1"
set "varname=%~2"
if "!varname!"=="" set "varname=RAND_STR"
set "chars=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
set "random_str="
for /l %%i in (1,1,!len!) do (
set /a rand_index=!random! %% 62
call set "char=%%chars:~!rand_index!,1%%"
set "random_str=!random_str!!char!"
:: 2. Check if scripts directory exists
if not exist "%SCRIPTS_DIR%" (
echo Error: Scripts directory not found at %SCRIPTS_DIR%
pause
exit /b 1
)
endlocal & set "%varname%=%random_str%"
exit /b 0
:Start
setlocal
set DESCRIPTION=%1
set SCRIPT_PATH=%2
set SCRIPT_FILE=%3
if exist "%SCRIPT_PATH%\%SCRIPT_FILE%" (
echo.
call :log_info Starting %DESCRIPTION%...
cd /d "%SCRIPT_PATH%"
start "%DESCRIPTION% Startup" /B cmd /c "%SCRIPT_FILE%"
if errorlevel 1 (
call :log_error %DESCRIPTION% start Failed.
pause && exit /b 1
:: 3. Verify MySQL connection
echo Testing MySQL connection...
%MYSQL_EXE% -h %MYSQL_HOST% -P %MYSQL_PORT% -u %MYSQL_USER% -p%MYSQL_PASS% -e "SELECT 1" >nul 2>&1
if %errorLevel% neq 0 (
echo Error: Failed to connect to MySQL server
echo Please verify your connection parameters:
echo Host: %MYSQL_HOST%
echo Port: %MYSQL_PORT%
echo User: %MYSQL_USER%
pause
exit /b 1
)
) else (
call :log_error Script file not found: %SCRIPT_PATH%\%SCRIPT_FILE%
pause && exit /b 1
echo MySQL connection successful. Starting import process...
:: Process all folders in the scripts directory
for /d %%D in ("%SCRIPTS_DIR%\*") do (
set "folder=%%~nxD"
echo Processing database: !folder!
:: Create database (if not exists)
echo Creating database '!folder!' if not exists...
%MYSQL_EXE% -h %MYSQL_HOST% -P %MYSQL_PORT% -u %MYSQL_USER% -p%MYSQL_PASS% -e "CREATE DATABASE IF NOT EXISTS `!folder!`;"
if %errorLevel% neq 0 (
echo Error: Failed to create database '!folder!'
pause
exit /b 1
)
endlocal
exit /b 0
:GetFormattedTime
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "datetime=%%a"
set "FormattedTime=%datetime:~0,4%-%datetime:~4,2%-%datetime:~6,2% %datetime:~8,2%:%datetime:~10,2%:%datetime:~12,2%"
exit /b 0
:: Process all .sql files in the current folder
for %%F in ("%%D\*.sql") do (
echo Importing file: %%~nxF into database !folder!
%MYSQL_EXE% -h %MYSQL_HOST% -P %MYSQL_PORT% -u %MYSQL_USER% -p%MYSQL_PASS% !folder! < "%%F"
:GetDate
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "datetime=%%a"
set "FormattedDate=%datetime:~0,4%%datetime:~4,2%%datetime:~6,2%"
exit /b 0
if %errorLevel% neq 0 (
echo Error: Failed to import file %%~nxF
pause
exit /b 1
)
)
echo Completed processing database: !folder!
echo ----------------------------------------
)
echo All SQL files imported successfully!
pause

Binary file not shown.

Binary file not shown.

View File

@ -7,15 +7,6 @@ server {
listen 18080;
server_name _;
root html;
error_page 404 /404.html;
error_page 500 /50x.html?error=500;
error_page 502 /50x.html?error=502;
error_page 503 /50x.html?error=503;
error_page 504 /50x.html?error=504;
gzip on;
gzip_min_length 1k;
gzip_comp_level 9;
@ -23,26 +14,19 @@ server {
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
# 传递用户请求的原始Host域名或IP+端口)
# proxy_set_header Host $host;
proxy_set_header Host $http_host;
# 传递用户真实IP
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
# 传递真实IP包含整个代理链路的IP信息
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# 传递用户请求的原始协议 (http 或 https)
proxy_set_header X-Forwarded-Proto $scheme;
# 用户原始的Cookie等完整请求头
proxy_set_header Cookie $http_cookie;
add_header X-Content-Type-Options "nosniff";
add_header X-Frame-Options "SAMEORIGIN";
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_read_timeout 10s;
proxy_read_timeout 60s;
proxy_connect_timeout 5s;
proxy_send_timeout 10s;
proxy_send_timeout 30s;
proxy_buffering off;
@ -50,40 +34,28 @@ server {
rewrite ^ /home permanent;
}
location = /404.html {
root html;
internal;
}
location = /50x.html {
root /usr/share/nginx/html;
internal;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header X-Real-IP $remote_addr;
}
location / {
proxy_pass http://portal/;
proxy_intercept_errors on;
}
location /assets/ {
proxy_pass http://portal/assets/;
expires 30d;
access_log off;
proxy_intercept_errors on;
}
location /api/ {
proxy_pass http://portal/api/;
client_max_body_size 100M;
proxy_intercept_errors on;
}
location /dev-api/ {
proxy_pass http://portal/dev-api/;
client_max_body_size 100M;
proxy_intercept_errors on;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@ -1,196 +0,0 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>页面未找到 - 404错误</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #fff;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 20px;
}
.container {
max-width: 800px;
width: 100%;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 40px;
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.error-code {
font-size: 120px;
font-weight: 800;
margin-bottom: 20px;
text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
color: #fff;
line-height: 1;
animation: pulse 2s infinite;
}
.error-title {
font-size: 32px;
margin-bottom: 20px;
color: #fff;
}
.error-message {
font-size: 18px;
margin-bottom: 30px;
line-height: 1.6;
color: rgba(255, 255, 255, 0.9);
}
.search-box {
display: flex;
max-width: 500px;
margin: 0 auto 30px;
}
.search-input {
flex: 1;
padding: 15px 20px;
border: none;
border-radius: 50px 0 0 50px;
font-size: 16px;
outline: none;
}
.search-button {
padding: 15px 25px;
background: #4CAF50;
color: white;
border: none;
border-radius: 0 50px 50px 0;
cursor: pointer;
font-size: 16px;
transition: background 0.3s;
}
.search-button:hover {
background: #3e8e41;
}
.action-buttons {
display: flex;
justify-content: center;
gap: 15px;
flex-wrap: wrap;
}
.btn {
padding: 12px 25px;
background: rgba(255, 255, 255, 0.2);
color: white;
text-decoration: none;
border-radius: 50px;
transition: all 0.3s;
border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn:hover {
background: rgba(255, 255, 255, 0.3);
transform: translateY(-3px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.nginx-brand {
margin-top: 40px;
opacity: 0.7;
font-size: 14px;
}
/* 动画效果 */
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
/* 响应式设计 */
@media (max-width: 600px) {
.error-code {
font-size: 80px;
}
.error-title {
font-size: 24px;
}
.error-message {
font-size: 16px;
}
.container {
padding: 30px 20px;
}
.search-box {
flex-direction: column;
}
.search-input {
border-radius: 50px;
margin-bottom: 10px;
}
.search-button {
border-radius: 50px;
}
}
</style>
</head>
<body>
<div class="container">
<h1 class="error-code">404</h1>
<h2 class="error-title">哎呀!页面找不到啦</h2>
<p class="error-message">您访问的页面可能已被移除、更名或暂时不可用。请检查URL是否正确或使用搜索功能查找您需要的内容。</p>
<!-- <div class="search-box">
<input type="text" class="search-input" placeholder="搜索网站内容...">
<button class="search-button">搜索</button>
</div> -->
<div class="action-buttons">
<a href="/" class="btn">返回首页</a>
<a href="javascript:history.back()" class="btn">返回上一页</a>
<a href="/sitemap" class="btn">网站地图</a>
<a href="/contact" class="btn">联系支持</a>
</div>
<div class="nginx-brand">Nginx</div>
</div>
<script>
document.querySelector('.search-button').addEventListener('click', function() {
const query = document.querySelector('.search-input').value;
if(query.trim() !== '') {
alert('执行搜索: ' + query);
}
});
document.querySelector('.search-input').addEventListener('keypress', function(e) {
if(e.key === 'Enter') {
document.querySelector('.search-button').click();
}
});
</script>
</body>
</html>

View File

@ -1,354 +0,0 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>服务器错误 - <span id="error-code">500</span></title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #ff6b6b 0%, #cc2b5e 100%);
color: #fff;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 20px;
}
.container {
max-width: 900px;
width: 100%;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 40px;
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.error-code {
font-size: 120px;
font-weight: 800;
margin-bottom: 10px;
text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
color: #fff;
line-height: 1;
animation: pulse 2s infinite;
}
.error-title {
font-size: 32px;
margin-bottom: 15px;
color: #fff;
}
.error-description {
font-size: 18px;
margin-bottom: 25px;
padding: 15px;
background: rgba(0, 0, 0, 0.2);
border-radius: 10px;
line-height: 1.6;
}
.error-message {
font-size: 16px;
margin-bottom: 30px;
line-height: 1.6;
color: rgba(255, 255, 255, 0.9);
}
.server-status {
background: rgba(0, 0, 0, 0.2);
border-radius: 10px;
padding: 20px;
margin: 20px 0;
text-align: left;
}
.status-title {
font-size: 18px;
margin-bottom: 15px;
display: flex;
align-items: center;
}
.status-title i {
margin-right: 10px;
}
.status-item {
display: flex;
justify-content: space-between;
padding: 8px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.status-label {
font-weight: 500;
}
.status-value {
font-weight: 600;
}
.status-value.down {
color: #ff6b6b;
}
.status-value.up {
color: #4CAF50;
}
.action-buttons {
display: flex;
justify-content: center;
gap: 15px;
flex-wrap: wrap;
margin: 30px 0;
}
.btn {
padding: 12px 25px;
background: rgba(255, 255, 255, 0.2);
color: white;
text-decoration: none;
border-radius: 50px;
transition: all 0.3s;
border: 1px solid rgba(255, 255, 255, 0.3);
display: flex;
align-items: center;
}
.btn i {
margin-right: 8px;
}
.btn:hover {
background: rgba(255, 255, 255, 0.3);
transform: translateY(-3px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.countdown {
font-size: 16px;
margin-top: 20px;
padding: 10px;
background: rgba(0, 0, 0, 0.2);
border-radius: 10px;
}
.countdown-number {
font-weight: 700;
color: #FFD700;
}
.error-details {
margin-top: 20px;
padding: 15px;
background: rgba(0, 0, 0, 0.1);
border-radius: 8px;
text-align: left;
font-size: 14px;
}
.nginx-brand {
margin-top: 40px;
opacity: 0.7;
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
}
/* 动画效果 */
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.fa-spinner {
animation: spin 1.5s linear infinite;
}
/* 响应式设计 */
@media (max-width: 600px) {
.error-code {
font-size: 80px;
}
.error-title {
font-size: 24px;
}
.error-description, .error-message {
font-size: 16px;
}
.container {
padding: 30px 20px;
}
.action-buttons {
flex-direction: column;
}
.btn {
justify-content: center;
}
}
</style>
</head>
<body>
<div class="container">
<h1 class="error-code" id="dynamic-error-code">500</h1>
<h2 class="error-title" id="error-title">服务器内部错误</h2>
<div class="error-description" id="error-description">
服务器遇到了意外的条件,无法完成您的请求。
</div>
<p class="error-message">
我们的技术团队已收到通知,正在努力解决问题。<br>
请稍后再试或联系技术支持获取帮助。
</p>
<div class="server-status">
<div class="status-title">
<i class="fas fa-server"></i>
<span>服务器状态监控</span>
</div>
<div class="status-item">
<span class="status-label">Web服务器</span>
<span class="status-value up">运行正常 <i class="fas fa-check-circle"></i></span>
</div>
<div class="status-item">
<span class="status-label">应用程序服务</span>
<span class="status-value down" id="app-status">遇到问题 <i class="fas fa-exclamation-circle"></i></span>
</div>
<div class="status-item">
<span class="status-label">数据库连接</span>
<span class="status-value up">连接正常 <i class="fas fa-check-circle"></i></span>
</div>
<div class="status-item">
<span class="status-label">错误发生时间</span>
<span class="status-value" id="current-time"></span>
</div>
</div>
<div class="action-buttons">
<a href="/" class="btn">
<i class="fas fa-home"></i>
<span>返回首页</span>
</a>
<a href="javascript:location.reload()" class="btn">
<i class="fas fa-redo"></i>
<span>重新加载</span>
</a>
<a href="javascript:history.back()" class="btn">
<i class="fas fa-arrow-left"></i>
<span>返回上一页</span>
</a>
<a href="/contact" class="btn">
<i class="fas fa-envelope"></i>
<span>联系支持</span>
</a>
</div>
<div class="countdown">
<p>页面将在 <span class="countdown-number" id="countdown">15</span> 秒后自动重新加载 <i class="fas fa-spinner"></i></p>
</div>
<div class="error-details">
<p><strong>技术信息:</strong></p>
<p>错误代码: <span id="technical-error-code">500</span></p>
<p>请求ID: <span id="request-id">REQ-${Math.random().toString(36).substr(2, 9).toUpperCase()}</span></p>
<p>服务器: <span id="server-name">${window.location.hostname}</span></p>
</div>
<div class="nginx-brand">
<span>Powered by Nginx</span>
</div>
</div>
<script>
function getErrorCodeFromURL() {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get('error') || '500';
}
const errorDescriptions = {
'500': {
title: '服务器内部错误',
description: '服务器遇到了意外的条件,无法完成您的请求。这通常是服务器端代码的问题。'
},
'502': {
title: '错误的网关',
description: '服务器作为网关或代理,从上游服务器收到无效响应。这可能是后端服务无响应或配置错误。'
},
'503': {
title: '服务不可用',
description: '服务器暂时无法处理请求,通常是由于过载或维护。请稍后再试。'
},
'504': {
title: '网关超时',
description: '服务器作为网关或代理,没有及时从上游服务器收到响应。这可能是网络问题或后端服务响应缓慢。'
}
};
function setupErrorPage() {
const errorCode = getErrorCodeFromURL();
const errorInfo = errorDescriptions[errorCode] || errorDescriptions['500'];
document.getElementById('dynamic-error-code').textContent = errorCode;
document.getElementById('error-title').textContent = errorInfo.title;
document.getElementById('error-description').textContent = errorInfo.description;
document.title = `服务器错误 - ${errorCode}`;
document.getElementById('technical-error-code').textContent = errorCode;
}
let seconds = 15;
const countdownElement = document.getElementById('countdown');
const countdown = setInterval(function() {
seconds--;
countdownElement.textContent = seconds;
if (seconds <= 0) {
clearInterval(countdown);
window.location.reload();
}
}, 1000);
function updateCurrentTime() {
const now = new Date();
const timeElement = document.getElementById('current-time');
timeElement.textContent = now.toLocaleString();
}
document.addEventListener('DOMContentLoaded', function() {
setupErrorPage();
updateCurrentTime();
setInterval(updateCurrentTime, 1000);
document.getElementById('server-name').textContent = window.location.hostname;
});
</script>
</body>
</html>

View File

@ -1,238 +0,0 @@
@echo off
setlocal enabledelayedexpansion
chcp 65001 >nul
title Quick Start
set "SCRIPT_DIR=%~dp0"
call :log_info SCRIPT_DIR=%SCRIPT_DIR%
cd /d "%SCRIPT_DIR%"
call :main
pause && exit /b 0
:log_info
call :GetFormattedTime
if defined LOG_TITLE (
echo.
echo [%FormattedTime%] - [INFO] - ==================== %LOG_TITLE% ====================
set "LOG_TITLE="
) else (
echo [%FormattedTime%] - [INFO] - %*
)
exit /b 0
:log_warn
call :GetFormattedTime
if defined LOG_TITLE (
echo.
echo [%FormattedTime%] - [WARN] - ==================== %LOG_TITLE% ====================
set "LOG_TITLE="
) else (
echo [%FormattedTime%] - [WARN] - %*
)
exit /b 0
:log_error
call :GetFormattedTime
if defined LOG_TITLE (
echo.
echo [%FormattedTime%] - [ERROR] - ==================== %LOG_TITLE% ====================
set "LOG_TITLE="
) else (
echo [%FormattedTime%] - [ERROR] - %*
)
exit /b 0
:rar
call :RandomStr 16 RAND_NAME
set TARGET_DIR=%temp%\!CURRENT_DATE!
if not exist "!TARGET_DIR!" mkdir "!TARGET_DIR!"
call :log_info Creating encrypted archive...
rar a -ep1 -hp"Password#!CURRENT_DATE!" "!TARGET_DIR!\!RAND_NAME!.rar" "!TEMP_SQL_DIR!\*" >nul
if %errorLevel% neq 0 (
call :log_error Error: Failed to create encrypted archive
pause && exit /b 1
)
if not exist "%SCRIPT_PATH%/patch/!CURRENT_DATE!" mkdir "%SCRIPT_PATH%/patch/!CURRENT_DATE!"
call :log_info TEMP_SQL_DIR: %TEMP_SQL_DIR%
mv !TEMP_SQL_DIR!/*.rar "%SCRIPT_PATH%/patch/!CURRENT_DATE!"
rd /s /q "!TEMP_SQL_DIR!" 2>nul
call :log_info Encryption completed successfully!
call :log_info Archive: !TARGET_DIR!\!RAND_NAME!.rar
call :log_info Password: Password#!CURRENT_DATE!
exit /b 0
:GetSinglePidByPort
setlocal
call :RandomStr single_pid_tmp
call :log_info netstat -ano ^| grep -E ":%1 " ^| grep "LISTENING" ^| awk "{print $NF}" ^| head -n 1
netstat -ano | grep -E ":%1 " | grep "LISTENING" | awk "{print $NF}" | head -n 1 > %single_pid_tmp%.txt
set /p pid=<%single_pid_tmp%.txt
call :log_info pid: %pid%
del %single_pid_tmp%.txt
endlocal & set pid=%pid%
exit /b 0
:RandomStr
setlocal
set "len=%~1"
set "varname=%~2"
if "!varname!"=="" set "varname=RAND_STR"
set "chars=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
set "random_str="
for /l %%i in (1,1,!len!) do (
set /a rand_index=!random! %% 62
call set "char=%%chars:~!rand_index!,1%%"
set "random_str=!random_str!!char!"
)
endlocal & set "%varname%=%random_str%"
exit /b 0
:Start
setlocal
set DESCRIPTION=%1
set SCRIPT_PATH=%2
set SCRIPT_FILE=%3
set PARAMS=
shift /3
:params_loop
if not "%~1"=="" (
set "PARAMS=%PARAMS% %~3"
shift
goto params_loop
)
if exist "%SCRIPT_PATH%\%SCRIPT_FILE%" (
echo.
call :log_info Starting %DESCRIPTION%...
cd /d "%SCRIPT_PATH%"
start "%DESCRIPTION% Startup" /B cmd /c "%SCRIPT_FILE% %PARAMS%"
if errorlevel 1 (
call :log_error %DESCRIPTION% start Failed.
pause && exit /b 1
)
) else (
call :log_error Script file not found: %SCRIPT_PATH%\%SCRIPT_FILE%
pause && exit /b 1
)
endlocal
exit /b 0
:GetFormattedTime
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "datetime=%%a"
set "FormattedTime=%datetime:~0,4%-%datetime:~4,2%-%datetime:~6,2% %datetime:~8,2%:%datetime:~10,2%:%datetime:~12,2%"
exit /b 0
:GetDate
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "datetime=%%a"
set "FormattedDate=%datetime:~0,4%%datetime:~4,2%%datetime:~6,2%"
exit /b 0
:GetUsageNumberOfPidsByPort
setlocal
set "PORT=%~1"
set /a "UNIQUE_COUNT=0"
if "!PORT!"=="" (
call :log_error ERROR: Port number required
endlocal & exit /b 0
)
set "TEMP_FILE=%TEMP%\port_%PORT%_%RANDOM%_%TIME::=_%.tmp"
set "PID_LIST_FILE=%TEMP%\pids_%PORT%_%RANDOM%.tmp"
call :log_info Checking for processes using port !PORT!...
netstat -ano | grep -E ":!PORT! " > "!TEMP_FILE!"
if !errorlevel! neq 0 (
call :log_info No process found using port !PORT!
del "!TEMP_FILE!" 2>nul
endlocal & exit /b 0
)
echo. > "!PID_LIST_FILE!"
echo.
set "LOG_TITLE=Processes using port !PORT!"
call :log_info ignore
for /f "tokens=5" %%a in (!TEMP_FILE!) do (
set "PID=%%a"
:: grep -E "^^!PID! $" "!PID_LIST_FILE!" >nul
findstr /x "!PID!" "!PID_LIST_FILE!" >nul
if !errorlevel! neq 0 (
echo !PID! >> "!PID_LIST_FILE!"
set /a "UNIQUE_COUNT+=1"
call :log_info [!UNIQUE_COUNT!] PID: !PID!
set "PROCESS_NAME="
set "SESSION_NAME="
set "SESSION_NUM="
set "MEM_USAGE="
for /f "tokens=1,2,3,4,5*" %%b in ('tasklist /fi "PID eq !PID!" /fo table ^| findstr /i "!PID!"') do (
if not "%%b"=="=" if not "%%b"=="Image" (
call :log_info "PROCESS_NAME=%%b"
call :log_info "PID_VALUE=%%c"
call :log_info "SESSION_NAME=%%d"
call :log_info "SESSION_NUM=%%e"
call :log_info "MEM_USAGE=%%f"
)
)
if not "!PROCESS_NAME!"=="" (
call :log_info Process: !PROCESS_NAME!
call :log_info Memory: !MEM_USAGE!
)
echo.
)
)
if !UNIQUE_COUNT! gtr 0 (
set "LOG_TITLE=PIDs using port !PORT!"
call :log_info ignore
:: type "!PID_LIST_FILE!"
call :log_info Total: !UNIQUE_COUNT! process
)
del "!TEMP_FILE!" 2>nul
del "!PID_LIST_FILE!" 2>nul
endlocal & exit /b %UNIQUE_COUNT%
:main
setlocal
call :GetUsageNumberOfPidsByPort 18080
if !ERRORLEVEL! neq 0 (
call :log_info Found !ERRORLEVEL! processes.
call :GetSinglePidByPort 18080
set "LOG_TITLE=Killing Process !pid!"
call :log_info ignore
:: taskkill -f -pid !pid! >nul
taskkill -f -im home-web.exe
)
timeout /t 1 /nobreak >nul
call :Start "Nginx" "%SCRIPT_DIR%nginx" "home-web.exe" "-c" "conf/web.conf"
timeout /t 3 /nobreak >nul
call :Start "Redis" "%SCRIPT_DIR%redis" "redis-server.exe" "redis.conf"
timeout /t 3 /nobreak >nul
call :Start "MinIO" "%SCRIPT_DIR%io" "minio-server.bat"
timeout /t 3 /nobreak >nul
call :Start "RocketMQ" "%SCRIPT_DIR%rocketmq\sbin" "rocketmq.bat"
endlocal
cmd /k

View File

@ -1,7 +1,7 @@
@echo off
setlocal enabledelayedexpansion
chcp 65001 >nul
:: title RocketMQ Quick Start
title RocketMQ Quick Start
set "SCRIPT_DIR=%~dp0"
cd /d "%SCRIPT_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.

View File

@ -1,7 +1,7 @@
;iss
#define MyAppName "基础环境"
#define MyAppVersion "1.0.8"
#define MyAppVersion "1.0.2"
#define MyAppPublisher "X"
#define MyAppURL "~"
#define MyAppExeName "command"
@ -13,7 +13,6 @@
#define MyAppFirstPath "XManage"
#define MyAppResources "Resources"
#define InstallPassword GetDateTimeString('yyyymmdd', '', '')
#define BuildTime GetDateTimeString('yyyymmddhhnnss', '', '')
; 默认配置
@ -32,7 +31,7 @@ UninstallFilesDir={app}
UninstallDisplayIcon={app}\{#MyAppExeName}.exe
VersionInfoCompany=
VersionInfoCopyright=CopyRight © 2025
VersionInfoDescription=构建于 {#BuildTime}装配DB、IO、MQ、Command等
VersionInfoDescription=装配DB、IO、MQ、Command等
VersionInfoProductVersion={#MyAppVersion}
VersionInfoProductName=基础环境支持Windows7及以上
@ -67,13 +66,13 @@ Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl";
; 是否创建桌面图标
; checkablealone 默认选中
; unchecked 默认不选中
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone
;Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
;; 程序 ICO
[Icons]
;Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}.exe"
Name: "{autodesktop}\Quick Start Environment"; Filename: "{app}\quick.bat"; Tasks: desktopicon
;Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}.exe"; Tasks: desktopicon
;; 组件安装方式
@ -106,7 +105,6 @@ Name: "MySQL"; Description: "MySQL"; Types: full; Flags: checkablealone;
;Source: "{#MyAppResources}\Readme.md"; DestDir: "{app}"; Flags: isreadme;
;; 文件
Source: "{#MyAppResources}\grep.exe"; DestDir: "{app}\usr"; DestName: "grep.exe"; Flags: ignoreversion; Components: MainApp;
Source: "{#MyAppResources}\quick.bat"; DestDir: "{app}"; DestName: "quick.bat"; Flags: ignoreversion; Components: MainApp;
;; 文件夹
; recursesubdirs createallsubdirs 递归复制整个目录
Source: "{#MyAppResources}\usr\*"; DestDir: "{app}\usr\"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: MainApp;
@ -150,12 +148,9 @@ Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: s
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}.exe"" ""%1"""; Flags: uninsdeletevalue;
;; 【grep、awk、sed、head、sort、ls、rm、xargs、rar、zip、tar、md5sum、sha1sum...】
;; 安装路径
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Components: MainApp; Flags: uninsdeletevalue; \
ValueName: "X_COMMAND"; ValueData: "{app}";
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Components: MainApp; Flags: preservestringtype; AfterInstall: RefreshEnvironment; \
ValueName: "Path"; ValueData: "{olddata};%X_COMMAND%\usr"; Check: NeedsAddPath('%X_COMMAND%\usr');
@ -168,6 +163,11 @@ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environmen
ValueName: "Path"; ValueData: "{olddata};%JAVA_HOME%\bin"; Check: NeedsAddPath('%JAVA_HOME%\bin');
;; 【grep、awk、sed、head、sort、ls、rm、xargs、rar、zip、tar、md5sum、sha1sum...】
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Components: MainApp; Flags: preservestringtype; AfterInstall: RefreshEnvironment; \
ValueName: "Path"; ValueData: "{olddata};%X_COMMAND%\usr"; Check: NeedsAddPath('%X_COMMAND%\usr');
;; 【Redis】追加到 PATH 变量
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Components: Redis; Flags: preservestringtype; AfterInstall: RefreshEnvironment; \
@ -187,16 +187,6 @@ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environmen
;; 【RocketMQ】追加到 PATH 变量
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Components: RocketMQ; Flags: uninsdeletevalue; \
ValueName: "ROCKETMQ_HOME"; ValueData: "{app}\rocketmq"; Check: CheckRegistryPath('{app}\rocketmq');
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Components: RocketMQ; Flags: uninsdeletevalue; \
ValueName: "ROCKETMQ_SBIN"; ValueData: "{app}\rocketmq\sbin";
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Components: RocketMQ; Flags: preservestringtype; AfterInstall: RefreshEnvironment; \
ValueName: "Path"; ValueData: "{olddata};%ROCKETMQ_SBIN%"; Check: NeedsAddPath('%ROCKETMQ_SBIN%');
;; 【MySQL】环境变量【注册服务使用】
; 数据库服务注册后服务名
;Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Components: MySQL; Flags: uninsdeletevalue; AfterInstall: RefreshEnvironment; \
@ -216,6 +206,16 @@ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environmen
;; 【RocketMQ】追加到 PATH 变量
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Components: RocketMQ; Flags: uninsdeletevalue; \
ValueName: "ROCKETMQ_HOME"; ValueData: "{app}\rocketmq"; Check: CheckRegistryPath('{app}\rocketmq');
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Components: RocketMQ; Flags: uninsdeletevalue; \
ValueName: "ROCKETMQ_SBIN"; ValueData: "{app}\rocketmq\sbin";
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Components: RocketMQ; Flags: preservestringtype; AfterInstall: RefreshEnvironment; \
ValueName: "Path"; ValueData: "{olddata};%ROCKETMQ_SBIN%"; Check: NeedsAddPath('%ROCKETMQ_SBIN%');
;; 自定义函数
[Code]
@ -235,14 +235,6 @@ begin
end;
// 获取当前时间
function GetDateTime(): String;
begin
// Result := GetDateTimeString('yyyy/mm/dd hh:nn:ss', '-', ':');
Result := GetDateTimeString('yyyymmddhhnnss', '', '');
end;
function SendMessageTimeout(
hWnd: Integer;
Msg: Integer;
@ -443,21 +435,15 @@ begin
// 仅在安装完成后执行
if CurStep = ssPostInstall then
begin
// 创建配置文件
CreateConfigFromTemplate;
// 删除模版文件
if FileExists(ExpandConstant('{app}\mysql\template.ini')) then
DeleteFile(ExpandConstant('{app}\mysql\template.ini'));
if FileExists(ExpandConstant('{app}\mysql\template-initialize-and-start-mysql.bat')) then
DelTree(ExpandConstant('{app}\mysql\template-initialize-and-start-mysql.bat'), False, True, False);
if FileExists(ExpandConstant('{app}\mysql\template-register-mysql-with-data.bat')) then
DelTree(ExpandConstant('{app}\mysql\template-register-mysql-with-data.bat'), False, True, False);
if FileExists(ExpandConstant('{app}\mysql\import-data-into-mysql-v2.bat')) then
DelTree(ExpandConstant('{app}\mysql\import-data-into-mysql-v2.bat'), False, True, False);
end;
end;
@ -485,4 +471,3 @@ Filename: "sc"; Parameters: "delete x_database"; Flags: runascurrentuser runhidd
Type: files; Name: "{app}\mysql\my.ini"
Type: files; Name: "{app}\mysql\*.bat"
Type: filesandordirs; Name: "{app}\mysql\data"
Type: filesandordirs; Name: "{app}\io\data"

View File

@ -1,7 +1,7 @@
;iss
#define MyAppName "基础环境"
#define MyAppVersion "1.0.2"
#define MyAppVersion "1.0.1"
#define MyAppPublisher "X"
#define MyAppURL "~"
#define MyAppExeName "command"
@ -13,7 +13,6 @@
#define MyAppFirstPath "XManage"
#define MyAppResources "Resources"
#define InstallPassword GetDateTimeString('yyyymmdd', '', '')
#define BuildTime GetDateTimeString('yyyymmddhhnnss', '', '')
; 默认配置
@ -32,7 +31,7 @@ UninstallFilesDir={app}
UninstallDisplayIcon={app}\{#MyAppExeName}.exe
VersionInfoCompany=
VersionInfoCopyright=CopyRight © 2025
VersionInfoDescription=构建于 {#BuildTime}基本命令扩充sed、awk、grep等
VersionInfoDescription=基本命令扩充sed、awk、grep等
VersionInfoProductVersion={#MyAppVersion}
VersionInfoProductName=基础环境支持Windows7及以上

View File

@ -1,128 +1,18 @@
@echo off
setlocal enabledelayedexpansion
chcp 65001 >nul
chcp 65001
title Eval Quick Start
set SERVER_UPPER=EVAL
set SERVER_LOWER=eval
set SERVER_HUMP=Eval
set /a SERVER_PORT=28480
set /a WEBSITE_PORT=%SERVER_PORT%-10000
set modifyTitle=1
for %%a in (%*) do (
if /i "%%a"=="/notitle" set modifyTitle=0
cd %EVAL_MAIN%
if exist "%EVAL_MANAGE%" (
start "Eval Server" cmd /k "java -jar %EVAL_VM_PARAMS% -jar %EVAL_MANAGE_BIN%"
)
if %modifyTitle% equ 1 (
title %SERVER_HUMP% Quick Start
if exist "%EVAL_MANAGE%" (
start "Eval Website" cmd /k "cd web && eval-web.exe -c conf/web.conf"
)
:: =============================================
:: Validation
:: =============================================
if not defined !SERVER_UPPER!_MAIN (
echo [ERROR] !SERVER_UPPER!_MAIN environment variable is not defined
pause && exit /b 1
)
echo Eval:
echo - EvalServer (Port: 28480)
echo - EvalWebsite (Port: 18480)
if not defined !SERVER_UPPER!_MANAGE_BIN (
echo [ERROR] !SERVER_UPPER!_MANAGE_BIN environment variable is not defined
pause && exit /b 1
)
if not defined !SERVER_UPPER!_VM_PARAMS (
echo Warning: !SERVER_UPPER!_VM_PARAMS environment variable is not defined
set %SERVER_UPPER%_VM_PARAMS=-Xms512m -Xmx2048m
)
cd /d "!%SERVER_UPPER%_MAIN!" 2>nul
if errorlevel 1 (
echo [ERROR] Directory not found: !%SERVER_UPPER%_MAIN!
echo Please verify %SERVER_UPPER%_MAIN environment variable
pause && exit /b 1
)
if not exist "!%SERVER_UPPER%_MANAGE_BIN!" (
echo [ERROR] Main JAR file not found: !%SERVER_UPPER%_MANAGE_BIN!
echo Please verify %SERVER_UPPER%_MANAGE_BIN environment variable
pause && exit /b 1
)
cd web 2>nul
if errorlevel 1 (
echo [ERROR] web directory does not exist in !%SERVER_UPPER%_MAIN!
pause && exit /b 1
)
if not exist "%SERVER_LOWER%-web.exe" (
echo [ERROR] %SERVER_LOWER%-web.exe does not exist in !%SERVER_UPPER%_MAIN!\web
pause && exit /b 1
)
if not exist "conf\web.conf" (
echo [ERROR] conf\web.conf does not exist in !%SERVER_UPPER%_MAIN!\web
pause && exit /b 1
)
:: =============================================
:: Service Launch
:: =============================================
cd ..
setlocal
echo Starting %SERVER_HUMP% Server...
jps -v | grep "\-Dserver.port=%SERVER_PORT%" | awk "{print $1}" >server.tmp
set /p pid=<server.tmp
del /f /q server.tmp 2>nul
if defined pid (
taskkill -f -pid !pid!
)
start "%SERVER_HUMP% Server" /B cmd /c "chcp 65001 && java !%SERVER_UPPER%_VM_PARAMS! -jar !%SERVER_UPPER%_MANAGE_BIN!"
echo Starting %SERVER_HUMP% Website...
cd web
taskkill -f -im %SERVER_LOWER%-web.exe >nul
start "%SERVER_HUMP% Website" /B cmd /c "%SERVER_LOWER%-web.exe -c conf\web.conf"
set MAX_WAIT=300
set CHECK_INTERVAL=5
set counter=0
echo Waiting for services to start...
echo.
:CHECK_LOOP
netstat -an | find ":%SERVER_PORT%" > nul
set server_up=%errorlevel%
netstat -an | find ":%WEBSITE_PORT%" > nul
set website_up=%errorlevel%
if !server_up! equ 0 if !website_up! equ 0 (
call :DISPLAY_SUCCESS
exit /b 0
)
set /a counter+=CHECK_INTERVAL
if !counter! geq %MAX_WAIT% (
echo Error: Services did not start within !counter! seconds
exit /b 1
)
timeout /t %CHECK_INTERVAL% /nobreak > nul
goto CHECK_LOOP
:DISPLAY_SUCCESS
:: =============================================
:: Status Display
:: =============================================
echo.
echo ========================================
echo %SERVER_HUMP% Services Successfully Started
echo ========================================
echo - %SERVER_HUMP% Server (Port: %SERVER_PORT%)
echo - %SERVER_HUMP% Website (Port: %WEBSITE_PORT%)
echo ========================================
echo.
endlocal
exit /b 0
pause

View File

@ -15,14 +15,6 @@ server {
try_files $uri $uri/ /index.html;
}
location = /login {
proxy_pass http://127.0.0.1:28480/login;
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 /api/ {
proxy_pass http://127.0.0.1:28480/;
client_max_body_size 100M;

View File

@ -1,7 +1,7 @@
;iss
#define MyAppName "效能评估"
#define MyAppVersion "1.0.6"
#define MyAppVersion "1.0.1"
#define MyAppPublisher "X"
#define MyAppURL "~"
#define MyAppExeName "eval"
@ -13,7 +13,6 @@
#define MyAppFirstPath "XManage"
#define MyAppResources "Resources"
#define InstallPassword GetDateTimeString('yyyymmdd', '', '')
#define BuildTime GetDateTimeString('yyyymmddhhnnss', '', '')
@ -30,8 +29,8 @@ Encryption=yes
;SetupIconFile=Resources\icon.ico
VersionInfoProductVersion={#MyAppVersion}
VersionInfoCompany=
VersionInfoDescription={#MyAppName}服务
VersionInfoCopyright=CopyRight © 2025
VersionInfoDescription=构建于 {#BuildTime}{#MyAppName}服务
VersionInfoProductName={#MyAppName}
@ -68,9 +67,7 @@ Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl"
;; 任务
[Tasks]
; 是否创建桌面图标
; checkablealone 默认选中
; unchecked 默认不选中
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
@ -142,13 +139,12 @@ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environmen
; 扩展启动vm变量
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \
ValueName: "{#MyAppExeNameUpper}_VM_PARAMS"; ValueData: " \
-Dloader.path=""{app}\{#MyAppExeName}\lib"" \
-Dloader.path=lib \
--enable-preview \
-Dserver.port=28480 \
-Dproject.database-ip=127.0.0.1 \
-Dproject.database-port=33306 \
-Dproject.database-name=eval_sys \
-Dmybatis-flex.datasource.ds1.username=eval_sys \
-Dmybatis-flex.datasource.ds1.password=WTpHm3sAJfE45HXp \
-Dproject.redis-url=127.0.0.1 \
-Dproject.redis-password=redis123 \

View File

@ -1,128 +1,18 @@
@echo off
setlocal enabledelayedexpansion
chcp 65001 >nul
chcp 65001
title Model Quick Start
set SERVER_UPPER=MODEL
set SERVER_LOWER=model
set SERVER_HUMP=Model
set /a SERVER_PORT=28680
set /a WEBSITE_PORT=%SERVER_PORT%-10000
set modifyTitle=1
for %%a in (%*) do (
if /i "%%a"=="/notitle" set modifyTitle=0
cd %MODEL_MAIN%
if exist "%MODEL_MANAGE_BIN%" (
start "Model Server" cmd /k "java -jar %MODEL_VM_PARAMS% -jar %MODEL_MANAGE_BIN%"
)
if %modifyTitle% equ 1 (
title %SERVER_HUMP% Quick Start
if exist "%MODEL_MANAGE_BIN%" (
start "Model Website" cmd /k "cd web && model-web.exe -c conf/web.conf"
)
:: =============================================
:: Validation
:: =============================================
if not defined !SERVER_UPPER!_MAIN (
echo [ERROR] !SERVER_UPPER!_MAIN environment variable is not defined
pause && exit /b 1
)
echo Model:
echo - ModelServer (Port: 28680)
echo - ModelWebsite (Port: 18680)
if not defined !SERVER_UPPER!_MANAGE_BIN (
echo [ERROR] !SERVER_UPPER!_MANAGE_BIN environment variable is not defined
pause && exit /b 1
)
if not defined !SERVER_UPPER!_VM_PARAMS (
echo Warning: !SERVER_UPPER!_VM_PARAMS environment variable is not defined
set %SERVER_UPPER%_VM_PARAMS=-Xms512m -Xmx2048m
)
cd /d "!%SERVER_UPPER%_MAIN!" 2>nul
if errorlevel 1 (
echo [ERROR] Directory not found: !%SERVER_UPPER%_MAIN!
echo Please verify %SERVER_UPPER%_MAIN environment variable
pause && exit /b 1
)
if not exist "!%SERVER_UPPER%_MANAGE_BIN!" (
echo [ERROR] Main JAR file not found: !%SERVER_UPPER%_MANAGE_BIN!
echo Please verify %SERVER_UPPER%_MANAGE_BIN environment variable
pause && exit /b 1
)
cd web 2>nul
if errorlevel 1 (
echo [ERROR] web directory does not exist in !%SERVER_UPPER%_MAIN!
pause && exit /b 1
)
if not exist "%SERVER_LOWER%-web.exe" (
echo [ERROR] %SERVER_LOWER%-web.exe does not exist in !%SERVER_UPPER%_MAIN!\web
pause && exit /b 1
)
if not exist "conf\web.conf" (
echo [ERROR] conf\web.conf does not exist in !%SERVER_UPPER%_MAIN!\web
pause && exit /b 1
)
:: =============================================
:: Service Launch
:: =============================================
cd ..
setlocal
echo Starting %SERVER_HUMP% Server...
jps -v | grep "\-Dserver.port=%SERVER_PORT%" | awk "{print $1}" >server.tmp
set /p pid=<server.tmp
del /f /q server.tmp 2>nul
if defined pid (
taskkill -f -pid !pid!
)
start "%SERVER_HUMP% Server" /B cmd /c "chcp 65001 && java !%SERVER_UPPER%_VM_PARAMS! -jar !%SERVER_UPPER%_MANAGE_BIN!"
echo Starting %SERVER_HUMP% Website...
cd web
taskkill -f -im %SERVER_LOWER%-web.exe >nul
start "%SERVER_HUMP% Website" /B cmd /c "%SERVER_LOWER%-web.exe -c conf\web.conf"
set MAX_WAIT=300
set CHECK_INTERVAL=5
set counter=0
echo Waiting for services to start...
echo.
:CHECK_LOOP
netstat -an | find ":%SERVER_PORT%" > nul
set server_up=%errorlevel%
netstat -an | find ":%WEBSITE_PORT%" > nul
set website_up=%errorlevel%
if !server_up! equ 0 if !website_up! equ 0 (
call :DISPLAY_SUCCESS
exit /b 0
)
set /a counter+=CHECK_INTERVAL
if !counter! geq %MAX_WAIT% (
echo Error: Services did not start within !counter! seconds
exit /b 1
)
timeout /t %CHECK_INTERVAL% /nobreak > nul
goto CHECK_LOOP
:DISPLAY_SUCCESS
:: =============================================
:: Status Display
:: =============================================
echo.
echo ========================================
echo %SERVER_HUMP% Services Successfully Started
echo ========================================
echo - %SERVER_HUMP% Server (Port: %SERVER_PORT%)
echo - %SERVER_HUMP% Website (Port: %WEBSITE_PORT%)
echo ========================================
echo.
endlocal
exit /b 0
pause

View File

@ -1,7 +1,7 @@
;iss
#define MyAppName "模型管理"
#define MyAppVersion "1.0.6"
#define MyAppVersion "1.0.1"
#define MyAppPublisher "X"
#define MyAppURL "~"
#define MyAppExeName "model"
@ -13,7 +13,6 @@
#define MyAppFirstPath "XManage"
#define MyAppResources "Resources"
#define InstallPassword GetDateTimeString('yyyymmdd', '', '')
#define BuildTime GetDateTimeString('yyyymmddhhnnss', '', '')
@ -30,8 +29,8 @@ Encryption=yes
;SetupIconFile={#MyAppResources}\icon.ico
VersionInfoProductVersion={#MyAppVersion}
VersionInfoCompany=
VersionInfoDescription={#MyAppName}服务
VersionInfoCopyright=CopyRight © 2025
VersionInfoDescription=构建于 {#BuildTime}{#MyAppName}服务
VersionInfoProductName={#MyAppName}
@ -68,9 +67,7 @@ Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl"
;; 任务
[Tasks]
; 是否创建桌面图标
; checkablealone 默认选中
; unchecked 默认不选中
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

View File

@ -15,7 +15,6 @@
#define MyAppFirstPath "XManage"
#define MyAppResources "Resources_203"
#define InstallPassword GetDateTimeString('yyyymmdd', '', '')
#define BuildTime GetDateTimeString('yyyymmddhhnnss', '', '')
; 默认配置
@ -32,8 +31,8 @@ Encryption=yes
VersionInfoVersion={#MyAppVersion}
VersionInfoProductVersion={#MyAppVersion}
VersionInfoCompany=
VersionInfoDescription={#MyAppName}服务
VersionInfoCopyright=CopyRight © 2025
VersionInfoDescription=构建于 {#BuildTime}{#MyAppName}服务
VersionInfoProductName={#MyAppName}
; 默认配置

View File

@ -14,7 +14,6 @@
#define MyAppFirstPath "XManage"
#define MyAppResources "Resources_783"
#define InstallPassword GetDateTimeString('yyyymmdd', '', '')
#define BuildTime GetDateTimeString('yyyymmddhhnnss', '', '')
; 默认配置
@ -30,8 +29,8 @@ Encryption=yes
SetupIconFile={#MyAppResources}\icon.ico
VersionInfoProductVersion={#MyAppVersion}
VersionInfoCompany=
VersionInfoDescription={#MyAppName}服务
VersionInfoCopyright=CopyRight © 2025
VersionInfoDescription=构建于 {#BuildTime}{#MyAppName}服务
VersionInfoProductName={#MyAppName}
; 默认配置

View File

@ -1,134 +1,18 @@
@echo off
setlocal enabledelayedexpansion
chcp 65001 >nul
chcp 65001
title Scenario Quick Start
set SERVER_UPPER=SCENARIO
set SERVER_LOWER=scenario
set SERVER_HUMP=Scenario
set /a SERVER_PORT=28880
set /a WEBSITE_PORT=%SERVER_PORT%-10000
set modifyTitle=1
for %%a in (%*) do (
if /i "%%a"=="/notitle" set modifyTitle=0
cd %SCENARIO_MAIN%
if exist "%SCENARIO_MANAGE_BIN%" (
start "Scenario Server" cmd /k "java -jar %SCENARIO_VM_PARAMS% -jar %SCENARIO_MANAGE_BIN%"
)
if %modifyTitle% equ 1 (
title %SERVER_HUMP% Quick Start
if exist "%SCENARIO_MANAGE_BIN%" (
start "Scenario Website" cmd /k "cd web && scenario-web.exe -c conf/web.conf"
)
:: =============================================
:: Validation
:: =============================================
if not defined !SERVER_UPPER!_MAIN (
echo [ERROR] !SERVER_UPPER!_MAIN environment variable is not defined
pause && exit /b 1
)
echo Scenario:
echo - ScenarioServer (Port: 28880)
echo - ScenarioWebsite (Port: 18880)
if not defined !SERVER_UPPER!_MANAGE_BIN (
echo [ERROR] !SERVER_UPPER!_MANAGE_BIN environment variable is not defined
pause && exit /b 1
)
if not defined !SERVER_UPPER!_VM_PARAMS (
echo Warning: !SERVER_UPPER!_VM_PARAMS environment variable is not defined
set %SERVER_UPPER%_VM_PARAMS=-Xms512m -Xmx2048m
)
cd /d "!%SERVER_UPPER%_MAIN!" 2>nul
if errorlevel 1 (
echo [ERROR] Directory not found: !%SERVER_UPPER%_MAIN!
echo Please verify %SERVER_UPPER%_MAIN environment variable
pause && exit /b 1
)
if not exist "!%SERVER_UPPER%_MANAGE_BIN!" (
echo [ERROR] Main JAR file not found: !%SERVER_UPPER%_MANAGE_BIN!
echo Please verify %SERVER_UPPER%_MANAGE_BIN environment variable
pause && exit /b 1
)
cd web 2>nul
if errorlevel 1 (
echo [ERROR] web directory does not exist in !%SERVER_UPPER%_MAIN!
pause && exit /b 1
)
if not exist "%SERVER_LOWER%-web.exe" (
echo [ERROR] %SERVER_LOWER%-web.exe does not exist in !%SERVER_UPPER%_MAIN!\web
pause && exit /b 1
)
if not exist "conf\web.conf" (
echo [ERROR] conf\web.conf does not exist in !%SERVER_UPPER%_MAIN!\web
pause && exit /b 1
)
:: =============================================
:: Service Launch
:: =============================================
cd ..
setlocal
echo Starting %SERVER_HUMP% Server...
jps -v | grep "\-Dserver.port=%SERVER_PORT%" | awk "{print $1}" >server.tmp
set /p pid=<server.tmp
del /f /q server.tmp 2>nul
if defined pid (
taskkill -f -pid !pid!
)
start "%SERVER_HUMP% Server" /B cmd /c "chcp 65001 && java !%SERVER_UPPER%_VM_PARAMS! -jar !%SERVER_UPPER%_MANAGE_BIN!"
echo Starting %SERVER_HUMP% Website...
cd web
cd dist && mkdir temp && cd temp && cp ../wsUrl.js .
sed -i "s/6680/18680/" wsUrl.js >nul
sed -i "s/6681/18280/" wsUrl.js >nul
sed -i "s/6682/18880/" wsUrl.js >nul
sed -i "s/6683/18480/" wsUrl.js >nul
cp wsUrl.js .. && cd .. && rm -rf temp && cd ..
taskkill -f -im %SERVER_LOWER%-web.exe >nul
start "%SERVER_HUMP% Website" /B cmd /c "%SERVER_LOWER%-web.exe -c conf\web.conf"
set MAX_WAIT=300
set CHECK_INTERVAL=5
set counter=0
echo Waiting for services to start...
echo.
:CHECK_LOOP
netstat -an | find ":%SERVER_PORT%" > nul
set server_up=%errorlevel%
netstat -an | find ":%WEBSITE_PORT%" > nul
set website_up=%errorlevel%
if !server_up! equ 0 if !website_up! equ 0 (
call :DISPLAY_SUCCESS
exit /b 0
)
set /a counter+=CHECK_INTERVAL
if !counter! geq %MAX_WAIT% (
echo Error: Services did not start within !counter! seconds
exit /b 1
)
timeout /t %CHECK_INTERVAL% /nobreak > nul
goto CHECK_LOOP
:DISPLAY_SUCCESS
:: =============================================
:: Status Display
:: =============================================
echo.
echo ========================================
echo %SERVER_HUMP% Services Successfully Started
echo ========================================
echo - %SERVER_HUMP% Server (Port: %SERVER_PORT%)
echo - %SERVER_HUMP% Website (Port: %WEBSITE_PORT%)
echo ========================================
echo.
endlocal
exit /b 0
pause

View File

@ -1,7 +1,7 @@
;iss
#define MyAppName "想定筹划"
#define MyAppVersion "1.0.6"
#define MyAppVersion "1.0.1"
#define MyAppPublisher "X"
#define MyAppURL "~"
#define MyAppExeName "scenario"
@ -13,7 +13,6 @@
#define MyAppFirstPath "XManage"
#define MyAppResources "Resources"
#define InstallPassword GetDateTimeString('yyyymmdd', '', '')
#define BuildTime GetDateTimeString('yyyymmddhhnnss', '', '')
@ -30,8 +29,8 @@ Encryption=yes
;SetupIconFile={#MyAppResources}\icon.ico
VersionInfoProductVersion={#MyAppVersion}
VersionInfoCompany=
VersionInfoDescription={#MyAppName}服务
VersionInfoCopyright=CopyRight © 2025
VersionInfoDescription=构建于 {#BuildTime}{#MyAppName}服务
VersionInfoProductName={#MyAppName}
@ -68,9 +67,7 @@ Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl"
;; 任务
[Tasks]
; 是否创建桌面图标
; checkablealone 默认选中
; unchecked 默认不选中
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

View File

@ -1,128 +1,19 @@
@echo off
setlocal enabledelayedexpansion
chcp 65001 >nul
title Simulation Quick Start
set SERVER_UPPER=SIMULATION
set SERVER_LOWER=simulation
set SERVER_HUMP=Simulation
set /a SERVER_PORT=28280
set /a WEBSITE_PORT=%SERVER_PORT%-10000
set modifyTitle=1
for %%a in (%*) do (
if /i "%%a"=="/notitle" set modifyTitle=0
cd %SIMULATION_MAIN%
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%"
)
if %modifyTitle% equ 1 (
title %SERVER_HUMP% Quick Start
)
:: =============================================
:: Validation
:: =============================================
if not defined !SERVER_UPPER!_MAIN (
echo [ERROR] !SERVER_UPPER!_MAIN environment variable is not defined
pause && exit /b 1
)
if not defined !SERVER_UPPER!_MANAGE_BIN (
echo [ERROR] !SERVER_UPPER!_MANAGE_BIN environment variable is not defined
pause && exit /b 1
)
if not defined !SERVER_UPPER!_VM_PARAMS (
echo Warning: !SERVER_UPPER!_VM_PARAMS environment variable is not defined
set %SERVER_UPPER%_VM_PARAMS=-Xms512m -Xmx2048m
)
cd /d "!%SERVER_UPPER%_MAIN!" 2>nul
if errorlevel 1 (
echo [ERROR] Directory not found: !%SERVER_UPPER%_MAIN!
echo Please verify %SERVER_UPPER%_MAIN environment variable
pause && exit /b 1
)
if not exist "!%SERVER_UPPER%_MANAGE_BIN!" (
echo [ERROR] Main JAR file not found: !%SERVER_UPPER%_MANAGE_BIN!
echo Please verify %SERVER_UPPER%_MANAGE_BIN environment variable
pause && exit /b 1
)
cd web 2>nul
if errorlevel 1 (
echo [ERROR] web directory does not exist in !%SERVER_UPPER%_MAIN!
pause && exit /b 1
)
if not exist "%SERVER_LOWER%-web.exe" (
echo [ERROR] %SERVER_LOWER%-web.exe does not exist in !%SERVER_UPPER%_MAIN!\web
pause && exit /b 1
)
if not exist "conf\web.conf" (
echo [ERROR] conf\web.conf does not exist in !%SERVER_UPPER%_MAIN!\web
pause && exit /b 1
)
:: =============================================
:: Service Launch
:: =============================================
cd ..
setlocal
echo Starting %SERVER_HUMP% Server...
jps -v | grep "\-Dserver.port=%SERVER_PORT%" | awk "{print $1}" >server.tmp
set /p pid=<server.tmp
del /f /q server.tmp 2>nul
if defined pid (
taskkill -f -pid !pid!
)
start "%SERVER_HUMP% Server" /B cmd /c "chcp 65001 && java -Dspring.profiles.active=test,mysql,redis,rocketmq,springdoc !%SERVER_UPPER%_VM_PARAMS! -jar !%SERVER_UPPER%_MANAGE_BIN!"
echo Starting %SERVER_HUMP% Website...
if exist "%SIMULATION_MANAGE_BIN%" (
cd web
taskkill -f -im %SERVER_LOWER%-web.exe >nul
start "%SERVER_HUMP% Website" /B cmd /c "%SERVER_LOWER%-web.exe -c conf\web.conf"
set MAX_WAIT=300
set CHECK_INTERVAL=5
set counter=0
echo Waiting for services to start...
echo.
:CHECK_LOOP
netstat -an | find ":%SERVER_PORT%" > nul
set server_up=%errorlevel%
netstat -an | find ":%WEBSITE_PORT%" > nul
set website_up=%errorlevel%
if !server_up! equ 0 if !website_up! equ 0 (
call :DISPLAY_SUCCESS
exit /b 0
start "Simulation Website" cmd /k "title Simulation Website && simulation-web.exe -c conf/web.conf"
)
set /a counter+=CHECK_INTERVAL
if !counter! geq %MAX_WAIT% (
echo Error: Services did not start within !counter! seconds
exit /b 1
)
echo Simulation:
echo - SimulationServer (Port: 28280)
echo - SimulationWebsite (Port: 18280)
timeout /t %CHECK_INTERVAL% /nobreak > nul
goto CHECK_LOOP
:DISPLAY_SUCCESS
:: =============================================
:: Status Display
:: =============================================
echo.
echo ========================================
echo %SERVER_HUMP% Services Successfully Started
echo ========================================
echo - %SERVER_HUMP% Server (Port: %SERVER_PORT%)
echo - %SERVER_HUMP% Website (Port: %WEBSITE_PORT%)
echo ========================================
echo.
endlocal
exit /b 0
pause

View File

@ -1,7 +1,7 @@
;iss
#define MyAppName "仿真实验"
#define MyAppVersion "1.0.6"
#define MyAppVersion "1.0.1"
#define MyAppPublisher "X"
#define MyAppURL "~"
#define MyAppExeName "simulation"
@ -13,7 +13,6 @@
#define MyAppFirstPath "XManage"
#define MyAppResources "Resources"
#define InstallPassword GetDateTimeString('yyyymmdd', '', '')
#define BuildTime GetDateTimeString('yyyymmddhhnnss', '', '')
@ -31,9 +30,9 @@ Encryption=yes
;UninstallDisplayIcon={app}\{#MyAppExeName}.exe
VersionInfoProductVersion={#MyAppVersion}
VersionInfoCompany=
VersionInfoDescription=仿真实验服务
VersionInfoCopyright=CopyRight © 2025
VersionInfoDescription=构建于 {#BuildTime}{#MyAppName}服务
VersionInfoProductName={#MyAppName}
VersionInfoProductName=仿真实验
; 默认配置
AppName={#MyAppName}
@ -68,9 +67,7 @@ Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl"
;; 任务
[Tasks]
; 是否创建桌面图标
; checkablealone 默认选中
; unchecked 默认不选中
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked