update app to use go binary

This commit is contained in:
Jeffrey Morgan 2023-07-06 11:21:56 -04:00
parent 9fe018675f
commit 879e996ca4
4 changed files with 5 additions and 5 deletions

View file

@ -11,7 +11,7 @@ ollama: llama
.PHONY: app
app: ollama
npm run --prefix app package
npm run --prefix app make
clean:
go clean

View file

@ -14,7 +14,7 @@ const config: ForgeConfig = {
packagerConfig: {
asar: true,
icon: './images/icon',
extraResource: ['../dist/ollama'],
extraResource: ['../ollama'],
...(process.env.SIGN
? {
osxSign: {

View file

@ -9,7 +9,7 @@
"package": "electron-forge package",
"package:sign": "SIGN=1 electron-forge package",
"make": "electron-forge make",
"make:sign": "SIGN=1 electron-forge package",
"make:sign": "SIGN=1 electron-forge make",
"publish": "SIGN=1 electron-forge publish",
"lint": "eslint --ext .ts,.tsx ."
},

View file

@ -43,9 +43,9 @@ if (app.isPackaged) {
console.log(resources)
// Start the executable
const exec = path.join(resources, 'ollama', 'ollama')
const exec = path.join(resources, 'ollama')
console.log(`Starting ${exec}`)
const proc = spawn(exec, ['serve', '--port', '7734'])
const proc = spawn(exec, ['serve'])
proc.stdout.on('data', data => {
console.log(`server: ${data}`)
})