forked from stefansundin/altdrag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·28 lines (20 loc) · 1.35 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash -ex
# sudo apt-get install gcc-mingw-w64 nsis
mkdir -p bin
i686-w64-mingw32-windres -o bin/altdrag.o include/altdrag.rc
i686-w64-mingw32-windres -o bin/hooks.o include/hooks.rc
x86_64-w64-mingw32-windres -o bin/hookwindows_x64.o include/hookwindows_x64.rc
x86_64-w64-mingw32-windres -o bin/hooks_x64.o include/hooks.rc
if [[ "$1" == "release" ]]; then
i686-w64-mingw32-gcc -o bin/AltDrag.exe altdrag.c bin/altdrag.o -mwindows -lshlwapi -lwininet -lcomctl32 -O2 -s
i686-w64-mingw32-gcc -o bin/hooks.dll hooks.c bin/hooks.o -mdll -lshlwapi -lcomctl32 -lpsapi -lole32 -O2 -s
x86_64-w64-mingw32-gcc -o bin/HookWindows_x64.exe hookwindows_x64.c bin/hookwindows_x64.o -mwindows -lshlwapi -O2 -s
x86_64-w64-mingw32-gcc -o bin/hooks_x64.dll hooks.c bin/hooks_x64.o -mdll -lshlwapi -lcomctl32 -lpsapi -O2 -s
makensis -V2 installer.nsi
(cd bin && sha256sum *.exe *.dll > sha256sum.txt)
else
i686-w64-mingw32-gcc -o AltDrag.exe altdrag.c bin/altdrag.o -mwindows -lshlwapi -lwininet -lcomctl32 -lole32 -g -DDEBUG
i686-w64-mingw32-gcc -o hooks.dll hooks.c bin/hooks.o -mdll -lshlwapi -lcomctl32 -lpsapi -lole32 -g -DDEBUG
x86_64-w64-mingw32-gcc -o HookWindows_x64.exe hookwindows_x64.c bin/hookwindows_x64.o -mwindows -lshlwapi -g -DDEBUG
x86_64-w64-mingw32-gcc -o hooks_x64.dll hooks.c bin/hooks_x64.o -mdll -lshlwapi -lcomctl32 -lpsapi -lole32 -g -DDEBUG
fi