Hello,
We are just few user coding for GD, and maybe less on W10, but i share with you my scripts in batch for start GD (webapp & electron), and build gdevelop.js (LibGD.js).
My GDevelop
repo is in C:\
, You may need adapt this path with yours.
First script do :
- Npm install
- import gdjs
- install electron
- start GD
- Build GD
.
Manage_GD_dev.bat
@ECHO OFF
REM This file need node and yarn
REM Change only the path below
set GDLOCATION=C:\GDevelop
REM don't touch below this line
set newIDE_app=%GDLOCATION%\newIDE\app
set newIDE_app_scripts=%GDLOCATION%\newIDE\app\scripts
set newIDE_electron_app=%GDLOCATION%\newIDE\electron-app
rem CLS
:Start
ECHO =================================================
ECHO 1. Npm install
ECHO 2. Import GDJS
ECHO 3. Install Electron
ECHO 4. Start-GD (Web and Electron)
ECHO 5. Build
ECHO 6. Quit
ECHO =================================================
ECHO.
set /p op= Choice :
if "%op%"=="1" goto Install
if "%op%"=="2" goto Import-GDJS
if "%op%"=="3" goto Install-electron
if "%op%"=="4" goto Start-GD
if "%op%"=="5" goto Build
if "%op%"=="6" goto End
if "%op%"=="0" goto End
:Install
cd %newIDE_app%
call npm install
GOTO Start
:Import-GDJS
cd %newIDE_app%
cd public
del libGD.js /f /q
cd %newIDE_app_scripts%
call node import-GDJS-Runtime.js
GOTO Start
:Install-electron
cd %newIDE_electron_app%
yarn install
GOTO Start
:Start-GD
cd %newIDE_app%
cd public
REM del libGD.js /f /q
cd %newIDE_app%
start /min cmd.exe /c "npm start"
cd %newIDE_electron_app%
start /min cmd.exe /c "node node_modules\electron\cli.js app"
GOTO Start
:Build
cd %newIDE_electron_app%
call yarn build --win --linux
GOTO Start
:End
Second script build gdevelop.js (LibGD.js):
Build_libGD.bat
@echo off
cd C:\emsdk
REM search in env variable if emsdk exist
echo.%PATH%|findstr /C:"emsdk" >nul 2>&1
if not errorlevel 1 (
echo emsdk Found
start /B emsdk_env.bat
) else (
echo emsdk Not found
start /B emsdk activate sdk-1.37.37-64bit
ping -n 2 localhost >nul
)
start /B emsdk activate sdk-1.37.37-64bit
start /B emsdk_env.bat
cd C:\GDevelop\GDevelop.js
npm run build
pause>nul