CMD-script for automatic PrePoMax compilation

If you (like me) want to test the newest development versions of PrePoMax, you need to compile the program yourself. The whole procedure is presented in detail at the PrePoMax GitLab web page. You can, however, make program compilation and substitution of the previous development version a bit faster using the following procedure:

  1. For the first compilation you must follow the above mentioned procedure from the GitLab webpage.

  2. Next time, when PrePoMax sources are changed, you need to download the whole bunch of source files from the GitLab page as ZIP-file. Default name of the file is

  3. Put this ZIP-file to any folder where you have write permissions. In this folder you should also put the following CMD-file:

@echo off
rem -- Set your paths here
set HERE=%cd%
set PPMSourceDir="C:\Users\%USERNAME%\Documents\VS_work\PrePoMax\"
set VS="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\amd64\"
set BinSourceDir="%PPMSourceDir%\PrePoMax\bin\x64\Debug\"
set BinTargetDir=C:\Tools\PrePomax_dev
rem --------------------
rem Windows 10 now has tar
tar.exe -x -f
start /wait xcopy  Prepomax-master\*.* %PPMSourceDir% /i /d /y /S
rmdir /s /q Prepomax-master
cd %PPMSourceDir%
%VS%msbuild.exe prepomax.sln
del /q PrePoMax\bin\x64\Debug\lib\*.xml
del /q PrePoMax\bin\x64\Debug\lib\*.pdb
xcopy %BinSourceDir%\PrePomax.exe        %BinTargetDir% /i /d /y
xcopy %BinSourceDir%\PrePomax.exe.config %BinTargetDir% /i /d /y
xcopy %BinSourceDir%\lib                 %BinTargetDir%\lib /i /d /y
cd    %BinSourceDir% 
  1. Edit the first section of the script:
  • Type your real user name (line 3)

  • Modify path to the prepomax.sln (line 5)

  • Modify path to the msbuild.exe (line 6). I am still using VS 2019, so you need to modify this path correspondingly if you are using VS 2022.

  • Modify path to the folder where a new development version of PrePoMax should be installed (line 8).

Now you need to run this script to unpack sources to a temporal directory, copy them to the VS project folder, remove temporal directory, compile the program, make some cleaning and copy a brand new PrePoMax files to the development version directory.

Of course, you may simply download current development PrePoMax version from my web page instead. I am trying to update it every time when the sources are changed.