You are here

ghdPortable (Unofficial portable version of GitHub Desktop®)

15 posts / 0 new
Last post
XJDHDR
Offline
Last seen: 3 months 2 weeks ago
Joined: 2014-12-31 09:15
ghdPortable (Unofficial portable version of GitHub Desktop®)

Application: ghdPortable
Category: Internet
Description: ghdPortable is an unofficial PortableApps Launcher for GitHub Desktop®. GitHub Desktop is GitHub's official Git client, designed especially for beginners and those who want a Git client that has more integration with GitHub®.

ghdPortable v3.3.8 Dev Test 1 [85.5MB download / 339MB installed]
(MD5: 930ba0a7e5cfb40a71e1624c9a15f705)
ghdPortable v3.3.8 Dev Test 1 (Auto-Updater Removed) [85.5MB download / 337MB installed]
(MD5: 684c188217b1ef3da23226c507e9af04)
Please note that only 64-bit versions of Windows are supported.

Release Notes:

  • 3.3.8 Dev Test 1 (2024-01-23): Updated base app.
  • 3.3.6 Dev Test 1 (2023-12-22): Updated base app, merged custom launcher functionality into base PA Launcher, and added code to clean up the App data after any updates.
  • 3.2.3 Dev Test 2 (2023-05-30): Fixed corruption of launcher's name.
  • 3.2.3 Dev Test 1 (2023-05-30): Updated base app, and fixed bug that made the PAL close prematurely if the base app updated itself.
  • 3.2.1 Dev Test 1 (2023-04-18): Initial release.
Gord Caswell
Gord Caswell's picture
Offline
Last seen: 1 day 8 hours ago
DeveloperModerator
Joined: 2008-07-24 18:46
Name usage disallowed for trademark

The license for this app does not allow usage of the GitHub Desktop name. This build is allowed by the license terms, but the name cannot be. Please adjust the name accordingly.

https://desktop.github.com/terms/

XJDHDR
Offline
Last seen: 3 months 2 weeks ago
Joined: 2014-12-31 09:15
I think I've fixed the

I think I've fixed the problem.

SimonGeek
Offline
Last seen: 8 months 4 weeks ago
Joined: 2022-07-24 01:22
Special characters problem

I think special characters like "#" may prevent the software and Launcher from working correctly. A correct name could be gtbPortable. Examples can seen from "ccPortable" or "rcvPortable".

XJDHDR
Offline
Last seen: 3 months 2 weeks ago
Joined: 2014-12-31 09:15
Fair enough

I didn't notice any issues when I used my work, but good point. The latest update renames the package to be more in line with the way this website handles other trademarked names.

SimonGeek
Offline
Last seen: 8 months 4 weeks ago
Joined: 2022-07-24 01:22
Some improvements

Hi, in general PortableApps.com does not accept third-party Launchers. Most likely they will not approve your project until you realized it with the "PortableApps.com Launcher". Also, the executable should named "ghdPortable.exe" and not "ghdPortable-XJDHDR.exe"
Here the main documentation page and here the most important information.
Thank you.

XJDHDR
Offline
Last seen: 3 months 2 weeks ago
Joined: 2014-12-31 09:15
I'll fix the name if and when

I'll fix the name if and when the PortableApps.com staff show an interest in adding this to their catalogue.

As for the 3rd party launcher, the main reason it's there is because I need to figure out when GitHub Desktop has actually closed before letting the PAL close. You start GitHub Desktop by running App\GitHubDesktop\GitHubDesktop.exe. This EXE then launches one or more copies of the GitHubDesktop.exe in the App-[version number] folder, and closes itself. Because of this, the PAL closes itself after the initial GitHubDesktop EXE closes, even though the program is still running.

This is worse if the program updates itself and you choose to restart & install the update. The old GitHubDesktop.exes close themselves and launch the updated versions. This also requires special logic to detect this happening which I haven't found in the PAL's capabilities.

You can find all this in the source code in the Source folder.

SimonGeek
Offline
Last seen: 8 months 4 weeks ago
Joined: 2022-07-24 01:22
The PAL is able to perform this action

You can use WaitForExeN for this purpose.

In addition, the PAL allows you to write custom code via the Custom.nsh.

Note: The "custom.nsh" file must be placed in "App/AppInfo/Launcher". The documentation is probably out of date.

Also, to be considered portable, a software should have updates disabled by default. It is not possible to have software that checks for updates even though it has been portabilized via a launcher.

Regards

XJDHDR
Offline
Last seen: 3 months 2 weeks ago
Joined: 2014-12-31 09:15
Name change, launcher removal & updater

Sorry for the late reply.

I could have sworn I read somewhere that PAL devs must have their username as a suffix for their creations unless it is an official app in the PA catalogue. I can't find it though, so the next release will have the name changed, as you suggested.

Next, I found that the WaitForExeN function did what it needed to, so thanks for that. The next release will also not include my launcher.

As for update checking, is this a rule or a guideline? If it's a rule, that might be a problem. There is an open issue requesting the option to disable auto updates, but it was opened back in 2017 and it doesn't look like such a feature will be added in the near future.

Edit: Never mind, I managed to figure out the problems with my code.
Finally, I wanted to write some custom NSH code to delete certain folders when the PAL closes, and wrote the following in a Custom.nsh that I put in the "App/AppInfo/Launcher" folder. It compiles without complaint but doesn't delete the desired folders. To give a specific example, I have two folders in the "%PAL:AppDir%\App\GitHubDesktop" folder named "app-3.2.3" and "app-3.3.3". In this case, I want to delete the 3.2.3 folder and leave the 3.3.3 folder intact. My current code doesn't delete either folder.
Does anything in my code jump out at you as incorrect? Thanks.


Section Post
; Delete any old versions in the App folder left behind by an update.

Var /GLOBAL palAppDir
ReadEnvStr $palAppDir "PAL:AppDir"

; Variables used for finding "app-*" folders
Var /GLOBAL searchHandle
Var /GLOBAL foundFile
Var /GLOBAL previousSearchResult
StrCpy $previousSearchResult = ""

; Start a search for "app-*" folders
FindFirst $searchHandle $foundFile "$palAppDir\GitHubDesktop\app-*"
RemoveOldVersionFolders:
; If the latest search result found nothing, break out of this loop.
StrCmp $foundFile "" RemoveOldVersionFoldersDone

${If} $previousSearchResult != ""
; If this is not the first loop, delete the folder found in the previous search loop.
RMDir /r "$previousSearchResult"
${EndIf}

; Copy this search result into the previous result var, and try find the next search result.
StrCpy $previousSearchResult $foundFile
FindNext $searchHandle $foundFile
Goto RemoveOldVersionFolders
RemoveOldVersionFoldersDone:
FindClose $searchHandle
SectionEnd

asalan
Offline
Last seen: 5 months 1 week ago
Joined: 2023-11-21 06:35
Update?

is there any new update?

XJDHDR
Offline
Last seen: 3 months 2 weeks ago
Joined: 2014-12-31 09:15
Too busy lately

I've been super busy with college and work over the last few months, and haven't had time to work on anything not related to those.

But what exactly is wrong with my upload that it needs an update?

asalan
Offline
Last seen: 5 months 1 week ago
Joined: 2023-11-21 06:35
Error & feature request

Error:
⚠️ This email address does not match your Github account. Your commits will be wrongly attributed. Learn more.

Screenshot

Steps to reproduce:
1. Download & open ghdPortable
2. Sign in with Github.com account
3. Clone a repository
4. Close ghdPortable
5. Download & install Github Desktop
6. Sign in with different Github.com account
7. Close Github Desktop
8. Open ghdPortable
9. Go to File > Options (Ctrl+,) > Git
10. Error: ⚠️ This email address does not match your Github account

Error cause: [user] data changed in global git config file (%userprofile%\.gitconfig) after step 6.


Feature Request:
Default folder name on Local path from Github to ghdPortable when clone or create repository.

Screenshot


Sorry for the late reply. ㅤ

asalan
Offline
Last seen: 5 months 1 week ago
Joined: 2023-11-21 06:35
Error fixed

Fixed error by adding [FilesMove] to ghdPortable\App\AppInfo\Launcher\ghdPortable.ini

Add to ghdPortable.ini

[FilesMove]
.gitconfig=%USERPROFILE%


code:

[Launch]
;ProgramExecutable=ghdPortable_Launcher.exe
ProgramExecutable=GitHubDesktop\GitHubDesktop.exe
MinOS=7
SinglePortableAppInstance=true
SplashTime=1000
WaitForEXE1=GitHubDesktop.exe
DirectoryMoveOK=yes

[Environment]
LocalAppData=%PAL:AppDir%

[DirectoriesMove]
AppData=%AppData%\GitHub Desktop
;..\App\GitHubDesktop=%LocalAppData%\GitHubDesktop

[DirectoriesCleanupIfEmpty]
1=%AppData%\GitHub Desktop
2=%LocalAppData%\GitHubDesktop

[DirectoriesCleanupForce]
1=%PAL:AppDir%\Microsoft
2=%PAL:AppDir%\NVIDIA
3=%PAL:AppDir%\SquirrelTemp

[FilesMove]
.gitconfig=%USERPROFILE%
XJDHDR
Offline
Last seen: 3 months 2 weeks ago
Joined: 2014-12-31 09:15
3.3.6 update

I've just updated this package to v3.3.6. Besides updating the base app to v3.3.6, I've also made two changes related to merging code that I previously had in a custom launcher into the base PAL:

  • Code that kept the PAL running during GitHub Desktop's startup was moved into the base PAL. This was necessary because while GHD is starting up, it closes the original exe that the PAL launches and opens another one that corresponds to the version of the program that needs to run. Additionally, while updating the program, it closes the old version and launches the new one.
  • When GHD updates itself, it leaves some unneeded files behind afterwards. My launcher, and now the PAL, deletes these unneeded files on exiting. Additionally, I have also made the PAL update it's appinfo.ini to use the version number of any updates downloaded.

Additionally, I have also uploaded two versions of my PAL. The one is the regular version, and the other is a version where the EXE that auto-updates the base app was deleted. Which one you download depends on whether you want the base app to automatically update itself, or not.

asalan
Offline
Last seen: 5 months 1 week ago
Joined: 2023-11-21 06:35
Fix

Please add the fix from #13 to the latest version (3.3.8)

Log in or register to post comments