Skip to content

Commit

Permalink
I am adding some building scripts for Pharo with Lowcode.
Browse files Browse the repository at this point in the history
  • Loading branch information
ronsaldo committed Jan 3, 2017
1 parent 5272c86 commit b2ca1dd
Show file tree
Hide file tree
Showing 10 changed files with 348 additions and 0 deletions.
@@ -0,0 +1,37 @@
#!/bin/bash -e
case "`uname -m`" in # ensure we see x86 as machine type
i*86) ;; # we're good
*) if type i386 2>&1 >/dev/null; then
echo "Re-exec as x86"
exec i386 "$0" "$@"
fi ;;
esac
# assert VM with VM profiler and itimer heartbeat
INSTALLDIR=assert/phcoglowcodelinuxht
OPT="-g3 -O1 -fwrapv -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DDEBUGVM=0"

if [ $# -ge 1 ]; then
INSTALLDIR="$1"; shift
fi

echo -n "clean? "
read a
case $a in
n|no|N|NO) echo "ok but this isn't safe!!";;
*) test -f Makefile && make reallyclean
esac
test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .)
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .)
test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak \
--with-vmversion=5.0 \
--with-src=spurlowcodesrc \
CC="gcc -m32" \
CXX="g++ -m32" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \
LIBS="-lpthread -luuid" \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR`
# but older linux readlinks lack the -f flag
make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG
40 changes: 40 additions & 0 deletions build.linux32x86/pharo.cog.lowcode/build.assert/mvm
@@ -0,0 +1,40 @@
#!/bin/bash -e
case "`uname -m`" in # ensure we see x86 as machine type
i*86) ;; # we're good
*) if type i386 2>&1 >/dev/null; then
echo "Re-exec as x86"
exec i386 "$0" "$@"
fi ;;
esac
# assert VM with VM profiler and threaded heartbeat
INSTALLDIR=assert/phcoglowcodelinuxht
OPT="-g3 -O1 -fwrapv -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DDEBUGVM=0"
OPT="$OPT -DPharoVM -DIMMUTABILITY=1"

if [ $# -ge 1 ]; then
INSTALLDIR="$1"; shift
fi

echo -n "clean? "
read a
case $a in
n|no|N|NO) echo "ok but this isn't safe!!";;
*) test -f Makefile && make reallyclean
esac
test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .)
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .)
test -f config.h || ../../../platforms/unix/config/configure \
--without-npsqueak \
--with-vmversion=5.0 \
--with-src=spurlowcodesrc \
CC="gcc -m32" \
CXX="g++ -m32" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0" \
LIBS="-lpthread -luuid" \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR`
# but older linux readlinks lack the -f flag
make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG
../../editpharoinstall.sh ../../../products/$INSTALLDIR "$@"
37 changes: 37 additions & 0 deletions build.linux32x86/pharo.cog.lowcode/build.debug.itimerheartbeat/mvm
@@ -0,0 +1,37 @@
#!/bin/bash -e
case "`uname -m`" in # ensure we see x86 as machine type
i*86) ;; # we're good
*) if type i386 2>&1 >/dev/null; then
echo "Re-exec as x86"
exec i386 "$0" "$@"
fi ;;
esac
# debug Spur VM with VM profiler and itimer heartbeat
INSTALLDIR=debug/phcoglowcodelinuxht
OPT="-g3 -O0 -fwrapv -DDEBUGVM=1"

if [ $# -ge 1 ]; then
INSTALLDIR="$1"; shift
fi

echo -n "clean? "
read a
case $a in
n|no|N|NO) echo "ok but this isn't safe!!";;
*) test -f Makefile && make reallyclean
esac
test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .)
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .)
test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak \
--with-vmversion=5.0 \
--with-src=spurlowcodesrc \
CC="gcc -m32" \
CXX="g++ -m32" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \
LIBS="-lpthread -luuid" \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR`
# but older linux readlinks lack the -f flag
make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG
40 changes: 40 additions & 0 deletions build.linux32x86/pharo.cog.lowcode/build.debug/mvm
@@ -0,0 +1,40 @@
#!/bin/bash -e
case "`uname -m`" in # ensure we see x86 as machine type
i*86) ;; # we're good
*) if type i386 2>&1 >/dev/null; then
echo "Re-exec as x86"
exec i386 "$0" "$@"
fi ;;
esac
# debug Spur VM with VM profiler and threaded heartbeat
INSTALLDIR=debug/phcoglowcodelinuxht
OPT="-g3 -O0 -fwrapv -DDEBUGVM=1"
OPT="$OPT -DPharoVM"

if [ $# -ge 1 ]; then
INSTALLDIR="$1"; shift
fi

echo -n "clean? "
read a
case $a in
n|no|N|NO) echo "ok but this isn't safe!!";;
*) test -f Makefile && make reallyclean
esac
test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .)
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .)
test -f config.h || ../../../platforms/unix/config/configure \
--without-npsqueak \
--with-vmversion=5.0 \
--with-src=spurlowcodesrc \
CC="gcc -m32" \
CXX="g++ -m32" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0" \
LIBS="-lpthread -luuid" \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR`
# but older linux readlinks lack the -f flag
make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG
../../editpharoinstall.sh ../../../products/$INSTALLDIR "$@"
58 changes: 58 additions & 0 deletions build.linux32x86/pharo.cog.lowcode/build.itimerheartbeat/mvm
@@ -0,0 +1,58 @@
#!/bin/bash -e
# PharoVM with VM profiler and itimer heartbeat

case "`uname -m`" in # ensure we see x86 as machine type
i*86) ;; # we're good
*) if type i386 2>&1 >/dev/null; then
echo "Re-exec as x86"
exec i386 "$0" "$@"
fi ;;
esac

THIRDPARTYLIBS="libsdl2 libssh2 libgit2"
INSTALLDIR=phcoglowcodelinuxht

# Some gcc versions create a broken VM using -O2
case `gcc -v 2>&1 | grep version | sed 's/gcc version *//'` in
3.4.*) OPT="-g -O1 -fwrapv -DNDEBUG -DDEBUGVM=0";;
*) OPT="-g -O2 -DNDEBUG -DDEBUGVM=0";;
esac
OPT="$OPT -DPharoVM -DIMMUTABILITY=1"

if [ $# -ge 1 ]; then
INSTALLDIR="$1"; shift
fi

echo -n "clean? "
read a
case $a in
n|no|N|NO) echo "ok but this isn't safe!!";;
*) test -f Makefile && make reallyclean
# for lib in ${THIRDPARTYLIBS}; do
# ../../third-party/${lib}/mvm clean
# done
esac
test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .)
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .)

for lib in ${THIRDPARTYLIBS}; do
../../third-party/${lib}/mvm
done

test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak \
--with-vmversion=5.0 \
--with-src=spurlowcodesrc \
CC="gcc -m32" \
CXX="g++ -m32" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \
LIBS="-lpthread -luuid" \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR`
# but older linux readlinks lack the -f flag
make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG
for lib in ${THIRDPARTYLIBS}; do
../../third-party/${lib}/mvm install `find ../../../products/$INSTALLDIR -name "5.0*"`
done
../../editpharoinstall.sh ../../../products/$INSTALLDIR "$@"
60 changes: 60 additions & 0 deletions build.linux32x86/pharo.cog.lowcode/build/mvm
@@ -0,0 +1,60 @@
#!/bin/bash -e
# PharoVM with VM profiler and threaded heartbeat
THIRDPARTYLIBS="libsdl2 libssh2 libgit2"

case "`uname -m`" in # ensure we see x86 as machine type
i*86) ;; # we're good
*) if type i386 2>&1 >/dev/null; then
echo "Re-exec as x86"
exec i386 "$0" "$@"
fi ;;
esac
# Spur VM with VM profiler and threaded heartbeat
INSTALLDIR=phcoglowcodelinuxht
# Some gcc versions create a broken VM using -O2
case `gcc -v 2>&1 | grep version | sed 's/gcc version *//'` in
3.4.*) OPT="-g -O1 -fwrapv -DNDEBUG -DDEBUGVM=0";;
*) OPT="-g -O2 -DNDEBUG -DDEBUGVM=0";;
esac
OPT="$OPT -DPharoVM -DIMMUTABILITY=1"

if [ $# -ge 1 ]; then
INSTALLDIR="$1"; shift
fi

echo -n "clean? "
read a
case $a in
n|no|N|NO) echo "ok but this isn't safe!!";;
*)
test -f Makefile && make reallyclean
# for lib in ${THIRDPARTYLIBS}; do
# ../../third-party/${lib}/mvm clean
# done
esac

test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .)
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .)

for lib in ${THIRDPARTYLIBS}; do
../../third-party/${lib}/mvm
done

test -f config.h || ../../../platforms/unix/config/configure \
--without-npsqueak \
--with-vmversion=5.0 \
--with-src=spurlowcodesrc \
CC="gcc -m32" \
CXX="g++ -m32" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0" \
LIBS="-lpthread -luuid" \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR`
# but older linux readlinks lack the -f flag
make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG
for lib in ${THIRDPARTYLIBS}; do
../../third-party/${lib}/mvm install `find ../../../products/$INSTALLDIR -name "5.0*"`
done
../../editpharoinstall.sh ../../../products/$INSTALLDIR "$@"
15 changes: 15 additions & 0 deletions build.linux32x86/pharo.cog.lowcode/makeallclean
@@ -0,0 +1,15 @@
#!/bin/sh -e
trap 'exit 2' HUP INT PIPE TERM
if [ "$1" = -fork ]; then
shift
for d in `dirname $0`/build*; do
(cd ./$d
echo y | ./mvm "$@") &
done
wait
else
for d in `dirname $0`/build*; do
(cd ./$d
echo y | ./mvm "$@")
done
fi
15 changes: 15 additions & 0 deletions build.linux32x86/pharo.cog.lowcode/makealldirty
@@ -0,0 +1,15 @@
#!/bin/sh -e
trap 'exit 2' HUP INT PIPE TERM
if [ "$1" = -fork ]; then
shift
for d in `dirname $0`/build*; do
(cd ./$d
echo n | ./mvm "$@") &
done
wait
else
for d in `dirname $0`/build*; do
(cd ./$d
echo n | ./mvm "$@")
done
fi
12 changes: 12 additions & 0 deletions build.linux32x86/pharo.cog.lowcode/plugins.ext
@@ -0,0 +1,12 @@
# Copied, perhaps edited, from ../src/examplePlugins.ext
EXTERNAL_PLUGINS = \
B3DAcceleratorPlugin \
FT2Plugin \
JPEGReaderPlugin \
JPEGReadWriter2Plugin \
RePlugin \
InternetConfigPlugin \
SurfacePlugin \
EventsHandlerPlugin \
# SDL2DisplayPlugin \

34 changes: 34 additions & 0 deletions build.linux32x86/pharo.cog.lowcode/plugins.int
@@ -0,0 +1,34 @@
# Copied, perhaps edited, from ../src/examplePlugins.int
INTERNAL_PLUGINS = \
ADPCMCodecPlugin \
AsynchFilePlugin \
B2DPlugin \
BitBltPlugin \
BMPReadWriterPlugin \
CroquetPlugin \
ZipPlugin \
DropPlugin \
DSAPrims \
FFTPlugin \
FileCopyPlugin \
FilePlugin \
FloatArrayPlugin \
FloatMathPlugin \
SqueakFFIPrims \
IA32ABI \
JoystickTabletPlugin \
LargeIntegers \
Matrix2x3Plugin \
MIDIPlugin \
MiscPrimitivePlugin \
Mpeg3Plugin \
SecurityPlugin \
SerialPlugin \
SocketPlugin \
SoundCodecPrims \
SoundGenerationPlugin \
SoundPlugin \
StarSqueakPlugin \
LocalePlugin \
UnixOSProcessPlugin \
#Klatt \

0 comments on commit b2ca1dd

Please sign in to comment.