{"action":"created","issue":{"url":"https://api.github.com/repos/gitextensions/gitextensions/issues/4967","repository_url":"https://api.github.com/repos/gitextensions/gitextensions","labels_url":"https://api.github.com/repos/gitextensions/gitextensions/issues/4967/labels{/name}","comments_url":"https://api.github.com/repos/gitextensions/gitextensions/issues/4967/comments","events_url":"https://api.github.com/repos/gitextensions/gitextensions/issues/4967/events","html_url":"https://github.com/gitextensions/gitextensions/issues/4967","id":324387381,"number":4967,"title":"Automatic installation of git during GE install","user":{"login":"RussKie","id":4403806,"avatar_url":"https://avatars3.githubusercontent.com/u/4403806?v=4","gravatar_id":"","url":"https://api.github.com/users/RussKie","html_url":"https://github.com/RussKie","followers_url":"https://api.github.com/users/RussKie/followers","following_url":"https://api.github.com/users/RussKie/following{/other_user}","gists_url":"https://api.github.com/users/RussKie/gists{/gist_id}","starred_url":"https://api.github.com/users/RussKie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RussKie/subscriptions","organizations_url":"https://api.github.com/users/RussKie/orgs","repos_url":"https://api.github.com/users/RussKie/repos","events_url":"https://api.github.com/users/RussKie/events{/privacy}","received_events_url":"https://api.github.com/users/RussKie/received_events","type":"User","site_admin":false},"labels":[{"id":33361370,"url":"https://api.github.com/repos/gitextensions/gitextensions/labels/discussion","name":"discussion","color":"8888FF","default":false},{"id":4290882,"url":"https://api.github.com/repos/gitextensions/gitextensions/labels/installer","name":"installer","color":"d7e102","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":36,"created_at":"2018-05-18T12:15:13Z","updated_at":"2018-05-23T13:30:04Z","closed_at":null,"author_association":"MEMBER","body":"Extracted from #4515\r\n\r\n@bimimicah:\r\n\r\nWould anyone be interested in code allowing git to be downloaded during the install process, rather than bundling it with the installer? This would allow us to keep helping users update git, with the added bonus of always installing the latest version.\r\n\r\nAccording to the [WiX Documentation](http://wixtoolset.org/documentation/manual/v3/bundle/authoring_bundle_package_manifest.html), we can create an \\<ExePackage> that downloads the latest version during setup (we can add an install option/condition, to keep the choice with the user):\r\n\r\n\r\n            <ExePackage \r\n              Name=\"MyPackage.exe\"\r\n              DetectCondition=\"ExeDetectedVariable\"\r\n              DownloadUrl=\"http://example.com/?mypackage.exe\"\r\n              InstallCommand=\"/q /ACTION=Install\"\r\n              RepairCommand=\"/q ACTION=Repair /hideconsole\"\r\n              UninstallCommand=\"/q ACTION=Uninstall /hideconsole\" \r\n              InstallCondition=\"NOT VersionNT64 AND VersionNT >= v5.1\" />\r\n\r\n\r\nThe most important part is to set DownloadUrl to the \"latest\" link for git for windows.\r\nThis could be an issue, because GitHub doesn't have a way (that I've found) to link directly to the latest release binary. So, to resolve that, I created a quick, draft-version AWS lambda function*:\r\n\r\n[https://wkl5nf5m2e.execute-api.us-west-2.amazonaws.com/download-git-windows](https://wkl5nf5m2e.execute-api.us-west-2.amazonaws.com/download-git-windows)\r\n\r\n    //API gateway must be configured to add \"redirectLocation\" as the HTTP Location header\r\n    //the XMLHttpRequest node.js library must be included\r\n    var sys = require('util');\r\n    var XMLHttpRequest = require(\"XMLHttpRequest\").XMLHttpRequest;\r\n    \r\n    exports.handler = (event, context, callback) => {\r\n        \r\n        var downloadpath = \"\";\r\n        \r\n        var xml = new XMLHttpRequest();\r\n        xml.open(\"GET\",\"https://api.github.com/repos/git-for-windows/git/releases/latest\",false);\r\n        xml.send();\r\n        var responseJSON = JSON.parse(xml.responseText);\r\n        downloadpath = responseJSON.assets[0].browser_download_url; //first release asset is 32-bit git - this will break if they change the order\r\n        \r\n        const httpResponse = {\r\n            lastCheck: Math.round(Date.now() / 3600000),\r\n            redirectlocation: downloadpath\r\n        }\r\n        \r\n        callback(null, httpResponse);\r\n    };\r\n\r\n*Note:  API gateway must be configured to add \"redirectLocation\" as the HTTP Location header, and the XMLHttpRequest node.js library must be included\r\n\r\nI hope this is helpful. I would be willing to take some of my free time to work on this, if anyone is interested. My personal opinion is that bundling git (in some form) would be in the best interests of GitExtensions's users (staying up-to-date), and I hope this (or something similar) would be a workable compromise which makes things simpler for the developers too.\r\n"},"comment":{"url":"https://api.github.com/repos/gitextensions/gitextensions/issues/comments/391347025","html_url":"https://github.com/gitextensions/gitextensions/issues/4967#issuecomment-391347025","issue_url":"https://api.github.com/repos/gitextensions/gitextensions/issues/4967","id":391347025,"user":{"login":"EbenZhang","id":596334,"avatar_url":"https://avatars0.githubusercontent.com/u/596334?v=4","gravatar_id":"","url":"https://api.github.com/users/EbenZhang","html_url":"https://github.com/EbenZhang","followers_url":"https://api.github.com/users/EbenZhang/followers","following_url":"https://api.github.com/users/EbenZhang/following{/other_user}","gists_url":"https://api.github.com/users/EbenZhang/gists{/gist_id}","starred_url":"https://api.github.com/users/EbenZhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EbenZhang/subscriptions","organizations_url":"https://api.github.com/users/EbenZhang/orgs","repos_url":"https://api.github.com/users/EbenZhang/repos","events_url":"https://api.github.com/users/EbenZhang/events{/privacy}","received_events_url":"https://api.github.com/users/EbenZhang/received_events","type":"User","site_admin":false},"created_at":"2018-05-23T13:30:04Z","updated_at":"2018-05-23T13:30:04Z","author_association":"CONTRIBUTOR","body":"Might be an edge case since git has pretty well backwards compatibility. Say GE2 compatible with git [2.0, 3.0], GENext compatible with git [2.5, 3.0], if I’m not wrong the json will have [2.5, 3.0], what happens if we actually found GE2 is just compatible with git [2.0, 2.4] after GE2 released a couple of months and the users have installed git 2.5 as recommended, are we going to tell the user that GE2 is not compatible with git 2.5, you need to use the next version of GE which will be released in hmm maybe 6 months?"}}
{"actor":{"display_login":"EbenZhang"}}