Since its 0.9d version, ValaWinPKG can manage multiple versions of Vala installed on the same computer. The packages for each version will be installed and updated separately.
There a few reasons to do so : for example, Vala 0.12.0 / GLib 2.24.0 needs an old version of LibSoup (2.32) whereas Vala 0.16.0 / GLib 2.32.3 requires a newer one (2.38). This is due to incompatibilities in Vala .vapi files and the GLib itself.
(note : this tutorial cannot help you manage identical Vala versions installed in different folders. This is not supported -yet ?)
By letting the default installation directory unchanged, you will get 2 separate versions :
Download and install ValaWinPKG 0.9d (7.76 Mb)
* Launch ValaWinPKG. It should automatically detect the last installed version of Vala (0.16.0 here) :
Let's install the WebKitGTK3 package.
* We are now going to switch versions. Click on the first "Change" button and browse to the installation directory of the other version ("c:\vala-0.12.0" here). Open the "bin" folder and double-click on "valac-0.12.exe".
(we could double-click on "valac.exe", too, but we will see the reason later)
The alternative version is detected and now displayed by ValaWinPKG :
The packages list below is adapted, too.
Let's install the WebKitGTK package.
We will now compile this WebKit sample code with each version of Vala.
First Vala 0.16.0 (GTK+ 3) :
valac-0.16 --pkg webkitgtk-3.0 webkit-browser.vala
Then Vala 0.12.0 (GTK+ 2) :
valac-0.12 --pkg webkit-1.0 webkit-browser.vala
We can run the ouput executable (if it doesn't work, try to move it in its Vala version's "bin" folder) :
Later, when we click on "Change" again, the compiler executables will automatically appear in the "Recent" panel, allowing us to switch versions with a simple click. That's the interest of using the numeroted executables.
Well done !