mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-22 08:30:35 +00:00
Added structure to MinGW/Win32 compile.
This commit is contained in:
parent
a9ea9738c0
commit
5ef9a886b1
@ -1,20 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
#SWT_CLASSES=$(cd org; find . -name "*.class" -print | sed 's#^\./#org/#')
|
||||
|
||||
#for i in $SWT_CLASSES
|
||||
#do
|
||||
# OBJ_FILE=$(echo $i | sed 's/\//_/g' | sed 's/\.class$/\.o/')
|
||||
# echo Compiling $i to $OBJ_FILE
|
||||
# gcj -fjni -g0 -c -o $OBJ_FILE $i
|
||||
#done
|
||||
|
||||
#gcj -c --resource=org.eclipse.swt.internal.SWTMessages \
|
||||
# -o SWTMessages.o org/eclipse/swt/internal/SWTMessages.properties
|
||||
|
||||
|
||||
APPLECOMMANDER_FILES=$(cd com; find . -name "*.java" -print | sed 's#^\./#com/#')
|
||||
|
||||
echo "**********************************************"
|
||||
echo "** COMPILING **"
|
||||
echo "**********************************************"
|
||||
echo
|
||||
for i in $APPLECOMMANDER_FILES
|
||||
do
|
||||
OBJ_FILE=$(echo $i | sed 's/\//_/g' | sed 's/\.java$/\.o/')
|
||||
@ -22,18 +13,55 @@ do
|
||||
gcj --classpath="swt.jar;AppleCommander.jar" -g0 -c -o $OBJ_FILE $i
|
||||
done
|
||||
|
||||
gcj -c --resource=com.webcodepro.applecommander.storage.FormattedDisk \
|
||||
-o FormattedDisk.o com/webcodepro/applecommander/storage/AppleCommander-boot.dump
|
||||
gcj -c --resource=com.webcodepro.applecommander.storage.ProdosFileEntry \
|
||||
-o ProdosFileEntry.o com/webcodepro/applecommander/storage/ProdosFileTypes.properties
|
||||
gcj -c --resource=com.webcodepro.applecommander.ui.swt.ImageManager \
|
||||
-o ImageManager.o com/webcodepro/applecommander/ui/images/*.gif
|
||||
echo "**********************************************"
|
||||
echo "** RESOURCES **"
|
||||
echo "**********************************************"
|
||||
echo
|
||||
for i in $(ls com/webcodepro/applecommander/ui/images/*.gif \
|
||||
com/webcodepro/applecommander/storage/*.dump \
|
||||
com/webcodepro/applecommander/storage/*.properties)
|
||||
do
|
||||
FILENAME=$(basename $i)
|
||||
OBJ=$FILENAME.o
|
||||
echo Compiling resource $i
|
||||
gcj -c --resource=$i -o $OBJ $i
|
||||
done
|
||||
|
||||
#gcj -mwindows --classpath="swt.jar;AppleCommander.jar" \
|
||||
# --main=com.webcodepro.applecommander.ui.swt.SwtAppleCommander \
|
||||
# -o AppleCommander *.o -L. -lswt
|
||||
echo "**********************************************"
|
||||
echo "** BUILD EXE **"
|
||||
echo "**********************************************"
|
||||
echo
|
||||
gcj -mwindows --classpath="swt.jar;AppleCommander.jar" \
|
||||
--main=com.webcodepro.applecommander.ui.AppleCommander \
|
||||
-o AppleCommander *.o -L. -lswt
|
||||
|
||||
echo Done.
|
||||
echo "**********************************************"
|
||||
echo "** CLEAN **"
|
||||
echo "**********************************************"
|
||||
echo
|
||||
rm *.o
|
||||
|
||||
echo "**********************************************"
|
||||
echo "** STRIPPING EXE **"
|
||||
echo "**********************************************"
|
||||
echo
|
||||
strip -x AppleCommander.exe -o AppleCommander-strip.exe
|
||||
|
||||
# Only run UPX if it is on the command path:
|
||||
UPX=$(type -p upx)
|
||||
if [ "$UPX" ] && [ -x $UPX ]
|
||||
then
|
||||
echo "**********************************************"
|
||||
echo "** PACKING EXE WITH UPX **"
|
||||
echo "** (will need to choose the smallest exe..) **"
|
||||
echo "**********************************************"
|
||||
echo
|
||||
upx --best --crp-ms=999999 --nrv2b -o AppleCommander-strip-nrv2b.exe AppleCommander-strip.exe
|
||||
upx --best --crp-ms=999999 --nrv2d -o AppleCommander-strip-nrv2d.exe AppleCommander-strip.exe
|
||||
upx --best --crp-ms=999999 -o AppleCommander-strip-upxbest.exe AppleCommander-strip.exe
|
||||
upx -o AppleCommander-strip-upxdefault.exe AppleCommander-strip.exe
|
||||
fi
|
||||
|
||||
echo "**********************************************"
|
||||
echo "** DONE!! **"
|
||||
echo "**********************************************"
|
||||
|
Loading…
Reference in New Issue
Block a user