Unverified Commit 1ae1c336 authored by Jeffrey Morgan's avatar Jeffrey Morgan Committed by GitHub
Browse files

Windows build + installer adjustments (#2656)

* remove `-w -s` linker flags on windows

* use `zip` for windows installer compression
parent efe040f8
...@@ -37,7 +37,7 @@ PrivilegesRequired=lowest ...@@ -37,7 +37,7 @@ PrivilegesRequired=lowest
OutputBaseFilename="OllamaSetup" OutputBaseFilename="OllamaSetup"
SetupIconFile={#MyIcon} SetupIconFile={#MyIcon}
UninstallDisplayIcon={uninstallexe} UninstallDisplayIcon={uninstallexe}
Compression=lzma2 Compression=zip
SolidCompression=no SolidCompression=no
WizardStyle=modern WizardStyle=modern
ChangesEnvironment=yes ChangesEnvironment=yes
......
...@@ -53,7 +53,7 @@ function buildOllama() { ...@@ -53,7 +53,7 @@ function buildOllama() {
write-host "Building ollama CLI" write-host "Building ollama CLI"
& go generate ./... & go generate ./...
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
& go build "-ldflags=-w -s ""-X=github.com/jmorganca/ollama/version.Version=$script:VERSION"" ""-X=github.com/jmorganca/ollama/server.mode=release""" . & go build "-ldflags=""-X=github.com/jmorganca/ollama/version.Version=$script:VERSION"" ""-X=github.com/jmorganca/ollama/server.mode=release""" .
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
if ("${env:KEY_CONTAINER}") { if ("${env:KEY_CONTAINER}") {
& "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${script:OLLAMA_CERT}" ` & "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${script:OLLAMA_CERT}" `
...@@ -68,7 +68,7 @@ function buildApp() { ...@@ -68,7 +68,7 @@ function buildApp() {
write-host "Building Ollama App" write-host "Building Ollama App"
cd "${script:SRC_DIR}\app" cd "${script:SRC_DIR}\app"
& windres -l 0 -o ollama.syso ollama.rc & windres -l 0 -o ollama.syso ollama.rc
& go build "-ldflags=-H windowsgui -w -s ""-X=github.com/jmorganca/ollama/version.Version=$script:VERSION"" ""-X=github.com/jmorganca/ollama/server.mode=release""" . & go build "-ldflags=-H windowsgui ""-X=github.com/jmorganca/ollama/version.Version=$script:VERSION"" ""-X=github.com/jmorganca/ollama/server.mode=release""" .
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
if ("${env:KEY_CONTAINER}") { if ("${env:KEY_CONTAINER}") {
& "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${script:OLLAMA_CERT}" ` & "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${script:OLLAMA_CERT}" `
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment