[arch-commits] Commit in electron/trunk (3 files)

Nicola Squartini tensor5 at archlinux.org
Fri Sep 23 08:45:35 UTC 2016


    Date: Friday, September 23, 2016 @ 08:45:35
  Author: tensor5
Revision: 190191

electron: install .desktop and icon file

Added:
  electron/trunk/default_app-icon.patch
  electron/trunk/electron.desktop
Modified:
  electron/trunk/PKGBUILD

------------------------+
 PKGBUILD               |   12 ++++++++++++
 default_app-icon.patch |   22 ++++++++++++++++++++++
 electron.desktop       |    7 +++++++
 3 files changed, 41 insertions(+)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-09-23 08:04:08 UTC (rev 190190)
+++ PKGBUILD	2016-09-23 08:45:35 UTC (rev 190191)
@@ -26,6 +26,8 @@
         'git+https://github.com/kennethreitz/requests.git'
         'google-breakpad::git+https://chromium.googlesource.com/breakpad/breakpad/src'
         "https://github.com/zcbenz/chromium-source-tarball/releases/download/${_chromiumver}/chromium-${_chromiumver}.tar.xz"
+        'electron.desktop'
+        'default_app-icon.patch'
         'dont-bootstrap-libchromiumcontent.patch'
         'dont-update-submodules.patch'
         'dont-use-sysroot.patch'
@@ -62,6 +64,8 @@
             'SKIP'
             'SKIP'
             'f2768f4c79516344db73569c4844e0d8722dd73a7b0df13ba4747511001b5a2a'
+            '5270db01f3f8aaa5137dec275a02caa832b7f2e37942e068cba8d28b3a29df39'
+            'a0402b11c655d44ba1d71c769913b17d82abb0921759c3f1f72f204637ded725'
             '14dbd1eecb7034d9e19e1f0c61b0a36ed3b9c610db008ff2a6da2a540ade1221'
             '7fd0fc72a14b2a08ce0f258a750a9d181386b9277312f2ed5446c29b8ec4e282'
             '75b2e9827f0593e59a35c36c6039ad10d35d7499fed6d97c4ed48ef1cce54c2b'
@@ -124,6 +128,7 @@
   python2 script/bump-version.py 1.4.0
   ###
 
+  patch -Np1 -i "${srcdir}"/default_app-icon.patch  # Icon from .desktop file
   patch -Np1 -i "${srcdir}"/gtk3-menu-bar.patch
   patch -Np1 -i "${srcdir}"/gtk3-warnings.patch
   patch -Np1 -i "${srcdir}"/use-system-clang.patch
@@ -235,9 +240,16 @@
   # Fixable by moving libnode.so to /usr/lib
   install -m644 libnode.so "${pkgdir}"/usr/lib/electron
   cp -r locales resources "${pkgdir}"/usr/lib/electron
+  cd ../..
 
   echo -n "v${pkgver}" > "${pkgdir}"/usr/lib/electron/version
 
+  # Install .desktop and icon file
+  install -Dm644 "${srcdir}"/electron.desktop \
+          "${pkgdir}"/usr/share/applications/electron.desktop
+  install -Dm644 default_app/icon.png \
+          "${pkgdir}"/usr/share/pixmaps/electron.png  # hicolor has no 1024x1024
+
   # Install Node headers
   _headers_dest="${pkgdir}/usr/lib/electron/node"
   install -d -m755 "${_headers_dest}"

Added: default_app-icon.patch
===================================================================
--- default_app-icon.patch	                        (rev 0)
+++ default_app-icon.patch	2016-09-23 08:45:35 UTC (rev 190191)
@@ -0,0 +1,22 @@
+--- a/default_app/default_app.js
++++ b/default_app/default_app.js
+@@ -17,9 +17,6 @@ exports.load = (appUrl) => {
+       backgroundColor: '#FFFFFF',
+       useContentSize: true
+     }
+-    if (process.platform === 'linux') {
+-      options.icon = path.join(__dirname, 'icon.png')
+-    }
+ 
+     mainWindow = new BrowserWindow(options)
+     mainWindow.loadURL(appUrl)
+--- a/filenames.gypi
++++ b/filenames.gypi
+@@ -75,7 +75,6 @@
+     ],
+     'default_app_sources': [
+       'default_app/default_app.js',
+-      'default_app/icon.png',
+       'default_app/index.html',
+       'default_app/main.js',
+       'default_app/package.json',

Added: electron.desktop
===================================================================
--- electron.desktop	                        (rev 0)
+++ electron.desktop	2016-09-23 08:45:35 UTC (rev 190191)
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=Electron
+Icon=electron
+Exec=electron %u
+Categories=Development;GTK;
+StartupNotify=true



More information about the arch-commits mailing list