Repository navigation
Expand file tree
/
Copy pathsetup.bat
More file actions
50 lines (45 loc) · 1.77 KB
/
Copy pathsetup.bat
File metadata and controls
50 lines (45 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@echo off
REM ============================================================================
REM bob's game web (okgame) -- Workspace and Submodule Setup Script (setup.bat)
REM ============================================================================
REM Initializes recursive git submodules:
REM - submodules/bobui (https://github.com/robertpelloni/bqt.git)
REM - submodules/bobui/submodules/juce (https://github.com/juce-framework/JUCE)
REM - submodules/bobui/submodules/ultimatepp (https://github.com/ultimatepp/ultimatepp)
REM Installs npm packages for the root web/Electron app and server/ backend,
REM and seeds .env.production from .env.production.example if absent.
REM ============================================================================
setlocal
title bobsgameweb - Setup
cd /d "%~dp0"
echo [bobsgameweb] Synchronizing recursive git submodules...
git submodule sync --recursive
git submodule update --init --recursive
if errorlevel 1 (
echo [bobsgameweb] WARNING: git submodule update returned non-zero status.
)
if not exist ".env.production" (
if exist ".env.production.example" (
echo [bobsgameweb] Creating .env.production from .env.production.example...
copy /Y ".env.production.example" ".env.production" >nul
)
)
echo [bobsgameweb] Installing root npm dependencies...
call npm install
if errorlevel 1 (
echo [bobsgameweb] ERROR: Root npm install failed.
exit /b %errorlevel%
)
if exist "server\package.json" (
echo [bobsgameweb] Installing server npm dependencies...
pushd server
call npm install
if errorlevel 1 (
popd
echo [bobsgameweb] ERROR: server npm install failed.
exit /b 1
)
popd
)
echo [bobsgameweb] Setup complete! Run build.bat to compile or start.bat to launch.
endlocal