From 7ad9844ac0cf80cff9768f69fa306aa99b9357aa Mon Sep 17 00:00:00 2001 From: jmorganca Date: Thu, 15 Feb 2024 00:10:26 +0000 Subject: [PATCH] set exe metadata using resource files --- app/.gitignore | 1 + app/ollama.rc | 30 ++++++++++++++++++++++++++++++ scripts/build_windows.ps1 | 1 + 3 files changed, 32 insertions(+) create mode 100644 app/.gitignore create mode 100644 app/ollama.rc diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 00000000..0aa24794 --- /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 00000000..18652428 --- /dev/null +++ b/app/ollama.rc @@ -0,0 +1,30 @@ +#include + +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 5da898ac..fae821e2 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}") {