summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNexAdn2017-12-08 13:13:32 +0100
committerNexAdn2017-12-08 13:13:32 +0100
commit1f34fbd2b8b11a5ad7302f2a777363b1fd3a86a5 (patch)
tree055c988e638f1d9128a208ca43ea8c2ae93b1d19
parent63187a2288b16d7db612c7170c9cc376ecadaf7e (diff)
downloadaur-1f34fbd2b8b11a5ad7302f2a777363b1fd3a86a5.tar.gz
Add autoreload.patch, use git instead of tarball
Signed-off-by: NexAdn <>
-rwxr-xr-x.SRCINFO10
-rwxr-xr-xPKGBUILD28
-rw-r--r--autoreload.patch95
3 files changed, 117 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 491f6f68f6a..1f2a52d55bb 100755
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,22 @@
pkgbase = obs-linuxbrowser
pkgdesc = Browser source plugin for obs-studio based on CEF. Alternative to obs-qtwebkit.
pkgver = 0.3.0
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/bazukas/obs-linuxbrowser
arch = i686
arch = x86_64
license = GPL
makedepends = make
makedepends = cmake
- depends = obs-studio>=18.0.1
+ depends = obs-studio>=20.0.1
depends = cef-minimal
optdepends = pepper-flash: Flash support
- source = https://github.com/bazukas/obs-linuxbrowser/archive/0.3.0.tar.gz
+ source = obs-linuxbrowser::git+https://github.com/bazukas/obs-linuxbrowser.git
source = transparentpainting.patch
- sha256sums = 94ab4d2f83a6ad4bcea884240f770ca87cdea1b035228905ef0c10f7cc9f4e30
+ source = autoreload.patch
+ sha256sums = SKIP
sha256sums = 76733b17029ab1e5873c02754751b666cc4e10d6ff771f6eb8ea3d321a6d2246
+ sha256sums = f2b01597083c7af97c56fd68d0d6211448481891ea5e2f3352dabb69bfeb20a6
pkgname = obs-linuxbrowser
diff --git a/PKGBUILD b/PKGBUILD
index 571cfe643e7..4fd933c1467 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,33 @@
# Maintainer: NexAdn
pkgname=obs-linuxbrowser
pkgver=0.3.0
-pkgrel=3
+pkgrel=4
pkgdesc="Browser source plugin for obs-studio based on CEF. Alternative to obs-qtwebkit."
arch=("i686" "x86_64")
url="https://github.com/bazukas/obs-linuxbrowser"
license=("GPL")
depends=(
- "obs-studio>=18.0.1" "cef-minimal"
+ "obs-studio>=20.0.1" "cef-minimal"
)
makedepends=("make" "cmake")
optdepends=("pepper-flash: Flash support")
source=(
- "https://github.com/bazukas/$pkgname/archive/${pkgver}.tar.gz"
+ "${pkgname}::git+https://github.com/bazukas/${pkgname}.git"
"transparentpainting.patch"
+ "autoreload.patch"
)
-sha256sums=('94ab4d2f83a6ad4bcea884240f770ca87cdea1b035228905ef0c10f7cc9f4e30'
- '76733b17029ab1e5873c02754751b666cc4e10d6ff771f6eb8ea3d321a6d2246')
+sha256sums=('SKIP'
+ '76733b17029ab1e5873c02754751b666cc4e10d6ff771f6eb8ea3d321a6d2246'
+ 'f2b01597083c7af97c56fd68d0d6211448481891ea5e2f3352dabb69bfeb20a6')
prepare() {
- cd "$srcdir"/"$pkgname-${pkgver}"
+ cd "$srcdir"/"${pkgname}"
+ git checkout ${pkgver}
patch -p1 < $srcdir/transparentpainting.patch
+ patch -p1 < "${srcdir}"/autoreload.patch
}
build() {
- cd "$srcdir"/${pkgname}-${pkgver}
+ cd "${srcdir}"/${pkgname}
mkdir -p ./build
cd ./build
cmake -D CEF_DIR="/opt/cef" ..
@@ -31,9 +35,9 @@ build() {
make -j4
}
package() {
- mkdir -p "$pkgdir"/usr/lib/obs-plugins/
- mkdir -p "$pkgdir"/usr/share/obs/obs-plugins/$pkgname
- cp -R "$srcdir"/$pkgname-${pkgver}/build/build/$pkgname/bin/64bit/* "$pkgdir"/usr/lib/obs-plugins/
- mv "$pkgdir"/usr/lib/obs-plugins/libobs-linuxbrowser.so "$pkgdir"/usr/lib/obs-plugins/obs-linuxbrowser.so
- cp -R "$srcdir"/$pkgname-$pkgver/build/build/$pkgname/data/* "$pkgdir"/usr/share/obs/obs-plugins/$pkgname
+ mkdir -p "${pkgdir}"/usr/lib/obs-plugins/
+ mkdir -p "${pkgdir}"/usr/share/obs/obs-plugins/${pkgname}
+ cp -R "${srcdir}"/${pkgname}/build/build/${pkgname}/bin/64bit/* "${pkgdir}"/usr/lib/obs-plugins/
+ mv "${pkgdir}"/usr/lib/obs-plugins/libobs-linuxbrowser.so "${pkgdir}"/usr/lib/obs-plugins/obs-linuxbrowser.so
+ cp -R "${srcdir}"/${pkgname}/build/build/${pkgname}/data/* "${pkgdir}"/usr/share/obs/obs-plugins/${pkgname}
}
diff --git a/autoreload.patch b/autoreload.patch
new file mode 100644
index 00000000000..de2ffd36602
--- /dev/null
+++ b/autoreload.patch
@@ -0,0 +1,95 @@
+From 64be2db10c330e442272db5c661cb39c3e6340ef Mon Sep 17 00:00:00 2001
+From: NexAdn <nexadn@yandex.com>
+Date: Wed, 29 Nov 2017 16:29:47 +0100
+Subject: [PATCH] Implement automatic reload on source activation. (#40)
+
+---
+ data/locale/de-DE.ini | 6 ++++++
+ data/locale/en-US.ini | 1 +
+ src/plugin/main.c | 11 +++++++++++
+ 3 files changed, 18 insertions(+)
+
+diff --git a/data/locale/de-DE.ini b/data/locale/de-DE.ini
+index a2d8649..cedbf7f 100644
+--- a/data/locale/de-DE.ini
++++ b/data/locale/de-DE.ini
+@@ -5,7 +5,13 @@ Width="Breite"
+ Height="Höhe"
+ FPS="FPS"
+ ReloadPage="Seite Neuladen"
++ReloadOnScene="Bei Aktivierung neuladen"
+ FlashPath="Flash Plugin Pfad"
+ FlashVersion="Flash Plugin Version"
+ RestartBrowser="Browser Neustarten"
+ CustomCSS="Eigenes CSS"
++CommandLineArguments="Kommandozeilen-Argumente"
++HideScrollbars="Scrolleisten verstecken"
++Zoom="Zoom"
++ScrollVertical="Vertikal scrollen"
++ScrollHorizontal="Horizontal scrollen"
+\ No newline at end of file
+diff --git a/data/locale/en-US.ini b/data/locale/en-US.ini
+index 0ac91db..ee7edd3 100644
+--- a/data/locale/en-US.ini
++++ b/data/locale/en-US.ini
+@@ -5,6 +5,7 @@ Width="Width"
+ Height="Height"
+ FPS="FPS"
+ ReloadPage="Reload Page"
++ReloadOnScene="Reload on activate"
+ FlashPath="Flash Plugin Path"
+ FlashVersion="Flash Plugin Version"
+ RestartBrowser="Restart Browser"
+diff --git a/src/plugin/main.c b/src/plugin/main.c
+index 56a398e..1e6ef9a 100644
+--- a/src/plugin/main.c
++++ b/src/plugin/main.c
+@@ -34,6 +34,7 @@ struct browser_data {
+ uint32_t zoom;
+ uint32_t scroll_vertical;
+ uint32_t scroll_horizontal;
++ bool reload_on_scene;
+
+ /* internal data */
+ obs_source_t *source;
+@@ -66,6 +67,7 @@ static void browser_update(void *vptr, obs_data_t *settings)
+ uint32_t zoom = obs_data_get_int(settings, "zoom");
+ uint32_t scroll_vertical = obs_data_get_int(settings, "scroll_vertical");
+ uint32_t scroll_horizontal = obs_data_get_int(settings, "scroll_horizontal");
++ data->reload_on_scene = obs_data_get_bool(settings, "reload_on_scene");
+
+ bool is_local = obs_data_get_bool(settings, "is_local_file");
+ const char *url;
+@@ -200,6 +202,13 @@ static bool reload_button_clicked(obs_properties_t *props, obs_property_t *prope
+ return true;
+ }
+
++static void reload_on_scene(void* vptr)
++{
++ struct browser_data* data = vptr;
++ if (data->reload_on_scene)
++ browser_manager_reload_page(data->manager);
++}
++
+ static bool restart_button_clicked(obs_properties_t *props, obs_property_t *property, void *vptr)
+ {
+ UNUSED_PARAMETER(props);
+@@ -251,6 +260,7 @@ static obs_properties_t *browser_get_properties(void *vptr)
+ 0, 10000000, 1);
+
+ obs_properties_add_button(props, "reload", obs_module_text("ReloadPage"), reload_button_clicked);
++ obs_properties_add_bool(props, "reload_on_scene", obs_module_text("ReloadOnScene"));
+
+ obs_properties_add_path(props, "css_file", obs_module_text("CustomCSS"),
+ OBS_PATH_FILE, "*.css", NULL);
+@@ -376,6 +386,7 @@ bool obs_module_load(void)
+ info.video_tick = browser_tick;
+ info.video_render = browser_render;
+
++ info.activate = reload_on_scene;
+ info.mouse_click = browser_mouse_click;
+ info.mouse_move = browser_mouse_move;
+ info.mouse_wheel = browser_mouse_wheel;
+--
+libgit2 0.26.0
+