Skip to content

Commit 09503a0

Browse files
committed
builder logpath - mid issue solution
1 parent 00c438f commit 09503a0

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

logPath.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
//logPath.js
2+
console.log(process.env.PATH);

main.js

+16-19
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ function runOllamaCommand() {
4343
});
4444
}
4545

46+
// Define the createWindow function
4647
function createWindow () {
4748
// Create the browser window.
4849
const mainWindow = new BrowserWindow({
4950
// width: 800,
50-
// height: 1000,
51+
height: 800,
5152
webPreferences: {
5253
preload: path.join(__dirname, 'preload.js')
5354
}
@@ -60,39 +61,33 @@ function createWindow () {
6061
// Open the DevTools.
6162
// mainWindow.webContents.openDevTools()
6263
mainWindow.webContents.openDevTools()
64+
6365
}
6466

6567
// This method will be called when Electron has finished
6668
// initialization and is ready to create browser windows.
6769
// Some APIs can only be used after this event occurs.
6870
app.whenReady().then(() => {
69-
// checkOllama()
70-
// .then(createWindow)
71-
// .catch((error) => {
72-
// console.error('Failed to install or start Ollama:', error);
73-
// // Handle the error, maybe inform the user through a dialog
74-
// });
75-
// OllamaManager.startOllama();
76-
createWindow();
77-
// app.on('activate', function () {
78-
// // On macOS it's common to re-create a window in the app when the
79-
// // dock icon is clicked and there are no other windows open.
80-
// if (BrowserWindow.getAllWindows().length === 0) createWindow();
81-
runOllamaCommand(); // Serve Ollama
71+
// runOllamaCommand(); // Serve Ollama
8272
createWindow();
8373

8474

85-
// })
75+
76+
app.on('activate', function () {
77+
// On macOS it's common to re-create a window in the app when the
78+
// dock icon is clicked and there are no other windows open.
79+
if (BrowserWindow.getAllWindows().length === 0) createWindow()
80+
})
8681
})
8782

8883
// Quit when all windows are closed, except on macOS. There, it's common
8984
// for applications and their menu bar to stay active until the user quits
9085
// explicitly with Cmd + Q.
9186
// Quit when all windows are closed, and kill Ollama process
9287
app.on('window-all-closed', function() {
93-
if (ollamaProcess !== null) {
88+
/* if (ollamaProcess !== null) {
9489
ollamaProcess.kill(); // Kill Ollama process
95-
}
90+
} */
9691
if (process.platform !== 'darwin') app.quit();
9792
});
9893

@@ -104,13 +99,15 @@ app.on('window-all-closed', function() {
10499
app.on('before-quit', function () {
105100
// This will handle the Cmd + Q case on macOS
106101
// You can do any cleanup here before your application quits
107-
ollamaProcess.kill(); // Kill Ollama process
102+
// ollamaProcess.kill(); // Kill Ollama process
108103
});
109104

110105
app.on('will-quit', function () {
111106
// This will handle the Cmd + Q case on macOS
112107
// You can do any cleanup here before your application quits
113-
ollamaProcess.kill(); // Kill Ollama process
108+
109+
// ollamaProcess.kill(); // Kill Ollama process
110+
114111
});
115112

116113
// In this file you can include the rest of your app's specific main process

package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,19 @@
1616
"pack-mac64": "electron-builder --mac --x64",
1717
"pack-mac": "electron-builder --mac",
1818
"pack-linux": "electron-builder --linux",
19-
"postbuild": "dpkg-sig --sign builder dist/*.deb"
19+
"postbuild": "dpkg-sig --sign builder dist/*.deb",
20+
"package-mac64": "electron-builder --mac --x64",
21+
"package-mac": "electron-builder --mac",
22+
"package-linux": "electron-builder --linux",
23+
"pack": "electron-builder --dir"
2024
},
2125
"keywords": [
2226
"Local",
2327
"Sovereign",
2428
"AI"
2529
],
2630
"author": "Morpheus",
27-
"license": "Unlicense",
31+
"license": "MIT",
2832
"devDependencies": {
2933
"cross-env": "^7.0.3",
3034
"electron": "^27.0.4",

ui/index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ <h5 class="modal-title" id="settingsModalLabel">Ollama Settings</h5>
145145
submitRequest(); // submit the form
146146
}
147147
});
148-
</script>
148+
149+
</script>
149150

150151
<script src="api.js"></script>
151152
<script src="chat.js"></script>

0 commit comments

Comments
 (0)