Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.1.1 #76

Merged
merged 2 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 23 additions & 10 deletions distributeDLLs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,35 @@

mkdir -p dlls
mkdir -p dlls/lib
mkdir -p dlls/lib/gdk-pixbuf-2.0
mkdir -p dlls/lib/gdk-pixbuf-2.0/2.10.0
mkdir -p dlls/share
mkdir -p dlls/share/icons
mkdir -p dlls/share/glib-2.0
mkdir -p dlls/share/glib-2.0/schemas

echo
PS3='Choose the correct version of gdbus: '
options=("/mingw64/bin/gdbus.exe" "/mingw32/bin/gdbus.exe")
PS3='Choose the correct version: '
options=("mingw64" "mingw32")
select opt in "${options[@]}"
do
echo "Preparing gdbus.exe..."
cp $opt ./dlls/
break;
cp /$opt/bin/gdbus.exe ./dlls/
cp -R /$opt/lib/gdk-pixbuf-2.0 ./dlls/lib
rm ./dlls/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.a
GDK_PIXBUF_MODULEDIR=./dlls/lib/gdk-pixbuf-2.0/2.10.0/loaders
gdk-pixbuf-query-loaders --update-cache
cp /$opt/bin/fc-* ./dlls/
cp -R /$opt/share/icons/Adwaita ./dlls/share/icons
cp -R /$opt/share/icons/hicolor ./dlls/share/icons
cp /$opt/share/glib-2.0/schemas/* ./dlls/share/glib-2.0/schemas/
glib-compile-schemas ./dlls/share/glib-2.0/schemas/
cp /$opt/bin/librsvg-2-2.dll ./dlls
cp /$opt/bin/libxml2-2.dll ./dlls
cp /$opt/bin/libiconv-2.dll ./dlls
cp /$opt/bin/libcharset-1.dll ./dlls
cp /$opt/bin/zlib1.dll ./dlls
cp /$opt/bin/liblzma-5.dll ./dlls
break;
done

echo "Preparing DLLs..."

ldd ./src/core/lwp.exe | grep '\/mingw.*\.dll' -o | xargs -I{} cp "{}" ./dlls/
cp /mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache ./dlls/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache

echo "Done"
3 changes: 2 additions & 1 deletion src/core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ static void reloadMonitorListBox()

gtk_list_box_insert(GTK_LIST_BOX(monitorListBox), row, 0);

char *nameBuff = malloc(sizeof(strlen(monitors[i].name)));
char *nameBuff = malloc(strlen(monitors[i].name)+1);
strcpy(nameBuff, monitors[i].name);

g_object_set_data(G_OBJECT(row), "monitor_name", (gpointer)nameBuff);

gtk_widget_show_all(row);
Expand Down
5 changes: 0 additions & 5 deletions src/core/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

#include <gtk/gtk.h>

// G_APPLICATION_DEFAULT_FLAGS doesn't exist in older versions of glib
#ifndef G_APPLICATION_DEFAULT_FLAGS
#define G_APPLICATION_DEFAULT_FLAGS G_APPLICATION_FLAGS_NONE
#endif

#include "../common.h"

extern GtkApplication *app;
Expand Down
Loading