Code Monkey home page Code Monkey logo

Comments (19)

alyyasser avatar alyyasser commented on July 17, 2024 1

maybe someone need this, here's modified version of PKGBUILD that i used to install the latest version from this repo

_pkgname='github-desktop'
pkgname="${_pkgname}"
pkgver=1.2.6
gitname="release-${pkgver//_/-}"
pkgrel=1
pkgdesc="GUI for managing Git and GitHub."
arch=('x86_64')
url="https://desktop.github.com"
license=('MIT')
depends=('gnome-keyring' 'git' 'electron' 'nodejs' 'libcurl-compat' 'libcurl-gnutls')
optdepends=('hub: CLI interface for GitHub.')
makedepends=('libcurl-openssl-1.0' 'xorg-server-xvfb' 'yarn' 'python2' 'nvm')
DLAGENTS=("http::/usr/bin/git clone --branch ${gitname} --single-branch %u")
source=(
  git+https://github.com/shiftkey/desktop.git#tag=${gitname}
  ${_pkgname}.desktop
)
sha256sums=(
  'SKIP'
  be057e4a392e64760f7a40203ac886b7cf5551de254ad55c706376dca8aa4341
)
build() {
  cd desktop
  unset npm_config_prefix
  source /usr/share/nvm/init-nvm.sh
  nvm install --lts  
  nvm use --lts
  export DISPLAY=':99.0'
  Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
  yarn install
  yarn build:prod
  nvm deactivate
}
package() {
  install -d "${pkgdir}/opt/${_pkgname}"
  cp -r --preserve=mode desktop/dist/desktop-linux-x64/* "${pkgdir}/opt/${_pkgname}/"
  printf '#!/bin/sh\n\nLD_PRELOAD=libcurl.so.3 /opt/github-desktop/desktop "$@"\n' | install -Dm755 /dev/stdin "${pkgdir}/usr/bin/github-desktop"
  install -Dm644 "${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
  install -Dm644 "desktop/app/static/logos/1024x1024.png" "${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/${_pkgname}.png"
  install -Dm644 "desktop/app/static/logos/512x512.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${_pkgname}.png"
  install -Dm644 "desktop/app/static/logos/256x256.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/${_pkgname}.png"
}

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

@MetaiR I don't want to create a new package on top of the work that @immackay has already done, particularly if it's going to encounter the same issues. Instead I'd love to figure out how to support that existing work and help keep it up to date.

I can see there's a few comments in the release and git packages, but are there ways to turn those comments into patches that can be applied to the PKGBUILD script itself? I haven't touched Arch in over ten years (working on getting a fresh VM setup now for testing), and I'm hazy on how to properly contribute changes to the AUR.

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

Here's a patch that I was able to make to get this up to date with the latest stable release:

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8f981fd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg
+/desktop
+/src
+*.tar.xz
diff --git a/PKGBUILD b/PKGBUILD
index 234b8ba..9b834e5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,14 +4,14 @@
 
 _pkgname='github-desktop'
 pkgname="${_pkgname}"
-pkgver=1.1.1
+pkgver=1.2.3
 gitname="release-${pkgver//_/-}"
 pkgrel=1
 pkgdesc="GUI for managing Git and GitHub."
 arch=('x86_64')
 url="https://desktop.github.com"
 license=('MIT')
-depends=('gnome-keyring' 'git' 'electron' 'nodejs' 'libcurl-compat' 'libcurl-gnutls')
+depends=('gnome-keyring' 'git' 'electron' 'nodejs-lts-carbon' 'libcurl-compat' 'libcurl-gnutls')
 optdepends=('hub: CLI interface for GitHub.')
 makedepends=('libcurl-openssl-1.0' 'xorg-server-xvfb' 'yarn' 'python2')
 DLAGENTS=("http::/usr/bin/git clone --branch ${gitname} --single-branch %u")

I think gtk needs to be an explicit dependency, because otherwise you'll get this error when launching from a non-GNOME environment, like I did:

[shiftkey@archlinux github-desktop]$ github-desktop 
/opt/github-desktop/desktop: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

Other than that, this seems to be working fine here:

from desktop.

MetaiR avatar MetaiR commented on July 17, 2024

I don't have enough knowledge in this field so I sent an email to both publishers and the maintainer of the package asked them to join us on this discussion. hope they can help.

I personally tried to build and install this application on my machine several times before and had no luck so far, so this issue is kind of important to me because I didn't see any application that works well, has nice UI and be free on Linux.

from desktop.

mikelpint avatar mikelpint commented on July 17, 2024

I don't have any idea about NPM and Electron so I don't think I can help. My package consisted in installing the DEB package with some custom .desktop files.

from desktop.

mikelpint avatar mikelpint commented on July 17, 2024

The DEB package was taken from here. Unfortunately, it is abandoned.

from desktop.

mikelpint avatar mikelpint commented on July 17, 2024

One thing I could do is to add the Spanish .desktop file.

from desktop.

MetaiR avatar MetaiR commented on July 17, 2024

@mikelpint
why dont you take the DEB package from here?
we use debtap to cast it to arch package

from desktop.

mikelpint avatar mikelpint commented on July 17, 2024

Oh, I didn't see the DEB package.

from desktop.

mikelpint avatar mikelpint commented on July 17, 2024

I could do a package called github-desktop-deb for the people who have problems installing the official one.

from desktop.

MetaiR avatar MetaiR commented on July 17, 2024

@mikelpint
it will be awesome but I think @shiftkey wants to improve and fix existing packages instead of creating another one

from desktop.

MetaiR avatar MetaiR commented on July 17, 2024

any idea around this issue? @shiftkey

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

@MetaiR I'm not keen to "fork" the existing packages unless we've exhausted all other avenues - the fixes seem minor, I'm just not sure how to get them incorporated into the AUR.

from desktop.

MetaiR avatar MetaiR commented on July 17, 2024

I can create arch package from deb using debtap and put them inside other released version
is it helpful?

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

@MetaiR it's only been a couple of days - let's give others a chance to reply.

from desktop.

immackay avatar immackay commented on July 17, 2024

Hi all.

First off, it's totally my fault for letting the aur packages get away from me. I may look into handing off control of the package, I've become rather busy with work recently.

I'll incorporate your changes Brendan and also look into debtap - the compile time on weaker systems is getting a little cumbersome.

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

@immackay thanks for dropping in to the discussion!

from desktop.

MetaiR avatar MetaiR commented on July 17, 2024

do you have any decision on this matter? @shiftkey

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

I'm going to close this out for now because this is a community-based effort, and I don't want to come in over the top and add more problems while things are being figured out. But let me know if this still isn't resolved in a few months and we can revisit it.

from desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.