Reading the project version from a jucer file

I don’t remember where I got it (I certainly didn’t write it), but this line in my Mac build script reads the current version of my JUCE project file so I can use it later in my build script for file names, etc.:

VERSION=$(xmllint --xpath ‘string(//JUCERPROJECT/@version)’ $JUCER_FILE)

Does anyone know how I can do this in a Windows batch file?

Projucer also has command line options, allowing for

$ Projucer --get-version <project_file>

For Windows you probably have to specify the full path where Projucer is built, I always symlink /usr/local/bin/Projucer for my OSX machine

Thanks, but it doesn’t seem to come out clean…I got this on my Mac:

Dad:Scripts ray$ ../../JUCE/extras/Projucer/Builds/MacOSX/build/Debug/ --get-version ../BBB.jucer 
JUCE v5.3.1

Projucer 5.3.1  ---  Build date: Apr 16 2018
Log started: 19 Apr 2018 10:26:01am

Mac OSX 10.13.4
CPU: 3000MHz  Cores: 16  65536MB
Loading project: /Volumes/Home/ray/Dropbox/Programming/BBB/BBB.jucer

Ah, I’ve also built the Release version of Projucer. They must include that info text in every command in the Debug version

1 Like