Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
fixed auto updater, it works now
Browse files Browse the repository at this point in the history
  • Loading branch information
FormalSnake committed Jun 30, 2022
1 parent e1715f2 commit d9d43ff
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 3 deletions.
13 changes: 11 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ var shell =
? "powershell.exe"
: shellSettings; /* "/opt/homebrew/bin/fish"*/

autoUpdater.checkForUpdatesAndNotify();

let mainWindow;
function createWindow() {
mainWindow = new BrowserWindow({
Expand All @@ -44,6 +42,17 @@ function createWindow() {
mainWindow = null;
});

autoUpdater.checkForUpdatesAndNotify();
autoUpdater.on("update-available", function () {
mainWindow.loadURL(`file://${__dirname}/updater.html`);
});
autoUpdater.on("update-downloaded", (updateInfo) => {
setTimeout(() => {
autoUpdater.quitAndInstall();
app.exit();
}, 10000);
});

//ipcing

var ptyProcess = pty.spawn(shell, [], {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kaiium",
"version": "1.0.1",
"version": "1.0.3",
"description": "Terminal",
"main": "main.js",
"repository": {
Expand Down
16 changes: 16 additions & 0 deletions updater.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
body,
html {
color: white;
background-color: #1a1a1a;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

.UpdatingStatus {
justify-content: center;
align-items: center;
}
20 changes: 20 additions & 0 deletions updater.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="updater.css" />
<title>Updating Kaiium</title>
</head>
<body>
<!--<div
id="DragBar"
style="-webkit-app-region: drag; width: 100%; height: 20px"
></div>-->
<div id="UpdatingStatus">
<h1>Updating...</h1>

<p>"It's over anakin! I have the high ground!"</p>
</div>
</body>
</html>

0 comments on commit d9d43ff

Please sign in to comment.