Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

set exe metadata using resource files

jmorganca7ad9844ac0cf
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 000000000..0aa247948
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+ollama.syso
diff --git a/app/ollama.rc b/app/ollama.rc
new file mode 100644
index 000000000..18652428c
--- /dev/null
+++ b/app/ollama.rc
@@ -0,0 +1,30 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "CompanyName", "Ollama Inc."
+ VALUE "FileDescription", "Ollama"
+ VALUE "InternalName", "Ollama"
+ VALUE "OriginalFilename", "ollama app.exe"
+ VALUE "ProductName", "Ollama"
+ END
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
diff --git a/scripts/build_windows.ps1 b/scripts/build_windows.ps1
index 5da898ac6..fae821e29 100644
--- a/scripts/build_windows.ps1
+++ b/scripts/build_windows.ps1
@@ -65,6 +65,7 @@ function buildOllama() {
function buildApp() {
write-host "Building Ollama App"
cd "${script:SRC_DIR}\app"
+ & 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""" .
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
if ("${env:KEY_CONTAINER}") {