openvpn-gui icon indicating copy to clipboard operation
openvpn-gui copied to clipboard

Add script to build with cmake

Open mattock opened this issue 4 years ago • 7 comments

I'm opening this PR for discussion as I'm not sure how we want to handle the "build openvpn-gui on Windows with MSVC" challenge.

The simple script in this PR is good enough for my immediate needs, that is, for building OpenVPN-GUI on a Windows Server 2019 server in the context of my new dockerized buildbot environment:

  • https://github.com/OpenVPN/openvpn-vagrant/pull/18

If having a build script like this is ok, I can make it more generic/better. I suppose we could also add support for building openvpn-gui with msbuild, like we do with OpenVPN. I'm not sure how much work that would entail, though.

mattock avatar Aug 19 '21 11:08 mattock

I've not been following build system changes. @lstipakov may have some input. At the minimum we could just make hard-coded vars like CMAKE_TOOLCHAIN_FILE configurable (say, take from $Env if defined, else use a default)

selvanair avatar Aug 31 '21 19:08 selvanair

@selvanair that parameterization was what I actually did in openvpn-vagrant where I merged this script while waiting for approval/direction:

  • https://github.com/OpenVPN/openvpn-vagrant/pull/18/files#diff-00364c80fb9cd1498ca3893bc34a9ca1124bca19861ad852a2433041607306faR10

@lstipakov do you think that updated version of this script is good enough, or should we have a more proper Windows build system?

mattock avatar Sep 01 '21 06:09 mattock

I am not strictly against it, but I am not sure that this script needs to be in this repo. I think it fits better either in openvpn-vagrant or openvpn-build, it is mainly needed for building MSI installers - it builds for 3 architectures using specific directory layout.

I personally use Visual Studio, and build system just works there - you open CMake project and, assuming you have vcpkg installed and integrated into msbuild, everything works out of the box. Those who use cmake from command line are probably knowledgeable enough to run cmake with required arguments - we could also add those to README.

lstipakov avatar Sep 01 '21 07:09 lstipakov

I think we could just keep this script in openvpn-vagrant and point people to it in this repo's documentation.

mattock avatar Sep 01 '21 11:09 mattock

Hi,

On Wed, Sep 01, 2021 at 04:47:28AM -0700, Samuli Seppänen wrote:

I think we could just keep this script in openvpn-vagrant and point people to it in this repo's documentation.

"vagrant" sounds a bit weird for people just interested in building openvpn... what about Lev's other suggestion, openvpn-build?

gert

"If was one thing all people took for granted, was conviction that if you feed honest figures into a computer, honest figures come out. Never doubted it myself till I met a computer with a sense of humor." Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany @.***

cron2 avatar Sep 01 '21 12:09 cron2

I'm not opposed to that approach, either.

mattock avatar Sep 01 '21 12:09 mattock

Hi,

On Thu, Aug 19, 2021 at 04:48:58AM -0700, Samuli Seppänen wrote:

I'm opening this PR for discussion as I'm not sure how we want to handle the "build openvpn-gui on Windows with MSVC" challenge.

I do not have an opinion here (just stating this, in case you're waiting for me).

Selva, Lev and Samuli are the ones really affected by "how to build the GUI".

gert

"If was one thing all people took for granted, was conviction that if you feed honest figures into a computer, honest figures come out. Never doubted it myself till I met a computer with a sense of humor." Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany @.***

cron2 avatar Sep 13 '21 10:09 cron2