Windows installer in silent mode

I’m trying to make automated builds of my app using GitHub Actions, but as my app is a mix of C++ and Python I need to install the full SDK when running the job.

NSIS installer allows you to perform an installation from the command line, using the /S option, however you can not select which section is enabled or not, unless the installation script has explicitly added a custom option for this. And it seems that with the current Panda3D installer, the installation type selected when running in the Silent mode is the “Light” type, which means you don’t have any of the optional elements that I need, Python bindings, Python, header files, …

Is there a way to select the needed section or change the installation type already, or should I create a feature request ?

I don’t know if there is such a way. If there is not, I’m happy to entertain a feature request to use Full mode. I did not know it was just using the Light mode by default.

I’m not sure that it should be done this way, as a rule you write your NSIS script to install your application, where the pre-compiled binary files Panda3D will already be included.

I think it is necessary to configure the cmake with the necessary parameters for the build. And then just put everything in a pile for packing.

I had a faint hope that I did miss something :slight_smile:

I will do some tests, maybe just swapping the InstType would be enough (providing this does not break the actual installation screens)

I’m not even at that step, here I want to automatically install Panda3D to build and package my app (which is done using setuptools, so all the dependencies are properly integrated and the correct NSIS script generated). ANd I don’t want to pull Panda3D source and do a custom build (well, I prefer to avoid it if possible)

Actually I did miss something :slight_smile:

As the Panda3D installer is not a console executable, the shell launch it in the background even if it is invoked with the /S option and so when running in the CI script, the SDK was not fully installed yet when the code using the SDK was called.

The solution is actually easy if you are using Powershell, just invoke the installer and pipe it to Out-Null this will force Powershell to wait for the application to terminate.

Panda3D-SDK-1.11.0.exe /S | Out-Null

And the first InstType is indeed the default one used when running in Silent mode.

2 Likes