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 .PHONY: app
app: ollama app: ollama
npm run --prefix app package npm run --prefix app make
clean: clean:
go clean go clean

View file

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

View file

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

View file

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