Build script to add non-release version to iOS version string Release 2021

While the entry original topic was closed, I created a new one with a free changes for the current release 2021R2.1 and macOS 11.5.2.

I have I have tried to use the original script, but I got some errors. So I have made some changes, that is runs with the current releases.

Dim v(), longVersion, shortVersion, result, appName, appLocation, cmd As String

// Build version number strings
v.append PropertyValue(“App.MajorVersion”)
v.append “.”
v.append PropertyValue(“App.MinorVersion”)
v.append “.”
v.append PropertyValue(“App.BugVersion”)
shortVersion = Join(v,"")
v.append “.”
v.append PropertyValue(“App.NonReleaseVersion”)
longVersion = Join(v,"")

appName = CurrentBuildAppName
appLocation = CurrentBuildLocation.ReplaceAll("\", “”) + “/” + appName.ReplaceAll("\", “”)

// Set the long version number
cmd = "/usr/libexec/PlistBuddy -c "“Set :CFBundleVersion “” '” + appLocation + “/Info.plist’”
cmd = cmd.Replace( “”, “’” + longVersion + “’” )
result = DoShellCommand(cmd)
if result <> “” then
print "Long version setting failed: " + cmd + " " + result
end if

// Set the short version number
cmd = "/usr/libexec/PlistBuddy -c "“Set :CFBundleShortVersionString “” '” + appLocation + “/Info.plist’”
cmd = cmd.Replace( “”, “’” + shortVersion + “’” )
result = DoShellCommand(cmd)
if result <> “” then
print "Short version setting failed: " + cmd + " " + result
end if

Why do you need this? It’s all done by xojo if i remember well.

If I use the original script, I got always the error “File doesn’t exists”. I have copied the path from the error message into a terminal window and I got also the same error message. If I use the same path without any backslash and use a ’ at the begin and the end of the path, everything is working fine. Maybe it is problem with the name of the application and the folder name in combination with German language.