Skip to content

Commit

Permalink
fix paths too long issue on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
slatinsky committed Feb 8, 2023
1 parent f5b55d6 commit 57fc4b8
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- name: Create directories
run: |
mkdir -p build\exports
mkdir -p build\registry_tweaks
mkdir -p build\dcef\backend\preprocess
mkdir -p build\dcef\backend\nginx\conf
mkdir -p build\dcef\backend\nginx\logs
Expand Down Expand Up @@ -72,6 +73,9 @@ jobs:
Copy-Item -Path release\exports\* -Destination build\exports -Recurse
cp release\START_VIEWER.bat build\START_VIEWER.bat
cp release\clear_database.bat build\clear_database.bat
cp release\registry_tweaks\change_260_character_path_limit_to_32767.reg build\registry_tweaks\change_260_character_path_limit_to_32767.reg
cp release\registry_tweaks\restore_260_character_path_limit.reg build\registry_tweaks\restore_260_character_path_limit.reg
cp release\registry_tweaks\README.txt build\registry_tweaks\README.txt
- name: Upload build folder
uses: actions/upload-artifact@v2
Expand Down
34 changes: 23 additions & 11 deletions backend/nginx/conf/nginx-prod.conf
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
daemon off;



#user nobody;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
error_log dcef/backend/nginx/logs/error.log;


#error_log dcef/backend/nginx/logs/error.log notice;
#error_log dcef/backend/nginx/logs/error.log info;

#pid logs/nginx.pid;

Expand All @@ -16,6 +19,15 @@ events {


http {
client_body_temp_path dcef/backend/nginx/temp/;
proxy_temp_path dcef/backend/nginx/temp/;
fastcgi_temp_path dcef/backend/nginx/temp/;
uwsgi_temp_path dcef/backend/nginx/temp/;
scgi_temp_path dcef/backend/nginx/temp/;
access_log dcef/backend/nginx/logs/access.log;
error_log dcef/backend/nginx/logs/error.log;

log_not_found on;
include mime.types;
default_type application/octet-stream;

Expand All @@ -34,26 +46,26 @@ http {
listen 21011;
server_name localhost;

root ../../../;
root ./;
autoindex on;

location /_app/ {
root ../../../dcef/frontend/;
root dcef/frontend/;
}
location /css/ {
root ../../../dcef/frontend/;
root dcef/frontend/;
}
location /js/ {
root ../../../dcef/frontend/;
root dcef/frontend/;
}
location /fonts/ {
root ../../../dcef/frontend/;
root dcef/frontend/;
}
location /input/ {
alias ../../../exports/;
alias exports/;
}
location /data/ {
alias ../../backend/preprocess/temp/;
alias dcef/backend/preprocess/temp/;
}
location /api/ {
rewrite ^/api/(.*) /$1 break;
Expand All @@ -63,7 +75,7 @@ http {
proxy_http_version 1.1;
}
location / {
root ../../../dcef/frontend/;
root dcef/frontend/;
try_files $uri $uri/ /index.html;
}

Expand Down
3 changes: 2 additions & 1 deletion release/START_VIEWER.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ cd ../../..
cd dcef/backend/nginx
if not exist logs mkdir logs
if not exist temp mkdir temp
start "nginx" nginx.exe -c .\conf\nginx-prod.conf
cd ../../..
if not exist logs mkdir logs
start "nginx" ./dcef/backend/nginx/nginx.exe -c ./dcef/backend/nginx/conf/nginx-prod.conf

cd dcef/backend/fastapi
start "fastapi" fastapi.exe
Expand Down
3 changes: 3 additions & 0 deletions release/registry_tweaks/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
In case of problems with paths too long on Windows, run `change_260_character_path_limit_to_32767.reg` and restart your computer.

To rollback the changes, run `restore_260_character_path_limit.reg` and restart your computer.
Binary file not shown.
Binary file not shown.

0 comments on commit 57fc4b8

Please sign in to comment.