OpenFile("#") ' # = path to my Xojo Binary File
Call BuildApp(16) ' macOS x86 64-bit
// DoCommand("BuildApp") ' alternative
DoCommand("CloseWindow")
It opens the project file correctly, but does not execute the underlying instructions, compile and close the project. Why? I can’t see any differences to the scripts in the original forum post. Since @Greg_O_Lone said in the previous thread this should work, I wonder where the bug is?
Info: I use the IDECommunicatorv2 class from Xojo’s sample folder:
Is your path correct? I’ve been doing the same for years and everything works fine:
dim MaxVersion as String = "0"
if MaxVersion = "" then MaxVersion = "0"
dim MajorVersion as string = "6"
dim MinorVersion as String = "2"
dim BugVersion as String = "0"
dim BetaVersion as String = "b1"
dim theCommand, theResult as string
dim userHome as String = DoShellCommand("echo $HOME")
userHome = Trim(ShellEncode(userHome))
dim Architecture as integer = 16
'9 universal
'16 intel
'24 arm
dim basePath as string = userHome + "/Documents/Development/Mail\ Archiver/"
'delete old apps and dmg
theCommand = "osascript " + basePath + "code\ current/ide\ communicator/delete\ old\ builds.scpt"
theResult = DoShellCommand(theCommand)
'scheduler: : only for normal, pro and pro admin
if MaxVersion = "0" or MaxVersion = "1" or MaxVersion = "3" then
openfile(basePath + "code\ current/max\ scheduler.xojo_xml_project")
ConstantValue("App.kMaxVersion") = MaxVersion
if ConstantValue("App.kMaxVersion") = "0" then
PropertyValue("App.Application Identifier") = "com.mothsoftware.mailarchiverx-helper"
PropertyValue("App.MacOSXAppName") = "Mail Archiver X Scheduler"
elseif ConstantValue("App.kMaxVersion") = "1" then
PropertyValue("App.Application Identifier") = "com.mothsoftware.mailarchiverxpro-helper"
PropertyValue("App.MacOSXAppName") = "Mail Archiver X Pro Scheduler"
elseif ConstantValue("App.kMaxVersion") = "3" then
PropertyValue("App.Application Identifier") = "com.mothsoftware.mailarchiverxproadmin-helper"
PropertyValue("App.MacOSXAppName") = "Mail Archiver X Pro Admin Scheduler"
else
print ConstantValue("App.kMaxVersion")
end if
makeVersion(MajorVersion, MinorVersion, BugVersion, BetaVersion)
if BuildApp(Architecture) = "" then
return
else
DoCommand "SaveFile"
DoCommand("CloseWindow")
end if
end if