mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Tools: Added build scripts for Windows
This commit is contained in:
parent
931e7a7795
commit
b44ecc1958
16
ElectronClient/build.bat
Normal file
16
ElectronClient/build.bat
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
SET mypath=%~dp0
|
||||||
|
set script_dir=%mypath:~0,-1%
|
||||||
|
|
||||||
|
xcopy /C /I /H /R /Y /S /Q %script_dir%\..\ReactNativeClient\lib %script_dir%\app\lib
|
||||||
|
REM if %errorlevel% neq 0 exit /b %errorlevel%
|
||||||
|
|
||||||
|
rem Note that TypeScript must be installed globally for this to work
|
||||||
|
cd %script_dir%\..
|
||||||
|
call tsc
|
||||||
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||||
|
|
||||||
|
cd %script_dir%\app
|
||||||
|
call npm run compile
|
||||||
|
REM if %errorlevel% neq 0 exit /b %errorlevel%
|
@ -5,24 +5,8 @@ BUILD_DIR="$ROOT_DIR/app"
|
|||||||
|
|
||||||
rsync -a --delete "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/"
|
rsync -a --delete "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/"
|
||||||
|
|
||||||
|
cd "$ROOT_DIR/.."
|
||||||
|
npm run tsc
|
||||||
|
|
||||||
cd "$BUILD_DIR"
|
cd "$BUILD_DIR"
|
||||||
npm run compile
|
npm run compile
|
||||||
|
|
||||||
# for JSX_FILE in "$BUILD_DIR"/gui/*.jsx; do
|
|
||||||
# JS_FILE="${JSX_FILE::-4}.min.js"
|
|
||||||
# if [ $JSX_FILE -nt $JS_FILE ]; then
|
|
||||||
# echo "Compile $JS_FILE..."
|
|
||||||
# "$ROOT_DIR/app/node_modules/.bin/babel" --presets react "$JSX_FILE" > "$JS_FILE"
|
|
||||||
# if [[ $? != 0 ]]; then
|
|
||||||
# exit 1
|
|
||||||
# fi
|
|
||||||
# fi
|
|
||||||
# done
|
|
||||||
|
|
||||||
# TRANSLATION_BUILD_SCRIPT="$ROOT_DIR/../CliClient/build/build-translation.js"
|
|
||||||
# if [[ ! -f $TRANSLATION_BUILD_SCRIPT ]]; then
|
|
||||||
# echo "Build the CLI app first ($TRANSLATION_BUILD_SCRIPT missing)"
|
|
||||||
# exit 1
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# node "$TRANSLATION_BUILD_SCRIPT" --silent
|
|
9
ElectronClient/run.bat
Normal file
9
ElectronClient/run.bat
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
SET mypath=%~dp0
|
||||||
|
set script_dir=%mypath:~0,-1%
|
||||||
|
call build.bat
|
||||||
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||||
|
|
||||||
|
cd %script_dir%\app
|
||||||
|
call .\node_modules\.bin\electron.cmd . --env dev --log-level debug --no-welcome --open-dev-tools "$@"
|
Loading…
Reference in New Issue
Block a user