IDE Scripting Building Commands
From Xojo Documentation
Contents
- 1 BuildApp(buildType As Integer[, reveal As Boolean]) As String
- 2 BuildCurrentPlatform As Boolean
- 3 BuildLanguage As String
- 4 BuildLinux As Boolean
- 5 BuildMac As Boolean
- 6 BuildRegion
- 7 BuildWebProtocol As Integer
- 8 BuildWebDebugPort As Integer
- 9 BuildWebPort As Integer
- 10 BuildWin32 As Boolean
- 11 CancelBuild
- 12 CurrentBuildAppName As String (read-only)
- 13 CurrentBuildLocation As String (read-only)
- 14 CurrentBuildLocationNative As String (read-only)
- 15 CurrentBuildTarget As Integer (read-only)
These commands are related to building projects.
BuildApp(buildType As Integer[, reveal As Boolean]) As String
Starts building the current project.
Notes
The buildType can be one of these values:
Value | Build Target | 32/64-bit | Architecture |
---|---|---|---|
3 | Windows | 32-bit | Intel |
4 | Linux | 32-bit | Intel |
6 | Mac Console | 32-bit | Intel |
7 | Mac Desktop | 32-bit | Intel |
12 | Xojo Cloud | 32-bit | Intel |
14 | iOS Simulator | 64-bit | Intel |
15 | iOS | 64-bit | ARM |
16 | Mac (all) | 64-bit | Intel |
17 | Linux | 64-bit | Intel |
18 | Linux | 32-bit | ARM |
19 | Windows | 64-bit | Intel |
If reveal is True, the built app is displayed using the OS file manager.
Returns a String containing the Shell path of the built app.
BuildApp cannot be used in an IDE Script that is called by a Build Automation Script.
Sample Code
Display the location of a Mac build:BuildCurrentPlatform As Boolean
Gets or sets whether to build the project for the current OS platform.
BuildLanguage As String
Used to get or set the build language. This is the “Language” property on the Shared Build Settings.
Sample Code
Change the language to English:BuildLinux As Boolean
Gets or sets whether to build the project for Linux.
Notes
This is also set to true when "This Computer" is selected and Xojo is running on Linux.
Sample Code
Create a Linux build:DoCommand("BuildApp")
BuildMac As Boolean
Gets or sets whether to build the project for macOS.
Notes
This is also set to true when "This Computer" is selected and Xojo is running on macOS.
Sample Code
Build for Mac, but not Windows:BuildRegion
[To be documented]
BuildWebProtocol As Integer
Gets or sets the type of web app to build.
Notes
The values can be: 0 = CGI 1 = Standalone
Sample Code
Set to build a web app as CGI:BuildWebDebugPort As Integer
Gets or sets the web port for running debug apps.
Sample Code
Set the debug port:BuildWebPort As Integer
Gets or sets the web port for built apps.
Notes
Use a value of -1 to choose a port automatically.
Sample Code
Set the port:BuildWin32 As Boolean
Gets or sets whether to build the project for Windows.
Notes
This is also set to true when "This Computer" is selected and Xojo is running on Windows.
Sample Code
Build for Windows, but not Mac:CancelBuild
Cancels the current build in IDE Pre-Build Scripts. In a Post-Build script this is ignored.
Sample Code
Cancel a build:CurrentBuildAppName As String (read-only)
Returns the name of the app that was built. This can only be used in a Build Automation IDE Script that runs after the Build Step. This just the app name, so spaces and other special characters are not escaped.
Sample Code
Display the built app's name:CurrentBuildLocation As String (read-only)
Returns the shell path to the app that was built. This can only be used in a Build Automation IDE Script that runs after the Build Step. Since this is a shell path, spaces and other special characters are properly escaped.
Sample Code
Display the built app's shell path:CurrentBuildLocationNative As String (read-only)
Returns the native (unescaped) path to the app that was built. This can only be used in a Build Automation IDE Script that runs after the Build Step.
Sample Code
Display the built app's native path:CurrentBuildTarget As Integer (read-only)
Returns an integer that specifies the type of app that was built. This can only be used in a Build Automation IDE Script that runs after the Build Step.
Notes
The return value is one of these values:
Value | Build Target | 32/64-bit | Architecture |
---|---|---|---|
3 | Windows | 32-bit | Intel |
4 | Linux | 32-bit | Intel |
6 | Mac Console | 32-bit | Intel |
7 | Mac Desktop | 32-bit | Intel |
12 | Xojo Cloud | 32-bit | Intel |
14 | iOS Simulator | 64-bit | Intel |
15 | iOS | 64-bit | ARM |
16 | Mac (all) | 64-bit | Intel |
17 | Linux | 64-bit | Intel |
18 | Linux | 32-bit | ARM |
19 | Windows | 64-bit | Intel |