TigerVNC / tigervnc

High performance, multi-platform VNC client and server
https://tigervnc.org
GNU General Public License v2.0
5.09k stars 934 forks source link

`BUILD_STATIC=ON` but win-installer doesn't contain necessary DLLs #1778

Closed a90091343 closed 3 months ago

a90091343 commented 3 months ago

Describe the bug When I build a TigerVNC viewer installer for Windows and install it on another Windows computer, it reports errors such as "The code execution cannot proceed because libffi-8.dll was not found."

To Reproduce Compile Env:

Screenshots image

Probably Solution

Source: "C:\msys64\ucrt64\bin\libffi-8.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace;
Source: "C:\msys64\ucrt64\bin\libp11-kit-0.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace;
Source: "C:\msys64\ucrt64\bin\libunistring-5.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace;
Source: "C:\msys64\ucrt64\bin\libintl-8.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace;
Source: "C:\msys64\ucrt64\bin\libiconv-2.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace;

I added the above lines to the [Setup] section in the tigervnc\release\tigervnc.iss.in file to ensure Inno Setup packages these necessary DLLs. After rebuilding, I can install and use the application normally.

CendioOssman commented 3 months ago

I'm afraid the static build option is only a best effort one. If the build environment doesn't contain static libraries, then it cannot produce distributable binaries. In most cases, you'll need to build all dependencies yourself to get static versions of everything.