-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·31 lines (26 loc) · 774 Bytes
/
build.sh
File metadata and controls
executable file
·31 lines (26 loc) · 774 Bytes
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
29
30
31
#!/bin/env bash
echo Clean...
rm -rf ./bin
rm ./executable/executable.exe
rm ./sharedlib/main.o
rm ./sharedlib/Makefile
rm ./sharedlib/sharedlib.dll.so
echo Build PE executable...
cd ./executable
x86_64-w64-mingw32-g++ ./main.cpp -o ./executable.exe
cd ..
echo Build shared Wine lib...
cd ./sharedlib
winemaker --dll --nosource-fix .
make LDFLAGS="$LDFLAGS --fPIC"
cd ..
echo Prepare files...
mkdir ./bin
cp /usr/x86_64-w64-mingw32/bin/libgcc_s_seh-1.dll ./bin/libgcc_s_seh-1.dll
cp /usr/x86_64-w64-mingw32/bin/libstdc++-6.dll ./bin/libstdc++-6.dll
cp /usr/x86_64-w64-mingw32/bin/libwinpthread-1.dll ./bin/libwinpthread-1.dll
cp ./executable/executable.exe ./bin/executable.exe
cp ./sharedlib/sharedlib.dll.so ./bin/sharedlib.dll
echo Run...
cd ./bin
wine ./executable