Compare commits
2 Commits
6f9010bbc7
...
4446d382a2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4446d382a2 | ||
![]() |
d5e7ce974c |
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
## 编译流程
|
||||||
|
|
||||||
|
- 1、 运行 `resources-initialize.bat` 初始化默认资源获取目录
|
||||||
|
- 2、 dist 存放前端 build 内容
|
||||||
|
- 3、 script 将按照数据库名称,存放SQL脚本
|
||||||
|
- 4、 server 存放后端 jar
|
||||||
|
- 5、 web 存放 nginx 程序
|
||||||
|
- 6、 启动 `install-win7-simulation.iss` 进行编译,编译完成后 Release 文件夹中会出现编译后的安装包
|
||||||
|
- 7、 配合 base 编译后安装程序,形成完整运行环境,支持 Windows 7 运行
|
62
server/simulation/Resources/web/conf/simulation-windows.conf
Normal file
62
server/simulation/Resources/web/conf/simulation-windows.conf
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
server {
|
||||||
|
listen 18280;
|
||||||
|
server_name _;
|
||||||
|
gzip on;
|
||||||
|
gzip_min_length 1k;
|
||||||
|
gzip_comp_level 9;
|
||||||
|
gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_disable "MSIE [1-6]\.";
|
||||||
|
|
||||||
|
root dist;
|
||||||
|
include mime.types;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# location /login {
|
||||||
|
# proxy_pass http://127.0.0.1:28280/login;
|
||||||
|
# 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:28280/;
|
||||||
|
client_max_body_size 100M;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /dev-api/ {
|
||||||
|
proxy_pass http://127.0.0.1:28280/;
|
||||||
|
client_max_body_size 100M;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /file/ {
|
||||||
|
proxy_pass http://127.0.0.1:9000/;
|
||||||
|
client_max_body_size 5000M;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
error_page 405 =200 $request_uri;
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*';
|
||||||
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
||||||
|
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
|
||||||
|
if ($request_method = 'OPTIONS') {
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*';
|
||||||
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
||||||
|
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
|
||||||
|
add_header 'Access-Control-Max-Age' 1728000;
|
||||||
|
add_header 'Content-Type' 'text/plain charset=UTF-8';
|
||||||
|
add_header 'Content-Length' 0;
|
||||||
|
return 204;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
server/simulation/Resources/web/conf/web.conf
Normal file
11
server/simulation/Resources/web/conf/web.conf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
worker_processes 1;
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
include simulation-windows.conf;
|
||||||
|
}
|
@ -100,6 +100,12 @@ Source: "Resources\web\*"; DestDir: "{app}\{#MyAppExeName}\web"; Flags: ignoreve
|
|||||||
Source: "Resources\dist\*"; DestDir: "{app}\{#MyAppExeName}\web\dist"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: UI;
|
Source: "Resources\dist\*"; DestDir: "{app}\{#MyAppExeName}\web\dist"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: UI;
|
||||||
|
|
||||||
|
|
||||||
|
;; 创建必要目录
|
||||||
|
[Dirs]
|
||||||
|
Name: "{app}\{#MyAppExeName}\web\logs"; Permissions: users-modify; Components: Starter;
|
||||||
|
Name: "{app}\{#MyAppExeName}\web\temp"; Permissions: users-modify; Components: Starter;
|
||||||
|
|
||||||
|
|
||||||
;; 安装时注册表与环境变量列表
|
;; 安装时注册表与环境变量列表
|
||||||
[Registry]
|
[Registry]
|
||||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \
|
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user