Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Flatpakization #157

Closed
wants to merge 3 commits into from
Closed
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
*~
*#*
build
flatpak
.flatpak-builder/*
.SRCINFO
po/*.mo
.compdb.json
Expand Down
175 changes: 175 additions & 0 deletions com.vinszent.GnomeTwitch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
{
"app-id": "com.vinszent.GnomeTwitch",
"branch": "stable",

"runtime": "org.gnome.Platform",
"runtime-version": "3.22",
"sdk": "org.gnome.Sdk",

"command": "gnome-twitch",

"finish-args": [
"--share=ipc",
"--socket=x11",
"--socket=wayland",
"--socket=pulseaudio",
"--share=network",
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf",
"--env=DCONF_USER_CONFIG_DIR=.config/dconf"
],
"build-options" : {
"cflags": "-O2 -g",
"cxxflags": "-O2 -g"
},
"cleanup": [
"*.la",
"*.a",
"/include",
"/lib/pkgconfig",
"/share/pkgconfig",
"/share/aclocal",
"/man",
"/share/bash-completion",
"/share/gtk-doc",
"/share/man"
],
"modules": [
{
"name": "ninja",
"cleanup": [ "*" ],
"sources": [
{
"type": "git",
"url": "https://github.com/ninja-build/ninja.git",
"branch": "v1.7.1"
},
{
"type": "script",
"dest-filename": "configure",
"commands": [
"./configure.py --bootstrap"
]
},
{
"type": "script",
"dest-filename": "Makefile",
"commands": [
"all:",
"install:",
"\tinstall -D ninja /app/bin/ninja"
]
}
]
},
{
"name": "meson",
"cleanup": [ "*" ],
"sources": [
{
"type": "git",
"url": "https://github.com/mesonbuild/meson.git",
"branch": "0.33.0"
},
{
"type": "script",
"dest-filename": "configure",
"commands": [ "" ]
},
{
"type": "script",
"dest-filename": "Makefile",
"commands": [
"all:",
"install:",
"\tpython3 ./setup.py install --prefix=/app/"
]
}
]
},
{
"name": "yasm",
"cleanup": [ "*" ],
"sources": [
{
"type": "archive",
"url": "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz",
"sha256": "3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f"
}
]
}, {
"name": "gst-libav",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be in a separate package as well. See flatpak/flatpak#123

"cleanup": [
"/bin/*",
"/lib/peas-demo"
],
"sources": [
{
"type": "git",
"url": "git://anongit.freedesktop.org/gstreamer/gst-libav",
"branch": "1.8"
}
]
}, {
"name": "libpeas",
"cleanup": [
"/bin/*",
"/lib/peas-demo"
],
"sources": [
{
"type": "git",
"url": "git://git.gnome.org/libpeas",
"branch": "libpeas-1.18.0"
}
]
}, {
"name": "gnome-twitch",
"sources": [
{
"type": "git",
"url": "https://github.com/mattiasb/gnome-twitch.git",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong URL for merging.

Copy link
Contributor Author

@mattiasb mattiasb Oct 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I know. I had a !fixup-commit for that, but I must have dropped it.

"branch": "feature/flatpak"
},
{
"type": "script",
"dest-filename": "configure",
"commands": [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not add those as files on the local filesystem instead? I'd create a separate flatpak directory, and put all the files in there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, yeah makes sense.

"mkdir build && cd build",
"meson.py --prefix /app --libdir lib -Ddo-post-install=true -Dwith-player-gstreamer-opengl=true -Dwith-player-backend-gstreamer-cairo=true -Dwith-player-backend-gstreamer-clutter=true -Db_lundef=false",

"cd ../subprojects/player-backend-gstreamer-opengl",
"mkdir build && cd build",
"meson.py --prefix /app --libdir lib ..",

"cd ../../player-backend-gstreamer-cairo",
"mkdir build && cd build",
"meson.py --prefix /app --libdir lib ..",

"cd ../../player-backend-gstreamer-clutter",
"mkdir build && cd build",
"meson.py --prefix /app --libdir lib .."
]
},
{
"type": "script",
"dest-filename": "Makefile",
"commands": [
"all:",
"\tninja -C build/",
"\tninja -C subprojects/player-backend-gstreamer-cairo/build/",
"\tninja -C subprojects/player-backend-gstreamer-clutter/build/",
"\tninja -C subprojects/player-backend-gstreamer-opengl/build/",

"install:",
"\tninja -C build/ install",
"\tninja -C subprojects/player-backend-gstreamer-cairo/build/ install",
"\tninja -C subprojects/player-backend-gstreamer-clutter/build/ install",
"\tninja -C subprojects/player-backend-gstreamer-opengl/build/ install"
]
}
]
}
]
}
2 changes: 1 addition & 1 deletion data/com.vinszent.GnomeTwitch.desktop.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Keywords=stream;video;twitch;live;games;
Type=Application
Exec=gnome-twitch
# Translators: Don't translate this, xgettext marks this automatically
Icon=gnome-twitch
Icon=com.vinszent.GnomeTwitch
Categories=GTK;GNOME;AudioVideo;Player;Video;
Terminal=false
2 changes: 1 addition & 1 deletion data/icons/export_logo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

for i in 16 22 24 32 48 256 512
do
inkscape -z -e hicolor/$i\x$i/apps/gnome-twitch.png -w $i -h $i gnome-twitch.svg
inkscape -z -e hicolor/$i\x$i/apps/com.vinszent.GnomeTwitch.png -w $i -h $i com.vinszent.GnomeTwitch.svg
done
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ custom_target('desktop-file',
install : true,
install_dir : 'share/applications')

install_data('icons/hicolor/16x16/apps/gnome-twitch.png', install_dir : 'share/icons/hicolor/16x16/apps/')
install_data('icons/hicolor/22x22/apps/gnome-twitch.png', install_dir : 'share/icons/hicolor/22x22/apps')
install_data('icons/hicolor/24x24/apps/gnome-twitch.png', install_dir : 'share/icons/hicolor/24x24/apps')
install_data('icons/hicolor/32x32/apps/gnome-twitch.png', install_dir : 'share/icons/hicolor/32x32/apps')
install_data('icons/hicolor/48x48/apps/gnome-twitch.png', install_dir : 'share/icons/hicolor/48x48/apps')
install_data('icons/hicolor/256x256/apps/gnome-twitch.png', install_dir : 'share/icons/hicolor/256x256/apps')
install_data('icons/hicolor/512x512/apps/gnome-twitch.png', install_dir : 'share/icons/hicolor/512x512/apps')
install_data('icons/hicolor/scalable/apps/gnome-twitch.svg', install_dir : 'share/icons/hicolor/scalable/apps')
install_data('icons/hicolor/scalable/apps/gnome-twitch-symbolic.svg', install_dir : 'share/icons/hicolor/symbolic/apps')
install_data('icons/hicolor/16x16/apps/com.vinszent.GnomeTwitch.png', install_dir : 'share/icons/hicolor/16x16/apps/')
install_data('icons/hicolor/22x22/apps/com.vinszent.GnomeTwitch.png', install_dir : 'share/icons/hicolor/22x22/apps')
install_data('icons/hicolor/24x24/apps/com.vinszent.GnomeTwitch.png', install_dir : 'share/icons/hicolor/24x24/apps')
install_data('icons/hicolor/32x32/apps/com.vinszent.GnomeTwitch.png', install_dir : 'share/icons/hicolor/32x32/apps')
install_data('icons/hicolor/48x48/apps/com.vinszent.GnomeTwitch.png', install_dir : 'share/icons/hicolor/48x48/apps')
install_data('icons/hicolor/256x256/apps/com.vinszent.GnomeTwitch.png', install_dir : 'share/icons/hicolor/256x256/apps')
install_data('icons/hicolor/512x512/apps/com.vinszent.GnomeTwitch.png', install_dir : 'share/icons/hicolor/512x512/apps')
install_data('icons/hicolor/scalable/apps/com.vinszent.GnomeTwitch.svg', install_dir : 'share/icons/hicolor/scalable/apps')
install_data('icons/hicolor/scalable/apps/com.vinszent.GnomeTwitch-symbolic.svg', install_dir : 'share/icons/hicolor/symbolic/apps')
install_data('com.vinszent.GnomeTwitch.gschema.xml', install_dir : 'share/glib-2.0/schemas/')
4 changes: 2 additions & 2 deletions src/gt-win.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ show_about_cb(GSimpleAction* action,
"license-type", GTK_LICENSE_GPL_3_0,
"copyright", "Copyright © 2015 Vincent Szolnoky",
"comments", _("Enjoy Twitch on your GNU/Linux desktop"),
"logo-icon-name", "gnome-twitch",
"logo-icon-name", "com.vinszent.GnomeTwitch",
"website", "https://github.com/vinszent/gnome-twitch",
"website-label", "GitHub",
// Translators: Put your details here :)
Expand Down Expand Up @@ -620,7 +620,7 @@ gt_win_init(GtWin* self)
g_settings_get_int(main_app->settings, "window-width"),
g_settings_get_int(main_app->settings, "window-height"));

gtk_window_set_default_icon_name("gnome-twitch");
gtk_window_set_default_icon_name("com.vinszent.GnomeTwitch");

g_object_bind_property(priv->browse_stack, "visible-child",
self, "visible-view",
Expand Down