Skip to content

Commit 651eaea

Browse files
author
bagheadspidey
committed
1 parent aced95e commit 651eaea

23 files changed

+131
-497
lines changed

build/build.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
# build for linux and windows
3+
cd ..
4+
5+
echo converting text files
6+
7+
cd tools
8+
g++ filechars.cpp -o ../filechars
9+
cd ..
10+
./filechars *.txt
11+
rm filechars
12+
13+
export BUILD_STATIC=1
14+
15+
cd src
16+
../build/linux-build.sh
17+
../build/cross-compile.sh
18+
cd ..
19+
20+
rm *.txt.h
21+
22+
echo preparing release packages
23+
24+
mkdir release/l; mkdir release/w
25+
export l=./release/l/unwad/
26+
export w=./release/w/unwad/
27+
mkdir $l; mkdir $w
28+
mkdir $l/magic; mkdir $w/magic
29+
cp magic/* $l/magic; cp magic/* $w/magic
30+
cp *.txt $l; cp *.txt $w
31+
mv src/unwad.static $l/unwad
32+
mv src/unwad.exe $w; cp dll/*.dll $w
33+
mv src/unwad build
34+
35+
cd ./release/l/
36+
rm ../linux/unwad.tar.gz
37+
tar -cvvf ../linux/unwad.tar unwad/
38+
gzip ../linux/unwad.tar
39+
40+
cd ../w/
41+
rm ../windows/unwad.zip
42+
zip -r ../windows/unwad.zip unwad/
43+
44+
cd ../.. ; rm -r release/l; rm -r release/w

build/cross-compile.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
# mingw32 cross-compile
3+
4+
cd ../include/minizip
5+
i586-mingw32msvc-gcc -c -I.. \
6+
-DWIN32=1 \
7+
minizip.c miniunz.c zip.c unzip.c ioapi.c iowin32.c
8+
cd ../qmus2mid
9+
i586-mingw32msvc-g++ -c \
10+
qmus2mid.cpp
11+
cd ../..
12+
13+
export includes="-I../include/pngpp -I../include -I.."
14+
export mz_dir=../include/minizip
15+
export qm_dir=../include/qmus2mid
16+
export bs="i586-mingw32msvc-g++ -DMSW=1 -Wall $includes unwad.cpp \
17+
$qm_dir/qmus2mid.o \
18+
$mz_dir/minizip.o $mz_dir/ioapi.o $mz_dir/iowin32.o $mz_dir/zip.o $mz_dir/unzip.o"
19+
export static="../lib/libmagic.dll.a ../lib/libpng.dll.a ../lib/libz.dll.a ../lib/libregex.dll.a"
20+
21+
cd src
22+
echo building unwad for windows
23+
#cp ../dll/* .
24+
$bs $static -o unwad.exe
25+
i586-mingw32msvc-strip unwad.exe
26+
#rm *.dll
27+
cd ..
28+
29+
30+
rm include/minizip/*.o
31+
rm include/qmus2mid/*.o

build/linux-build.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#~/bin/bash
2+
3+
# normal build
4+
5+
6+
cd ../include/minizip
7+
gcc -c -I.. \
8+
-Dunix=1 \
9+
minizip.c miniunz.c zip.c unzip.c ioapi.c
10+
cd ../qmus2mid
11+
g++ -c \
12+
qmus2mid.cpp
13+
cd ../..
14+
15+
export includes="-I../include/pngpp -I../include -I.."
16+
export mz_dir=../include/minizip
17+
export qm_dir=../include/qmus2mid
18+
export bs="g++ -Wall $includes unwad.cpp \
19+
$qm_dir/qmus2mid.o \
20+
$mz_dir/minizip.o $mz_dir/ioapi.o $mz_dir/zip.o $mz_dir/unzip.o"
21+
export linked="-lmagic -lpng -lz"
22+
export static="/usr/lib/libmagic.a /usr/lib/libpng.a /usr/lib/libz.a"
23+
24+
cd src
25+
echo building unwad
26+
$bs $linked -o unwad
27+
strip unwad
28+
if echo "$BUILD_STATIC" | grep -q "1"; then
29+
echo building unwad.static
30+
$bs $static -o unwad.static
31+
strip unwad.static
32+
fi
33+
cd ..
34+
35+
rm include/minizip/*.o
36+
rm include/qmus2mid/*.o

build/mingw-build.bat.example

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
echo X X
2+
echo X X
3+
echo X Warning: this batch file has not been tested. X
4+
echo X X
5+
echo X X
6+
7+
g++ filechars.cpp -o filechars.exe
8+
filechars readme.txt
9+
del filechars.exe
10+
11+
cd include\minizip
12+
gcc -c -DWIN32=1 -I.\include -I.. minizip.c miniunz.c zip.c unzip.c iowin32.c ioapi.c
13+
cd ..\..
14+
15+
g++ -Wall -DMSW=1 unwad.cpp qmus2mid.cpp -I./include -I./include/pngpp -Ldll -lmagic1 -lzlib1 -lregex2 -llibpng13 -o unwad.exe
16+
17+
cd include\minizip
18+
del *.o
19+
cd ..\..
File renamed without changes.
File renamed without changes.
File renamed without changes.

zlib1.dll renamed to dll/zlib1.dll

File renamed without changes.

doomsoundtoflac.cpp

Lines changed: 0 additions & 120 deletions
This file was deleted.

include/minizip/ChangeLogUnzip

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)