Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2022-10-06 06:58:25

Reply to topic  [ 2 posts ] 
MSBuild line to run the build on windows from the cmdline 
Author Message

Joined: 2011-10-07 10:39:20
Posts: 155
Reply with quote
Hi Henri,

if you would like to compile the viewer on windows without starting VisualStudio GUI, it can be done with just MSBuild as well:

My current Windows build batchfile looks like this:

SET PATH=%PATH%;c:\Python38;C:\Program Files (x86)\MSBuild\12.0\Bin
SET SRC=c:\devel\sl\cool
cd %SRC%
MSBUILD.EXE /t:Build /m /p:PreferredToolArchitecture=x64 /p:CL_MPCount=16 /p:BuildInParallel=true /p:Configuration=Release;Platform=x64 %SRC%\linden\build-vs2017\CoolVLViewer.sln

Might be nicer if you enable the SSH Daemon on Windows and just trigger the build via SSH in a Windows VM instead of needing a GUI.

2021-11-06 14:35:18

Joined: 2009-03-17 18:42:51
Posts: 5022
Reply with quote
Ah yes... Since I restricted the build types to "Release" only for Windows, such a command is now possible without an auxiliary tool (LL uses a custom VSTool.exe to configure the build type, else it defaults to Debug, whatever the type you pass to msbuild)...

However, I do not have VS2017 installed in the directory you quote in the batch file. Also, the Python executable should already be in your PATH (else the windows-prebuild-vs2017.bat script won't work in the first place). Finally, using %CD% instead of an absolute path allows to just double-click on the batch file (when it is placed along windows-prebuild-vs2017.bat) to build the viewer, wherever you place its sources. Oh, and you do not need to pass the CL_MPCount parameter (the cmake files already specify /MP, that VS should adapt automatically to the available cores). Here is a modified script that should work for default VS2017 Community Edition installations:

@echo off

set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
call windows-prebuild-vs2017.bat
MSBUILD.EXE /t:Build /m /p:PreferredToolArchitecture=x64 /p:Configuration=Release;Platform=x64 %CD%\build-vs2017\CoolVLViewer.sln

echo Compilation finished (and hopefully successful). Press a key to exit.

This said, I do not use ssh to compile the Windows (and Linux) builds, but a VirtualBox VM (that I start only when I need to produce a new official build)... So, it would mean using the Windows terminal/console instead, which is extremely poor (in particular with only a limited scroll back history, not resizable in width, etc...). I definitely prefer the GUI (especially to debug the VS2017 idiosyncrasies that sometimes cause a new release to fail building at my first try).

I'll add the build script to next release however. Thanks for the suggestion ! :)

2021-11-06 22:13:06
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.