initial commit

This commit is contained in:
Colin Yates 2018-08-06 17:40:06 +01:00
commit 616d834838
10 changed files with 99 additions and 0 deletions

17
scripts/build-linux.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
my_pwd=`pwd`
echo "Currently in $my_pwd"
mkdir -p /workdir/linux
cp -Rp * /workdir/linux/
rm -rf /workdir/linux/src/nimcache
cd /workdir/linux
nimble c --cpu:amd64 --os:linux --opt:speed --embedsrc --threads:on --checks:on -c -d:release src/*.nim
cd src
cp /opt/Nim/lib/nimbase.h nimcache
gcc -o linux.exe nimcache/*.c
cp linux.exe $my_pwd/dist/
echo "Copied linux.exe to $my_pwd/dist"
cd $my_pwd

18
scripts/build-windows.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/bash
my_pwd=`pwd`
echo "Currently in $my_pwd"
mkdir -p /workdir/windows
cp -Rp * /workdir/windows/
rm -rf /workdir/windows/src/nimcache
cd /workdir/windows
nimble c --cpu:amd64 --os:windows --opt:speed --embedsrc --threads:on --checks:on -c -d:release src/*.nim
cd src
cp /opt/Nim/lib/nimbase.h nimcache/
x86_64-w64-mingw32-gcc --save-temps nimcache/*.c -o windows.exe
cp windows.exe $my_pwd/dist/
echo "Copied windows.exe to $my_pwd/dist"
cd $my_pwd

9
scripts/build.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
mkdir /workdir
mkdir -p dist
# download the various caches and dependencies
nimble install -d -y
/scripts/build-linux.sh
/scripts/build-windows.sh