Modify AutoUpdater behavior on macOS.
The AutoUpdater requires that macOS builds be code signed. That is currently not possible. As a workaround, the autoupdater on mac will now alert users that an update is available and give the option to download the file directly from GitHub. Closes #16.
This commit is contained in:
@@ -2099,6 +2099,8 @@ input:checked + .toggleSwitchSlider:before {
|
||||
|
||||
/* Update action button styles. */
|
||||
#settingsUpdateActionButton {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-left: 10px;
|
||||
background: none;
|
||||
border: none;
|
||||
|
||||
@@ -1109,7 +1109,14 @@ function populateSettingsUpdateInformation(data){
|
||||
settingsUpdateChangelogTitle.innerHTML = data.releaseName
|
||||
settingsUpdateChangelogText.innerHTML = data.releaseNotes
|
||||
populateVersionInformation(data.version, settingsUpdateVersionValue, settingsUpdateVersionTitle, settingsUpdateVersionCheck)
|
||||
settingsUpdateButtonStatus('Downloading..', true)
|
||||
|
||||
if(process.platform === 'darwin'){
|
||||
settingsUpdateButtonStatus('Download from GitHub<span style="font-size: 10px;color: gray;text-shadow: none !important;">Close the launcher and run the file to update.</span>', false, () => {
|
||||
shell.openExternal(data.darwindownload)
|
||||
})
|
||||
} else {
|
||||
settingsUpdateButtonStatus('Downloading..', true)
|
||||
}
|
||||
} else {
|
||||
settingsUpdateTitle.innerHTML = 'You Are Running the Latest Version'
|
||||
settingsUpdateChangelogCont.style.display = 'none'
|
||||
|
||||
@@ -47,6 +47,12 @@ if(!isDev){
|
||||
break
|
||||
case 'update-available':
|
||||
loggerAutoUpdaterSuccess.log('New update available', info.version)
|
||||
|
||||
if(process.platform === 'darwin'){
|
||||
info.darwindownload = `https://github.com/WesterosCraftCode/ElectronLauncher/releases/download/v${info.version}/westeroscraftlauncher-${info.version}.dmg`
|
||||
showUpdateUI(info)
|
||||
}
|
||||
|
||||
populateSettingsUpdateInformation(info)
|
||||
break
|
||||
case 'update-downloaded':
|
||||
|
||||
Reference in New Issue
Block a user