Commit 6d059cc3 authored by Scott Duensing's avatar Scott Duensing

Working on installer and build scripts.

parent 991bf65a
......@@ -8,9 +8,14 @@ function doPCBuild() {
local OSNAME=$1
local OSARCH=$2
local EXT=$3
local DEST=${TARGET}/${OSNAME}/${OSARCH}
local G_CFLAGS="-Wall -D_REENTRANT_ -I${JOEY}/dist"
echo '-------------------------------------------------------------------------------'
echo "Building ${OSNAME} ${OSARCH}"
echo '-------------------------------------------------------------------------------'
# Clean up target and working directories
if [ -d ${DEST} ]; then
......@@ -33,7 +38,7 @@ function doPCBuild() {
done
# Link source & JoeyLib
${CC} -o ${DEST}/${PROJECT} ${OFILES} ${JOEY}/dist/${OSNAME}/${OSARCH}/libjoeylib.a -lstdc++ ${LDFLAGS}
${CC} -o ${DEST}/${PROJECT}${EXT} ${OFILES} ${JOEY}/dist/${OSNAME}/${OSARCH}/libjoeylib.a ${LDFLAGS}
# Copy game data
mkdir -p ${DEST}/data
......@@ -46,32 +51,32 @@ function doPCBuild() {
function buildLinux32() {
CC="gcc"
CFLAGS="-m32"
LDFLAGS=""
doPCBuild linux x86
LDFLAGS="-m32 -lstdc++ -lm -ldl -lpthread"
doPCBuild linux x86 ''
}
function buildLinux64() {
CC="gcc"
CFLAGS=""
LDFLAGS="-lm -lpthread -ldl"
doPCBuild linux x64
LDFLAGS="-lstdc++ -lm -ldl -lpthread"
doPCBuild linux x64 ''
}
function buildWindows32() {
CC="i686-w64-mingw32-gcc"
CFLAGS=""
LDFLAGS="-lgdi32 -lwinmm -limm32 -lversion -lole32 -loleaut32 -lsetupapi"
doPCBuild windows x86
LDFLAGS="-lgdi32 -lwinmm -limm32 -lversion -lole32 -loleaut32 -lsetupapi -static -lstdc++"
doPCBuild windows x86 '.exe'
}
function buildWindows64() {
CC="x86_64-w64-mingw32-gcc"
CFLAGS=""
LDFLAGS="-lgdi32 -lwinmm -limm32 -lversion -lole32 -loleaut32 -lsetupapi"
doPCBuild windows x64
LDFLAGS="-lgdi32 -lwinmm -limm32 -lversion -lole32 -loleaut32 -lsetupapi -static -lstdc++"
doPCBuild windows x64 '.exe'
}
......@@ -79,7 +84,7 @@ function buildmacOS32() {
CC="o32-clang"
CFLAGS=""
LDFLAGS=""
doPCBuild macos x86
doPCBuild macos x86 ''
}
......@@ -87,5 +92,5 @@ function buildmacOS64() {
CC="o64-clang"
CFLAGS=""
LDFLAGS=""
doPCBuild macos x64
doPCBuild macos x64 ''
}
#!/bin/false
# DO NOT RUN WITHOUT EDITING. THIS IS DOCUMENTATION.
apt-get -y install lhasa
wget http://sun.hasenbraten.de/vasm/release/vasm.tar.gz
wget http://sun.hasenbraten.de/vlink/release/vlink.tar.gz
wget http://www.ibaug.de/vbcc/vbcc.tar.gz
CURRENT="2017-08-14"
wget http://server.owl.de/~frank/vbcc/${CURRENT}/vbcc_target_m68k-amigaos.lha
wget http://server.owl.de/~frank/vbcc/${CURRENT}/vbcc_target_m68k-atari.lha
wget http://server.owl.de/~frank/vbcc/${CURRENT}/vbcc_unix_config.tar
# We download this but don't set it up
wget http://www.haage-partner.de/download/AmigaOS/NDK39.lha
tar xzf vasm.tar.gz
tar xzf vlink.tar.gz
tar xzf vbcc.tar.gz
pushd vasm
make CPU=m68k SYNTAX=mot
popd
pushd vlink
mkdir -p objects
make
popd
pushd vbcc
mkdir -p bin
make TARGET=m68k
make TARGET=m68ks
popd
export VBCC=$(pwd)/sdks/vbcc
mkdir -p ${VBCC}/targets
cp vasm/{vasmm68k_mot,vobjdump} ${VBCC}/bin/.
cp vlink/vlink ${VBCC}/bin/.
cp vbcc/bin/* ${VBCC}/bin/.
tar xzf vbcc_unix_config.tar.gz
mv config ${VBCC}/.
lha x vbcc_target_m68k-amigaos.lha
mv vbcc_target_m68k-amigaos/targets/m68k-amigaos ${VBCC}/targets/.
rm vbcc_target_m68k-amigaos.info
rm -rf vbcc_target_m68k-amigaos
lha x vbcc_target_m68k-atari.lha
mv vbcc_target_m68k-atari/targets/m68k-amigaos ${VBCC}/targets/.
rm vbcc_target_m68k-atari.info
rm -rf vbcc_target_m68k-atari
mkdir -p sdks/amiga
pushd sdks/amiga
lha x ../../NDK39.lha
popd
export PATH=$VBCC/bin:$PATH
#!/bin/bash -e
pushd ${GOLDEN_GATE}
#find . -type d -exec chmod 755 {} \;
#find . -type f -exec chmod 644 {} \;
for x in etc/* ; do iix chtyp -t txt "$x" ; done
for x in lib/* ; do if [ -f "$x" ] ; then iix chtyp -t lib "$x" ; fi ; done
for x in usr/lib/lib* ; do iix chtyp -t lib "$x" ; done
for x in usr/lib/tmac/* ; do iix chtyp -t txt "$x" ; done
for x in bin/* ; do iix chtyp -t exe "$x" ; done
for x in usr/bin/* ; do iix chtyp -t exe "$x" ; done
for x in usr/local/bin/* ; do iix chtyp -t exe "$x" ; done
for f in Languages/* ; do if [ -f "$f" ] ; then iix chtyp -t exe "$f" ; fi ; done ;
for f in Utilities/Help/* ; do if [ -f "$f" ] ; then iix chtyp -t txt "$f" ; fi ; done ;
for f in Utilities/* ; do if [ -f "$f" ] ; then iix chtyp -t exe "$f" ; fi ; done ;
for f in Libraries/* ; do if [ -f "$f" ] ; then iix chtyp -t lib "$f" ; fi ; done ;
for f in Libraries/AInclude/* ; do if [ -f "$f" ] ; then iix chtyp -t txt "$f" ; fi ; done ;
for f in Libraries/APWCInclude/* ; do if [ -f "$f" ] ; then iix chtyp -t txt "$f" ; fi ; done ;
for f in Libraries/AppleUtil/* ; do if [ -f "$f" ] ; then iix chtyp -t txt "$f" ; fi ; done ;
for f in Libraries/ORCACDefs/* ; do if [ -f "$f" ] ; then iix chtyp -l cc "$f" ; fi ; done ;
for f in Libraries/ORCAInclude/* ; do if [ -f "$f" ] ; then iix chtyp -l asm "$f" ; fi ; done ;
for f in Libraries/RInclude/* ; do if [ -f "$f" ] ; then iix chtyp -l rez "$f" ; fi ; done ;
for f in Libraries/Tool.Interface/* ; do if [ -f "$f" ] ; then iix chtyp -l pascal "$f" ; fi ; done ;
for f in Libraries/GSoftDefs/* ; do if [ -f "$f" ] ; then iix chtyp -t 0x5e -a 0x8007 "$f" ; fi ; done ;
for f in Libraries/ORCAPascalDefs/* ; do if [ -f "$f" ] ; then iix chtyp -t 0x5e -a 0x8009 "$f" ; fi ; done ;
for f in Libraries/m2defs/* ; do if [ -f "$f" ] ; then iix chtyp -t 0x5e -a 0x8006 "$f" ; fi ; done ;
popd
\ No newline at end of file
......@@ -167,6 +167,7 @@ installGsPlus() {
unzip harddrive_image.zip
mv -f "System 6 and Free Games.hdv" "${IIGS}/gsplus/System601.po"
echo "s7d1 = System601.po\n\ng_limit_speed = 0\n" > "${IIGS}/gsplus/config.txt"
echo "s7d1 = System601.po\ns7d2 = /tmp/IIgs/import.po\n" > "${IIGS}/gsplus/IIgsTest.cfg"
}
......
#!/bin/bash
# --- Joey Development Below Here ---
export JOEY="/home/scott/joey"
# Amiga & Atari ST Cross Compiler
export VBCC="${JOEY}/sdks/vbcc"
export PATH="${VBCC}/bin:${PATH}"
# IIgs Runtime & ORCA Compilers
export GOLDEN_GATE="${JOEY}/sdks/IIgs/ORCA"
export PATH="${JOEY}/sdks/IIgs:${PATH}"
# macOS Cross Compiler
export MACOSX_DEPLOYMENT_TARGET=10.6
export PATH="${JOEY}/sdks/macos/bin:${PATH}"
# Raspberry Pi Cross Compiler
#export PATH="${JOEY}/sdks/pi/tools/arm-bcm2708/arm-bmc2708-linux-gnueabi/bin:${PATH}"
#export PATH="${JOEY}/sdks/pi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:${PATH}"
#export PATH="${JOEY}/sdks/pi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin:${PATH}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment