linux build script

This commit is contained in:
SpikeHD 2022-04-25 16:32:19 -07:00
parent c9ffc9c8c3
commit c7f973ac61
3 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,23 @@
# !/bin/bash
# Clean dist
rm -rf ./dist
# build
neu build
# copy scripts and langs
cp -r ./scripts ./dist/GrassClipper
cp -r ./proxy ./dist/GrassClipper
cp -r ./languages ./dist/GrassClipper
# copy backgrounds
mkdir ./dist/GrassClipper/resources/
mkdir ./dist/GrassClipper/resources/bg
mkdir ./dist/GrassClipper/resources/bg/private
mkdir ./dist/GrassClipper/resources/bg/server
cp -r ./resources/bg/private/* ./dist/GrassClipper/resources/bg/private
cp -r ./resources/bg/server/* ./dist/GrassClipper/resources/bg/server
# rename exe
mv ./dist/GrassClipper/GrassClipper-win_x64.exe ./dist/GrassClipper/GrassClipper.exe

View File

@ -8,7 +8,7 @@ rd /s /q .\dist
call neu build
:: Copy scripts and langs
xcopy .\languages\ .\dist\GrassClipper\langauges\ /y /s
xcopy .\languages\ .\dist\GrassClipper\languages\ /y /s
xcopy .\proxy\ .\dist\GrassClipper\proxy\ /y /s
xcopy .\scripts\ .\dist\GrassClipper\scripts\ /y /s

View File

@ -6,6 +6,8 @@
"license": "Apache-2.0",
"scripts": {
"dev": "neu run",
"build-win": ".\\build_win.cmd",
"build-linux": "./build.sh",
"build": "npm run clean_dist && neu build && npm run move_files && npm run move_bgs && npm run rename_exe",
"move_files": "cp -r ./languages ./dist/GrassClipper && cp -r ./proxy ./dist/GrassClipper && cp -r ./scripts ./dist/GrassClipper",
"move_bgs": "mkdir dist\\GrassClipper\\resources\\bg\\private && cp -r ./resources/bg/private ./dist/GrassClipper/resources/bg && cp -r ./resources/bg/server ./dist/GrassClipper/resources/bg",