Skip to content

Commit

Permalink
Remove granite dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
tkashkin committed Jun 27, 2019
1 parent c7ddab0 commit e7bffdf
Show file tree
Hide file tree
Showing 77 changed files with 1,777 additions and 503 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ See [this issue](https://github.com/tkashkin/GameHub/issues/156) for more inform
#### Build dependencies
* `meson`
* `valac`
* `libgranite-dev`
* `libgtk-3-dev`
* `libglib2.0-dev`
* `libwebkit2gtk-4.0-dev`
Expand All @@ -68,7 +67,7 @@ See [this issue](https://github.com/tkashkin/GameHub/issues/156) for more inform
* `libsqlite3-dev`
* `libxml2-dev`
* `libpolkit-gobject-1-dev`
* `libunity-dev` (optional, required for launcher icon quicklist, progress indicator and counter)
* `libunity-dev` (optional, required for launcher icon quicklist, progress indicator and counter; pass `-Duse_libunity=true` to `meson` to use)
* `libmanette-0.2-dev`, `libx11-dev`, `libxtst-dev` (optional, required for gamepad support)

#### Building
Expand Down
1 change: 0 additions & 1 deletion debian/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Maintainer: tkashkin <[email protected]>
Build-Depends: meson (>= 0.40),
valac (>= 0.16),
debhelper (>= 9),
libgranite-dev,
libgtk-3-dev,
libglib2.0-dev,
libwebkit2gtk-4.0-dev,
Expand Down
2 changes: 0 additions & 2 deletions flatpak/com.github.tkashkin.gamehub.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
"--filesystem=~/.config/dconf:ro",
"--env=DCONF_USER_CONFIG_DIR=.config/dconf",

"--talk-name=com.canonical.Unity",

"--filesystem=host",
"--filesystem=home",
"--filesystem=~/.var/app/com.valvesoftware.Steam"
Expand Down
Binary file removed flatpak/libs/bundled/dee-1.2.7.tar.gz
Binary file not shown.
Binary file removed flatpak/libs/bundled/libdbusmenu-16.04.0.tar.gz
Binary file not shown.
Binary file not shown.
35 changes: 0 additions & 35 deletions flatpak/libs/libs.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,41 +36,6 @@
"path": "bundled/libmanette-0.2.2.tar.gz"
}
]
},

{
"name": "libdee",
"build-options": { "cflags": "-Wno-error=misleading-indentation" },
"sources": [
{
"type": "archive",
"path": "bundled/dee-1.2.7.tar.gz"
}
]
},
{
"name": "libdbusmenu",
"config-opts": ["--enable-gtk", "--disable-dumper"],
"make-install-args": ["typelibdir=/app/lib/girepository-1.0"],
"sources": [
{
"type": "archive",
"path": "bundled/libdbusmenu-16.04.0.tar.gz"
}
]
},
{
"name": "libunity",
"sources": [
{
"type": "archive",
"path": "bundled/libunity_7.1.4+16.04.20180209.1.orig.tar.gz"
},
{
"type": "patch",
"path": "libunity.patch"
}
]
}
]
}
215 changes: 0 additions & 215 deletions flatpak/libs/libunity.patch

This file was deleted.

7 changes: 7 additions & 0 deletions po/POTFILES
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,20 @@ src/ui/widgets/CompatToolOptions.vala
src/ui/widgets/CompatToolPicker.vala
src/ui/widgets/GameTagsList.vala
src/ui/widgets/TagRow.vala
src/ui/widgets/Styles.vala
src/ui/widgets/AlertView.vala
src/ui/widgets/ModeButton.vala
src/ui/widgets/OverlayBar.vala
src/ui/widgets/Welcome.vala
src/ui/widgets/SettingsSidebar.vala
src/utils/Utils.vala
src/utils/ImageCache.vala
src/utils/FSUtils.vala
src/utils/FSOverlay.vala
src/utils/Parser.vala
src/utils/downloader/Downloader.vala
src/utils/downloader/SoupDownloader.vala
src/settings/Settings.vala
src/settings/UI.vala
src/settings/SavedState.vala
src/settings/Auth.vala
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ deps()
sudo DEBIAN_FRONTEND="noninteractive" add-apt-repository ppa:elementary-os/daily -y
sudo DEBIAN_FRONTEND="noninteractive" add-apt-repository ppa:vala-team/next -y
sudo DEBIAN_FRONTEND="noninteractive" apt update -qq
sudo DEBIAN_FRONTEND="noninteractive" apt install -y meson valac checkinstall build-essential dput fakeroot moreutils git-buildpackage elementary-sdk libgranite-dev libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.0-dev libjson-glib-dev libgee-0.8-dev libsoup2.4-dev libsqlite3-dev libxml2-dev libpolkit-gobject-1-dev
sudo DEBIAN_FRONTEND="noninteractive" apt install -y meson valac checkinstall build-essential dput fakeroot moreutils git-buildpackage elementary-sdk libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.0-dev libjson-glib-dev libgee-0.8-dev libsoup2.4-dev libsqlite3-dev libxml2-dev libpolkit-gobject-1-dev
#sudo apt full-upgrade -y
if [[ "$APPVEYOR_BUILD_WORKER_IMAGE" = "Ubuntu1604" ]]; then
sudo DEBIAN_FRONTEND="noninteractive" dpkg -i "$_SCRIPTROOT/deps/xenial/"*.deb
Expand Down Expand Up @@ -279,7 +279,7 @@ appimage_checkrt()
_mv_deps "libgtk-3.so.0" "$APPDIR/usr/lib" "$APPDIR/usr/optlib/libgtk-3.so.0/"

echo "[scripts/build.sh] Moving back non-GTK-specific dependencies"
find "$APPDIR/usr/lib/" -maxdepth 1 -type f -not -name "libgranite.so.*" -not -name "libwebkit2gtk-4.0.so.*" -print0 | while read -d $'\0' dep; do
find "$APPDIR/usr/lib/" -maxdepth 1 -type f -not -name "libwebkit2gtk-4.0.so.*" -print0 | while read -d $'\0' dep; do
_mv_deps "$(basename $dep)" "$APPDIR/usr/optlib/libgtk-3.so.0" "$APPDIR/usr/lib/" "false"
done

Expand Down
7 changes: 3 additions & 4 deletions src/app.vala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ along with GameHub. If not, see <https://www.gnu.org/licenses/>.
using Gtk;
using Gdk;
using Gee;
using Granite;

using GameHub.Data;
using GameHub.Data.DB;
Expand Down Expand Up @@ -226,7 +225,7 @@ namespace GameHub

var app = new Application();

Utils.Logger.initialize("GameHub");
Utils.Logger.init();

var lang = Environment.get_variable("LC_ALL") ?? "";
Intl.setlocale(LocaleCategory.ALL, lang);
Expand Down Expand Up @@ -293,7 +292,7 @@ namespace GameHub
return true;
}

Granite.Services.Logger.DisplayLevel = opt_debug_log ? Granite.Services.LogLevel.DEBUG : Granite.Services.LogLevel.INFO;
Logger.DisplayLevel = opt_debug_log ? Logger.LogLevel.DEBUG : Logger.LogLevel.INFO;

if(opt_gdb || opt_gdb_bt_full || opt_gdb_fatal_criticals)
{
Expand Down Expand Up @@ -362,7 +361,7 @@ namespace GameHub
warning(e.message);
}

Granite.Services.Logger.DisplayLevel = opt_debug_log ? Granite.Services.LogLevel.DEBUG : Granite.Services.LogLevel.INFO;
Logger.DisplayLevel = opt_debug_log ? Logger.LogLevel.DEBUG : Logger.LogLevel.INFO;

init();

Expand Down
17 changes: 12 additions & 5 deletions src/data/Game.vala
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,18 @@ namespace GameHub.Data
}
else
{
FSUtils.mv_up(game.install_dir, @"$(FSUtils.GAMEHUB_DIR)/$(FSUtils.OVERLAYS_DIR)/$(BASE)");
game.overlays.clear();
game.install_dir.get_child(FSUtils.GAMEHUB_DIR).get_child(FSUtils.OVERLAYS_DIR).get_child(FSUtils.OVERLAYS_LIST).delete();
game.install_dir.get_child(FSUtils.GAMEHUB_DIR).get_child(FSUtils.OVERLAYS_DIR).delete();
game.notify_property("overlays-enabled");
try
{
FSUtils.mv_up(game.install_dir, @"$(FSUtils.GAMEHUB_DIR)/$(FSUtils.OVERLAYS_DIR)/$(BASE)");
game.overlays.clear();
game.install_dir.get_child(FSUtils.GAMEHUB_DIR).get_child(FSUtils.OVERLAYS_DIR).get_child(FSUtils.OVERLAYS_LIST).delete();
game.install_dir.get_child(FSUtils.GAMEHUB_DIR).get_child(FSUtils.OVERLAYS_DIR).delete();
game.notify_property("overlays-enabled");
}
catch(Error e)
{
warning("[Game.Overlay.remove] %s", e.message);
}
}
});
}
Expand Down
Loading

0 comments on commit e7bffdf

Please sign in to comment.