According to the manual:
https://documentation.xojo.com/topics/build_automation/ide_scripting/project_commands.html
PropertyValue(propName As String, Assigns value As String)
Gets or sets the value of a project item property. This only works for properties of project items that are part of the Xojo framework (such as Window or App)
Properties of App that can be changed
…
MajorVersion
MinorVersion
BugVersion
StageCode
NonReleaseVersion
AutoIncrementVersionInformation
Version
Copyright
Be sure to use the “App.” prefix in front of any of these properties.
This is my script:
OpenFile "/Users/dirkcleenwerck/Documents/svnsource/rbproject/RBMain/RBMain.xojo_xml_project"
ConstantValue("ProjectFlags.VERSIEUPGRADE") = "24.02.0001"
Print "Wrote 24.02.0001 to ProjectFlags.VERSIEUPGRADE"
PropertyValue("App.MajorVersion") = "2402"
Print "Wrote 2402 to App.MajorVersion"
PropertyValue("App.MinorVersion") = "0001"
Print "Wrote 0001 to App.MinorVersion"
PropertyValue("App.BugVersion") = "1"
Print "Wrote 1 to App.BugVersion"
PropertyValue("App.Version") = "24.02.0001"
Print "Wrote 24.02.0001 to App.Version"
DoCommand("SaveFile")
Print "Project Saved"
It opens the project and changes the constant VERSIEUPGRADE to 24.02.0001
All the prints happen correctly and the project gets saved.
{“tag”:“build”,“response”:“Wrote 24.02.0001 to ProjectFlags.VERSIEUPGRADE”}{“tag”:“build”,“response”:“Wrote 2402 to App.MajorVersion”}
{“tag”:“build”,“response”:“Wrote 0001 to App.MinorVersion”
{“tag”:“build”,“response”:“Wrote 1 to App.BugVersion”}
{“tag”:“build”,“response”:“Wrote 24.02.0001 to App.Version”}
{“tag”:“build”,“response”:“Project Saved”}
Unfortunately, none of the App properties have changed.
Working with Xojo r2023r3 on MacOS Ventura 13.6.3
Any idea what could be going wrong?
5 posts - 4 participants