Skip to content

Commit eb06814

Browse files
committed
feat: mac auto updater
1 parent 0c280b5 commit eb06814

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

src/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"glob_help_url": "https://github.com/adobe/brackets/wiki/Using-File-Filters",
1111
"release_notes_url": "https://github.com/adobe/brackets/wiki/Release-Notes",
1212
"homepage_url": "https://phcode.io",
13+
"update_download_page": "https://phcode.io/downloads",
1314
"twitter_url": "https://twitter.com/phcodedev",
1415
"troubleshoot_url": "https://github.com/adobe/brackets/wiki/Troubleshooting#wiki-livedev",
1516
"twitter_name": "@phcodedev",

src/extensionsIntegrated/appUpdater/main.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,11 @@ define(function (require, exports, module) {
371371
function failUpdateDialogAndExit(err) {
372372
console.error("error updating: ", err);
373373
dialog && dialog.close();
374-
Dialogs.showInfoDialog(Strings.UPDATE_FAILED_TITLE, Strings.UPDATE_FAILED_MESSAGE)
375-
.done(resolve);
374+
Dialogs.showInfoDialog(Strings.UPDATE_FAILED_TITLE, Strings.UPDATE_FAILED_VISIT_SITE_MESSAGE)
375+
.done(()=>{
376+
NativeApp.openURLInDefaultBrowser(Phoenix.config.update_download_page)
377+
.finally(resolve);
378+
});
376379
}
377380
if (brackets.platform === "win") {
378381
launchWindowsInstaller()

src/nls/root/strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ define({
575575
"UPDATE_INSTALLING": "Installing Update\u2026",
576576
"UPDATE_INSTALLING_MESSAGE": "Update Installation in Progress: {APP_NAME} is currently installing the latest updates. The application will automatically close once the installation is complete.",
577577
"UPDATE_FAILED_MESSAGE": "Please close all {APP_NAME} app windows and reopen the application to attempt the update again.",
578+
"UPDATE_FAILED_VISIT_SITE_MESSAGE": "To retry, please exit all instances of {APP_NAME} and restart the application. <br>You will be directed to our download page shortly, where you can manually download the latest version.",
578579
"UPDATE_UP_TO_DATE": "{APP_NAME} is up to date.",
579580
"UPDATE_MESSAGE": "Hey, there's a new build of {APP_NAME} available. Here are some of the new features:",
580581
"GET_IT_NOW": "Get it now!",

src/utils/NativeApp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ define(function (require, exports, module) {
111111
* in browser. Doesn't do anything in tauri.
112112
*/
113113
function openURLInDefaultBrowser(url, tabIdentifier) {
114-
brackets.app.openURLInDefaultBrowser(url, tabIdentifier);
114+
return brackets.app.openURLInDefaultBrowser(url, tabIdentifier);
115115
}
116116

117117
function getApplicationSupportDirectory() {

0 commit comments

Comments
 (0)