Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub desktop #1775

Merged
merged 6 commits into from
May 8, 2022
Merged

Conversation

theofficialgman
Copy link
Collaborator

@theofficialgman theofficialgman commented May 5, 2022

armhf and arm64
Do not merge until this exists in pi-apps-coders files first
Pi-Apps-Coders/files#29

yes I made this from github desktop on my switch

arm64 only, works on ubuntu bionic/debian buster and newer
@ryanfortner
Copy link
Collaborator

ryanfortner commented May 5, 2022

@theofficialgman could you send the instructions to build please?

@theofficialgman
Copy link
Collaborator Author

theofficialgman commented May 6, 2022

@theofficialgman could you send the instructions to build please?

as I described over here shiftkey/desktop#251 (comment) shiftkey/desktop#251 (comment)

its a bit complicated, I still need to make some .patch files of the dugite-native and desktop repos so it can be replicated by others.

edit: also github refuses to accept my .patch files and .txt and zip files for unknown reasons if I try to attach them to this reply

@theofficialgman
Copy link
Collaborator Author

theofficialgman commented May 6, 2022

@ryanfortner I would suggest using my deb. this has the most compatibility the same as upstream github desktop (ubuntu bionic and newer)

regardless here are the instructions:

Patch for dugite-native (https://github.com/desktop/dugite-native):
https://github.com/desktop/dugite-native/commit/b24e7d514879d5ec14096eb0fb8b6ec7cbf85675.patch
from the main repo folder, apply the above patch first:

npm install
export TARGET_ARCH=arm64
# export TARGET_ARCH=arm
export TARGET_PLATFORM=ubuntu
script/build.sh
script/package.sh

this will give you a file named close to dugite-native-v2.35.3-eda48e6-ubuntu.tar.gz

shiftkey github desktop needs no patches for ARM64 (https://github.com/shiftkey/desktop) (except in the case where the electron version is bad, check to make sure electron is not on theofficialgman's list of bad electron versions: #1930 (comment)):
patch for ARMhf: (https://gist.githubusercontent.com/theofficialgman/94b18a839cc8c31a1cbfc11853e5f51d/raw/e36e13f0573f3bed5f6865e10706984ac6390762/0001-patch-for-armhf-support.patch)

all from the main folder of the repo. apply the patch above first:

export npm_config_arch=arm64
# export npm_config_arch=armv7l
export TARGET_ARCH=arm64
# export TARGET_ARCH=arm
yarn
yarn lint

then extract the dugite-native tar.gz into app/node_modules/dugite in a new folder git. example for a specific version of dugite native

mkdir ~/desktop/app/node_modules/dugite/git
tar -xvf ~/dugite-native/output/dugite-native-v2.35.4-25e63d8-ubuntu.tar.gz -C ~/desktop/app/node_modules/dugite/git

continue from the main repo folder:

# export TARGET_ARCH=armv7l
yarn build:prod
yarn run package

you should now have the packages in the dist folder

keep in mind none of these changes are upstreamable, and are just meant for making the package locally. upstream builds on github actions where native arm64 builds are not easily (or quickly which is the problem) possible

@Crilum
Copy link
Contributor

Crilum commented May 6, 2022

Could this be built on armhf?

@theofficialgman
Copy link
Collaborator Author

theofficialgman commented May 6, 2022

Could this be built on armhf?

not sure yet.. I'm still making my bionic armhf debootstrap. if all the npm dependencies have armhf binaries (when they do have binaries, not all of them do) then yes.. but if they don't its going to be a deep rabbit hold of making them

@theofficialgman
Copy link
Collaborator Author

theofficialgman commented May 6, 2022

got my bionic armhf chroot made and my dependencies and updated npm and yarn repos added. I've built armhf dugite-native already (it its basically gitweb, git, curl, and a few other things all smashed together). github desktop is a much longer build... we will see how that goes

I've updated my instructions a bit, I forgot about a couple of steps before.

@theofficialgman
Copy link
Collaborator Author

theofficialgman commented May 6, 2022

as I expected github-desktop is proving harder.. but not for the reason I expected. npm is installing the windows dependencies even though I'm running on linux (even though they were never used). this went fine on arm64 since there is an arm64 windows release. there is no npm arm32 windows support in most things so its failing. so now I'm having to purge the windows crap to build armhf linux.

actually disabling the windows depends when built on linux is probably possible, but I know 0 npm so thats a problem for the upstream developer

@theofficialgman
Copy link
Collaborator Author

theofficialgman commented May 6, 2022

I have built ARMhf Github Desktop 🎉

Incoming deb, appimage, and rpm @Crilum @ryanfortner @Botspot needs testing, same location
https://github.com/theofficialgman/testing/releases/tag/github-desktop

its too late in the day for me to document what additional changes were necessary. I'd post patch files tomorrow or another day
Screenshot from 2022-05-06 00-06-41
I was able to get the GUI to load in my chroot, but I don't want to install a browser and the other stuff to get past login

edit: I just skipped login, I assume that works. cloning and everything else works. so I think this is all good

@Crilum
Copy link
Contributor

Crilum commented May 6, 2022

@theofficialgman On armhf I've signed in, and have opened a repo, it looks and feels really smooth.

I probably won't be able to do extensive testing till tomorrow, but so far, looks good!

@Crilum
Copy link
Contributor

Crilum commented May 6, 2022

Ok, one error so far:

In the Repository menu, there is an option to Open in GNOME Terminal, and since by default RPiOS doesn't have GNOME Terminal installed, GH Desktop outputs an error saying: Cannot read properties of undefined (reading 'path'). It works after I install gnome-terminal though.

When this gets added to Pi-Apps, gnome-terminal should be added as a dependency.

@Crilum
Copy link
Contributor

Crilum commented May 6, 2022

After a few minutes of just looking through the menus, GH Desktop randomly seg-faulted...

@Crilum
Copy link
Contributor

Crilum commented May 6, 2022

After a few minutes of just looking through the menus, GH Desktop randomly seg-faulted...

I think this was a random occurrence, and it doesn't need to be worried about.

@Crilum
Copy link
Contributor

Crilum commented May 6, 2022

The armhf AppImage works fine as well...

apps/Github Desktop/install-32 Show resolved Hide resolved
apps/Github Desktop/install-64 Show resolved Hide resolved
apps/Github Desktop/description Outdated Show resolved Hide resolved
apps/Github Desktop/description Outdated Show resolved Hide resolved
@theofficialgman
Copy link
Collaborator Author

theofficialgman commented May 6, 2022

Ok, one error so far:

In the Repository menu, there is an option to Open in GNOME Terminal, and since by default RPiOS doesn't have GNOME Terminal installed, GH Desktop outputs an error saying: Cannot read properties of undefined (reading 'path'). It works after I install gnome-terminal though.

When this gets added to Pi-Apps, gnome-terminal should be added as a dependency.

Yeah this is just due to how github desktop is coded. The list of supported terminals is small. I know xterm, gnome-terminal, and konsole is in that list. What terminal does piOS have installed by default?

@Jai-JAP
Copy link
Contributor

Jai-JAP commented May 6, 2022

What terminal does piOS have installed by default?

PiOS comes preinstalled with lxterminal

@theofficialgman
Copy link
Collaborator Author

theofficialgman commented May 6, 2022

Ok here is the list of supported terminals.
https://github.com/shiftkey/desktop/blob/linux/app/src/lib/shells/linux.ts
The list is actually quite large but lxterminal is not there and I guess you didn't have any of the others installed

if you (or someone) correctly updates that file fully for lxterminal and PRs upstream, I'll pull the changes and rebuild

@Jai-JAP
Copy link
Contributor

Jai-JAP commented May 6, 2022

Well then u need to add lxterminal for lxde (possibly name shell may be other name) but lxde is now dead. LxQt is the new successor for lxde

@Jai-JAP
Copy link
Contributor

Jai-JAP commented May 6, 2022

Better just add xterm as a dependency

@theofficialgman
Copy link
Collaborator Author

Well them u need to add lxterminal for lxde but lxde is now dead. LxQt is the new successor for lxde

LXDE is still actively developed. LXQt is a separate project. LXDE is gtk based. LXQt is QT based. both very different gui libraries

@theofficialgman
Copy link
Collaborator Author

theofficialgman commented May 6, 2022

@Jai-JAP which one looks better themed/integrated on piOS lxde, gnome-terminal or xterm?

also what is the default text/code editor on piOS? the list of supported ones is here https://github.com/shiftkey/desktop/blob/linux/app/src/lib/editors/linux.ts

@Jai-JAP
Copy link
Contributor

Jai-JAP commented May 6, 2022

For editor its geany on PiOS. and mousepad on twister os tou need to add them both.

And lxterminal looks good on PiOS when themed but i haven't tried other terminals
Also xterm is the worst in terms of looks even themed. 😕

@theofficialgman
Copy link
Collaborator Author

ok then I'll just add geany and lxterminal upstream to github desktop and hold back this PR till merged

@theofficialgman
Copy link
Collaborator Author

theofficialgman commented May 6, 2022

on second thought, lets just add gnome-terminal and gedit for now to the depends so this can be merged ^.
I'll still PR to upstream and we can rebuild once that is merged

@Jai-JAP
Copy link
Contributor

Jai-JAP commented May 6, 2022

on second though, lets just add gnome-terminal and gedit for now to the depends so this can be merged ^.
I'll still PR to upstream and we can rebuild once that is merged

Wait until someone confirms shell name on PiOS. I'm not sure if its LXDE or PIXEL or something else.
I may do it tommorrow

@theofficialgman
Copy link
Collaborator Author

on second though, lets just add gnome-terminal and gedit for now to the depends so this can be merged ^.
I'll still PR to upstream and we can rebuild once that is merged

Wait until someone confirms shell name on PiOS. I'm not sure if its LXDE or PIXEL or something else. I may do it tommorrow

lxterminal is the name of the shell on LXDE, piOS uses LXDE so I don't expect them to change the name

@theofficialgman
Copy link
Collaborator Author

PR opened for geany and lxterminal:
shiftkey/desktop#711

I have built arm64 binaries but I can't upload them right now. will do later today

@theofficialgman
Copy link
Collaborator Author

theofficialgman commented May 6, 2022

@Itai-Nelken @Botspot updated the debs so that lxterminal and geany are supported for both armhf and arm64
see PR: Pi-Apps-Coders/files#30

once that is merged, this can be merged as well

new debs include lxterminal and geany support (among other terminal/editors)
@Jai-JAP
Copy link
Contributor

Jai-JAP commented May 7, 2022

PR opened for geany and lxterminal:
shiftkey/desktop#711

I have built arm64 binaries but I can't upload them right now. will do later today

@theofficialgman also add mousepad to supported editors as twister os uses it by default.

@theofficialgman
Copy link
Collaborator Author

@theofficialgman also add mousepad to supported editors as twister os uses it by default.

I'll add it to the PR for github desktop. I won't rebuild since that takes to much time for little benefit, but whenever github desktop 3.1 releases I'll rebuild then

@Itai-Nelken
Copy link
Contributor

@Itai-Nelken @Botspot updated the debs so that lxterminal and geany are supported for both armhf and arm64
see PR: Pi-Apps-Coders/files#30

once that is merged, this can be merged as well

Merged.

@theofficialgman
Copy link
Collaborator Author

@Botspot can you add the bitly links and then I'll merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants