Skip to content

Commit

Permalink
Fixed building on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kozec committed Dec 29, 2018
1 parent ad641f6 commit dfd14d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 10 additions & 6 deletions make-win32-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,25 @@ GTK_LIBS=(libgtk-3-0.dll libgdk-3-0.dll libharfbuzz-0.dll libfreetype-6.dll
)
DRIVERS=(sc_by_cable sc_dongle)

meson build-win32
ninja -C build-win32 || exit 1
meson $1
ninja -C $1 || exit 1

mkdir -p release-win32
for d in default_profiles default_menus osd_styles ; do
cp -vr $d release-win32/
done

cp -v build-win32/src/daemon/scc-daemon.exe release-win32/
cp -v build-win32/src/osd/scc-osd-menu.exe release-win32/
cp -v build-win32/src/daemon/uinput-win32/libvigemclient.dll release-win32/
cp -v $1/src/daemon/scc-daemon.exe release-win32/
cp -v $1/src/osd/scc-osd-menu.exe release-win32/
# cp -v $1/src/daemon/uinput-win32/libvigemclient.dll release-win32/

for dll in $(find $1 -name "*.dll" -not -name "libscc-drv*") ; do
cp -v $dll release-win32/ || exit 1
done

mkdir -p release-win32/drivers/
for i in "${DRIVERS[@]}" ; do
cp -v "build-win32/src/daemon/drivers/libscc_drv_$i.dll" release-win32/drivers/
cp -v "$1/src/daemon/drivers/libscc-drv-$i.dll" release-win32/drivers/
done

for i in "${LIBS[@]}" "${GTK_LIBS[@]}" ; do
Expand Down
4 changes: 1 addition & 3 deletions src/tools/paths.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ char* scc_find_binary(const char* name) {
"./tools",
#else
scc_get_share_path(),
"./build-win32/src/osd",
"./src/osd",
#endif
"./build/src/osd",
};
Expand All @@ -207,9 +207,7 @@ char* scc_find_binary(const char* name) {
strbuilder_clear(sb);
}

LOG("F1");
strbuilder_free(sb);
LOG("F2");
return NULL;
}

Expand Down

0 comments on commit dfd14d2

Please sign in to comment.