Fork is a popular Git GUI for Mac but they recently released a Windows version.
I'm not sure on how to create the manifest file regarding the updates.
Some findings:
Fork\s([0-9]{1}\.[0-9]+) but don't know if that's possible?Fork installation seems pretty basic except for it needing git configuration (username, email)
and default code directory...

The installer seems to contain only the updater and the files packaged as a nuget package.

Any help on getting me started?
It could look like this:
{
"version": "1.19",
"description": "Fast and friendly git client for Mac and Windows.",
"homepage": "https://git-fork.com/windows",
"license": {
"identifier": ""
},
"url": "https://git-fork.com/update/win/ForkInstaller.exe#/dl.7z",
"hash": "",
"extract_to": "temp",
"installer": {
"script": [
"extract_7zip \"$dir\\temp\\Fork*full.nupkg\" \"$dir\\temp\"",
"Move-Item \"$dir\\temp\\lib\\net45\\*\" \"$dir\""
]
},
"post_install": "Remove-Item \"$dir\\temp\" -Force -Recurse",
"bin": "",
"shortcuts": [
[
"Fork.exe",
"Fork"
]
],
"checkver": {
"url": "https://git-fork.com/releasenoteswin",
"re": "<h4.*>Fork\\s+((\\d+\\.?)+)</h4>"
},
"autoupdate": {
"url": "https://git-fork.com/update/win/ForkInstaller.exe#/dl.7z"
}
}
Maybe someone have better solution to get nuget page directly, not from installer.
I would recommend this:
{
"homepage": "https://git-fork.com/",
"description": "A fast and friendly git client for Mac and Windows",
"license": {
"identifier": ""
},
"version": "1.19.0",
"url": "https://git-fork.com/update/win/Fork-1.19.0-full.nupkg#/dl.7z",
"hash": "sha1:f4a10adee420932bac2379ebe6931b3729a218dd",
"extract_dir": "lib\\net45",
"bin": "Fork.exe",
"post_install": "Remove-Item \"$dir\\PortableGit-*-bit.7z\" -Force -ErrorAction SilentlyContinue",
"shortcuts": [
[
"Fork.exe",
"Fork"
]
],
"suggest": {
"Git": [
"git",
"git-with-openssh"
]
},
"checkver": {
"url": "https://git-fork.com/update/win/RELEASES",
"re": "Fork-([\\d.]+)-full.nupkg",
"reverse": true
},
"autoupdate": {
"url": "https://git-fork.com/update/win/Fork-$version-full.nupkg#/dl.7z",
"hash": {
"url": "$baseurl/RELEASES"
}
}
}
Don't know what to add to the license property.
Urgh, it searches for Git in a hardcoded path ...
C:\Users\<user>\AppData\Local\Fork\git\bin\git.exe
@r15ch13 yeah, it comes with git-portable... ;,,;
Maybe we could ~remove that and~ set git as a dependency and link it?
Anyway, nice configuration to get me going!
Hi guys. I'm the Fork developer and I just accidentally run into this issue.
Currently Fork has a bit complicated installation and update processes because of the Squirrel framework:
I'm planning to improve this in the near future. Most probably I will switch to an MSI installer.
Now everything is fine for this scoop installer, but Git is problem. Git path is hardcoded inside source (https://github.com/lukesampson/scoop-extras/issues/1094#issuecomment-410347584) and would be awesome if we could set where to look for git (some ini file, registry, switch, ...)
It's always %localappdata%\fork\git, but I don't get why you need that. Fork will ask for user credentials and setup git on the first run anyway. Or do you want to avoid the welcome screen completely?
Why to use your boundled git, when you have git already installed?
Scoop uses git for almost everything == Everyone who installed scoop have git. So no need to use that boundled.
@DanPristupov Like @Ash258 said, Scoop requires Git, so it's most definitely in the %PATH%. A simple check to use an existing Git installation would save some disk space. 馃槃
SourceTree, for example, can use a build in version or a systemwide Git installation.
Scoop also sets %GIT_INSTALL_ROOT% (which is used by Cmder) to point to the correct path.
The Squirrel installer is no problem for Scoop. We just download the .nupkg instead of the setup.exe.
If you're going to change the installation routine anyway, may I ask if you could provide a simple 7z or zip file and SHA256 checksums? :smile:
@DanPristupov any news about the installer change? :smile:
@r15ch13 no, I'm too busy, unfortunately. There are too many more important feature requests.
@DanPristupov A check if %LocalAppData%\Fork\gitInstance\2.20.1\bin\git.exe is available and fallback to git.exe from %PATH% would solve this issue.
I didn't even notice this issue when I made it, but I made a Fork manifest in my own bucket. It's a bit hack-y, but it works well enough for my purposes.
I handled the git extraction through the script so I could remove unnecessary files as part of the install. Removing the 7z stuff also prevents the Fork setup screen from throwing any errors.
I didn't even notice this issue when I made it, but I made a Fork manifest in my own bucket. It's a bit hack-y, but it works well enough for my purposes.
{ "version": "1.37.2", "description": "A fast and friendly git client for Mac and Windows", "homepage": "https://git-fork.com/", "license": "https://git-fork.com/license", "url": "http://fork.dev/update/win/Fork-1.37.2-full.nupkg#/dl.7z", "hash": "sha1:abaa753d9cbeeeb157ec9ba7b5865bf7a2979986", "extract_dir": "lib\\net45", "installer": { "script": [ "$versionPattern = \"([\\d]+\\.)+[\\d]\"", "$gitZipPattern = [regex]::escape(\"PortableGit-\") + \"$versionPattern\" + [regex]::escape(\"-64-bit.7z\")", "$zips = Get-ChildItem \"$dir\" *.7z", "$gitZip = $zips -match $gitZipPattern | Foreach {$matches[0]}", "$gitVersion = $gitZip -match $versionPattern | Foreach {$matches[0]}", "Expand-7zipArchive \"$dir\\$gitZip\" \"$env:LOCALAPPDATA\\fork\\gitInstance\\$gitVersion\"", "cmd.exe /c \"$env:LOCALAPPDATA\\fork\\gitInstance\\$gitVersion\\post-install.bat\"", "Remove-Item -LiteralPath \"$dir\\lib\", \"$dir\\[Content_Types].xml\", \"$dir\\7z.exe\", `", "\"$dir\\7z.dll\", \"$dir\\$gitZip\", \"$dir\\Fork_ExecutionStub.exe\" -Force" ] }, "uninstaller": { "script": [ "if(Test-Path \"$env:LOCALAPPDATA\\fork\\gitInstance\") {", " Remove-Item -LiteralPath \"$env:LOCALAPPDATA\\fork\\gitInstance\" -Force -Recurse", "}" ] }, "bin": "Fork.exe", "shortcuts": [ [ "Fork.exe", "Fork" ] ], "checkver": { "url": "http://fork.dev/update/win/RELEASES", "regex": "Fork-([\\d.]+)-full.nupkg", "reverse": true }, "autoupdate": { "url": "http://fork.dev/update/win/Fork-$version-full.nupkg#/dl.7z", "hash": { "url": "$baseurl/RELEASES" } } }I handled the git extraction through the script so I could remove unnecessary files as part of the install. Removing the 7z stuff also prevents the Fork setup screen from throwing any errors.
Awesome, I'll test this on my machine!
This is my try based on @r15ch13 's manifest, thanks! I just worry if it will break down when git is updated. If there is no problem i'll pr.
{
"version": "1.37.2",
"homepage": "https://git-fork.com/",
"description": "A fast and friendly git client for Mac and Windows",
"license": {
"identifier": "Freeware",
"url": "https://git-fork.com/license"
},
"url": "https://git-fork.com/update/win/Fork-1.37.2-full.nupkg",
"hash": "sha1:abaa753d9cbeeeb157ec9ba7b5865bf7a2979986",
"extract_dir": "lib\\net45",
"bin": "Fork.exe",
"post_install": [
"$version = (Get-Item \"$dir\\PortableGit*\") -Replace '[^\\d]+([\\d.]+).+', '$1'",
"Remove-Item \"$dir\\PortableGit-*\", \"$dir\\7z*\" -Force -ErrorAction SilentlyContinue",
"if(!(Test-Path \"$Env:LocalAppdata\\Fork\\gitInstance\")) {",
" New-Item \"$Env:LocalAppdata\\Fork\\gitInstance\\$version\" -ItemType Junction -Target \"$(scoop which git)\\..\\..\" -Force | Out-Null",
"}"
],
"shortcuts": [
[
"Fork.exe",
"Fork"
]
],
"checkver": {
"url": "https://git-fork.com/update/win/RELEASES",
"regex": "Fork-([\\d.]+)-full.nupkg",
"reverse": true
},
"autoupdate": {
"url": "https://git-fork.com/update/win/Fork-$version-full.nupkg",
"hash": {
"url": "$baseurl/RELEASES"
}
}
}
Currently that manifest will not work if the user doesn't have scoop's git installed, or if they are instead using git-with-openssh. The former could be solved with a "depends":, but I'm not sure what would be a good way to handle the latter.
EDIT: I like the idea of using a junction though - I modified my script to be a bit more like yours, and account for any possible git installation (using Fork's own included git version as a last resort).
{
"version": "1.37.2",
"description": "A fast and friendly git client for Mac and Windows",
"homepage": "https://git-fork.com/",
"license": {
"identifier": "Freeware",
"url": "https://git-fork.com/license"
},
"url": "http://fork.dev/update/win/Fork-1.37.2-full.nupkg#/dl.7z",
"hash": "sha1:abaa753d9cbeeeb157ec9ba7b5865bf7a2979986",
"extract_dir": "lib\\net45",
"post_install": [
"$gitVersion = (Get-Item \"$dir\\PortableGit*\") -Replace '[^\\d]+([\\d.]+).+', '$1'",
"$gitZip = \"$dir\\PortableGit-$gitVersion-64-bit.7z\"",
"if(Test-Path \"$(scoop which git)\\..\\..\") {",
" New-Item \"$Env:LocalAppdata\\Fork\\gitInstance\\$gitVersion\" -ItemType Junction -Target \"$(scoop which git)\\..\\..\" -Force | Out-Null",
"} Else {",
" Expand-7zipArchive $gitZip \"$env:LOCALAPPDATA\\fork\\gitInstance\\$gitVersion\"",
"}",
"Remove-Item $gitZip, \"$dir\\lib\", \"$dir\\7z.*\", \"$dir\\Fork_ExecutionStub.exe\" -Force"
],
"uninstaller": {
"script": [
"if(Test-Path \"$env:LOCALAPPDATA\\fork\\gitInstance\") {",
" Remove-Item -LiteralPath \"$env:LOCALAPPDATA\\fork\\gitInstance\" -Force -Recurse",
"}"
]
},
"bin": "Fork.exe",
"shortcuts": [
[
"Fork.exe",
"Fork"
]
],
"checkver": {
"url": "http://fork.dev/update/win/RELEASES",
"regex": "Fork-([\\d.]+)-full.nupkg",
"reverse": true
},
"autoupdate": {
"url": "http://fork.dev/update/win/Fork-$version-full.nupkg#/dl.7z",
"hash": {
"url": "$baseurl/RELEASES"
}
}
}
The only potential remaining problem I see is, if the user does not have scoop's git or git-with-openssh installed, AND is running Windows 10 32-bit, I don't believe Fork's included version of PortableGit will work out of the box.
Scoop also sets %GIT_INSTALL_ROOT% (which is used by Cmder) to point to the correct path.
I just find that we can find git easily. How do you think about this idea? I have updated my manifest.
I don't think that variable is an actual thing - at least not in scoop. I can't actually find any reference to it in relation to scoop aside from this thread, and one mention in a Cmder project issue.
It doesn't exist in my environment variables, and scoop doesn't seem to set it during installs or some such, so that just returns a blank string.
Also for note (Get-Item \"$dir\\PortableGit*\") -Replace '[^\\d]+([\\d.]+).+', '$1'" appears to return the Fork version number, but the folder Fork looks for is %AppData%\ForkgitInstance\
Thanks for your test. I found that it's set when scoop install git. Another way is $(scoop which git)\..\... It works for me, too. Could you please test it ?
(Get-Item \"$dir\\PortableGit*\") -Replace '[^\\d]+([\\d.]+).+', '$1'" returns the git version in fork.
That one appears to work with git-with-openssh, edited my above code.
I know it 'seems' like it should return the git version, but it doesn't. For testing purposes I changed the line in my manifest with $gitVersion to it, and it creates the folder as the Fork version.

EDIT: And yeah, it appears that %GIT_INSTALL_ROOT% is added in git, but not git-with-openssh. I've opened another issue in the main bucket.
It does work for me. I have test your manifest , if only change one line it does not work. Strange :confused: Could you test my manifest?
Ah yeah, I figured out why - it has to do with it having been in the installer instead of post_install. No idea why it returns a value of the app version in that case though.
That aside, I feel the manifest is about as good as it can get now without modifications from the Fork developer's side. The only real things I prefer are:
depends to be honest, but I don't think you can specify it to check for git or git-with-openssh, so using one or the other would potentially result in two versions of git getting installed for some peopleI've edited my manifest one more time to reflect my preferred version.
Great, could you pr? And please change the url. Now we don't need #/dl.7z for nupkg file and please use https url. I don't think we need to use the fork's git as scoop need git to work so there must be a git in the system.
It will not work in installer because when install $dir is not a current dir so the regex will match the fork version. It can be fixed with a more strict regex.
Sure - will make those adjustments and PR shortly.
Most helpful comment
@DanPristupov Like @Ash258 said, Scoop requires Git, so it's most definitely in the
%PATH%. A simple check to use an existing Git installation would save some disk space. 馃槃SourceTree, for example, can use a build in version or a systemwide Git installation.
Scoop also sets
%GIT_INSTALL_ROOT%(which is used by Cmder) to point to the correct path.The Squirrel installer is no problem for Scoop. We just download the
.nupkginstead of the setup.exe.If you're going to change the installation routine anyway, may I ask if you could provide a simple 7z or zip file and
SHA256checksums? :smile: