TigerVNC / tigervnc

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

Cannot do silent install of WinVNC #1612

Open kolldrome opened 1 year ago

kolldrome commented 1 year ago

Hello,

I'm trying to do a remote installation of tigerVNC on windows and this inno setup message is preventing me from doing it, because the installation stops at this point. The function is in /release/winvnc.iss.in

function InitializeSetup: Boolean;
begin
  GetWindowsVersionEx(OSVersion);
  MsgBox('TigerVNC Windows Server is currently unmaintained and may not function correctly.', mbError, MB_OK);
  Result := True;
end;

Even using these inno setup options:

/VERYSILENT /SUPPRESSMSGBOXES

could this warning be indicated so that using these two options in the installation would make a true silent installation?

Greetings.

--- Want to back this issue? **[Post a bounty on it!](https://app.bountysource.com/issues/119469426-cannot-do-silent-install-of-winvnc?utm_campaign=plugin&utm_content=tracker%2F3557444&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://app.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F3557444&utm_medium=issues&utm_source=github).
CendioOssman commented 1 year ago

Hopefully. One would have hoped that MsgBox() would have been silenced implicitly by the /SUPRESSMSGBOXES flag, but apparently not.

I'm afraid I'm not too familiar with Inno Setup, so I don't know what the fix would be. Someone would need to dig around their documentation a bit and see how this is supposed to be handled.

skerdhantra commented 1 year ago

@kolldrome workaround for me. wait 3 seconds and send key ENTER

timeout 3 $wshell = New-Object -ComObject wscript.shell; $wshell.SendKeys('~')

kolldrome commented 1 year ago

Hello, the solution of pressing the enter key did not work for me.

As a hobby I have compiled the code and modified the winvnc.iss script removing the msgbox following this manual:

https://github.com/TigerVNC/tigervnc/wiki/Compiling-TigerVNC-for-Windows

using this command

cmake -G "MinGW Makefiles" ../

instead of this one which is recommended in the BUILDING.txt file. Is this a bug in the documentation?

cmake -G "MSYS Makefiles" ../

I managed to compile it in a semi static way by coding a little bit the StaticBuild.cmake file

-DBUILD_STATIC=1 

adding in position 68 the following line

set(GNUTLS_LIBRARIES "-Wl,-Bstatic -lgnutls -lpthread -lzstd -lbrotlidec -lbrotlienc -lbrotlicommon")

and adding -pthread in the BUILD_STATIC_GCC section.

due to the problem with the p11-kit library which is only dynamic I have not been able to compile it full static.

Update build system so it will compile on Windows 10 https://github.com/TigerVNC/tigervnc/pull/1039

However it seems that the stable executables that are on github do look full static. Is there something missing in the StaticBuild.cmake file?

p11-kit only available as dynamic library for MSYS2 on Windows and dynamic linking of unistring is required

      if(P11KIT_LIBRARY)
        set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lp11-kit")
      endif()
      if(UNISTRING_LIBRARY)
        set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lunistring")
      endif()

I take this opportunity to congratulate you for this opensource development. Grettings.

CendioOssman commented 1 year ago

instead of this one which is recommended in the BUILDING.txt file. Is this a bug in the documentation?

I'm afraid I don't know what the difference between the two are, but we are using -G "MSYS Makefiles" with the automated GitHub builds without any issue. And it's MSYS2 being used there.

However it seems that the stable executables that are on github do look full static. Is there something missing in the StaticBuild.cmake file?

Static builds are very non-standard and require careful setup of both the build environment and the build system inside TigerVNC. So it will always be best effort. And it will likely never work fully with any standard build environment that you can download.

The official binaries are built using a custom setup that makes sure there are static versions of all used libraries. You could try filing issues with the build environment you are using and request them to add any missing static libraries.

andryua commented 9 months ago

Does this issue resolved? I need to silent install from cmd remotely (without GUI) and i cant do that!

skerdhantra commented 9 months ago

@andryua Use version 1.10.0 instead because it doesn't have a warning pop-up, or you can try my workaround in the earlier comment in small environments for testing.