# Building commands

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

These commands are related to building projects.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                                                     | Type                               | Read-Only | Shared |
|------------------------------------------------------------------------------------------|------------------------------------|-----------|--------|
| `BuildCurrentPlatform<ide_scripting_building_commands.buildcurrentplatform>`             | `Boolean</api/data_types/boolean>` |           |        |
| `BuildLanguage<ide_scripting_building_commands.buildlanguage>`                           | `String</api/data_types/string>`   |           |        |
| `BuildLinux<ide_scripting_building_commands.buildlinux>`                                 | `Boolean</api/data_types/boolean>` |           |        |
| `BuildMac<ide_scripting_building_commands.buildmac>`                                     | `Boolean</api/data_types/boolean>` |           |        |
| `BuildWebDebugPort<ide_scripting_building_commands.buildwebdebugport>`                   | `Integer</api/data_types/integer>` |           |        |
| `BuildWebPort<ide_scripting_building_commands.buildwebport>`                             | `Integer</api/data_types/integer>` |           |        |
| `BuildWin32<ide_scripting_building_commands.buildwin32>`                                 | `Boolean</api/data_types/boolean>` |           |        |
| `CurrentBuildAppName<ide_scripting_building_commands.currentbuildappname>`               | `String</api/data_types/string>`   | ✓         |        |
| `CurrentBuildLocation<ide_scripting_building_commands.currentbuildlocation>`             | `String</api/data_types/string>`   | ✓         |        |
| `CurrentBuildLocationNative<ide_scripting_building_commands.currentbuildlocationnative>` | `String</api/data_types/string>`   | ✓         |        |
| `CurrentBuildTarget<ide_scripting_building_commands.currentbuildtarget>`                 | `Integer</api/data_types/integer>` | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                           | Parameters                                                                                                                   | Returns                          | Shared |
|----------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|----------------------------------|--------|
| `BuildApp<ide_scripting_building_commands.buildapp>`           | buildType As `Integer</api/data_types/integer>`, reveal As `Boolean</api/data_types/boolean>` = `False</api/language/false>` | `String</api/data_types/string>` |        |
| `CancelBuild<ide_scripting_building_commands.cancelbuild>`     |                                                                                                                              |                                  |        |
| `PropertyValue<ide_scripting_building_commands.propertyvalue>` | attribute As `String</api/data_types/string>`                                                                                | `String</api/data_types/string>` |        |
|                                                                | attribute As `String</api/data_types/string>`, `Assigns</api/language/assigns>` value As `String</api/data_types/string>`    |                                  |        |

## Property descriptions

<div id="ide_scripting_building_commands.buildcurrentplatform">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

BuildCurrentPlatform

**BuildCurrentPlatform** As `Boolean</api/data_types/boolean>`

> Gets or sets whether to build the project for the current OS platform.

<div id="ide_scripting_building_commands.buildlanguage">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

BuildLanguage

**BuildLanguage** As `String</api/data_types/string>`

> Used to get or set the build language. This is the “Language” property on the Shared Build Settings.
>
> Change the language to English:
>
> ``` xojo
> If BuildLanguage = "Default" Then
>   BuildLanguage = "English"
> End If
> ```

<div id="ide_scripting_building_commands.BuildLinux">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

BuildLinux

**BuildLinux** As `Boolean</api/data_types/boolean>`

> Gets or sets whether to build the project for Linux.
>
> This is also set to true when "This Computer" is selected and Xojo is running on Linux.
>
> Create a Linux build:
>
> ``` xojo
> BuildLinux = True
> DoCommand("BuildApp")
> ```

<div id="ide_scripting_building_commands.buildmac">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

BuildMac

**BuildMac** As `Boolean</api/data_types/boolean>`

> Gets or sets whether to build the project for macOS.
>
> This is also set to true when "This Computer" is selected and Xojo is running on macOS.
>
> Build for macOS, but not Windows:
>
> ``` xojo
> BuildMac = True
> BuildWin32 = False
> DoCommand("BuildApp")
> ```

<div id="ide_scripting_building_commands.buildwebdebugport">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

BuildWebDebugPort

**BuildWebDebugPort** As `Integer</api/data_types/integer>`

> Gets or sets the web port for running debug apps.
>
> Set the debug port:
>
> ``` xojo
> BuildWebDebugPort = 8100
> ```

<div id="ide_scripting_building_commands.buildwebport">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

BuildWebPort

**BuildWebPort** As `Integer</api/data_types/integer>`

> Gets or sets the web port for built apps.
>
> Use a value of -1 to choose a port automatically.
>
> Set the port:
>
> ``` xojo
> BuildWebPort = 8080
> ```

<div id="ide_scripting_building_commands.buildwin32">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

BuildWin32

**BuildWin32** As `Boolean</api/data_types/boolean>`

> Gets or sets whether to build the project for Windows.
>
> This is also set to `True</api/language/true>` when "This Computer" is selected and Xojo is running on Windows.
>
> Build for Windows, but not macOS:
>
> ``` xojo
> BuildMac = False
> BuildWin32 = True
> DoCommand("BuildApp")
> ```

<div id="ide_scripting_building_commands.currentbuildappname">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

CurrentBuildAppName

**CurrentBuildAppName** As `String</api/data_types/string>`

> 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.
>
> This property is read-only.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> For macOS apps, this includes the full appname and extension.
>
> </div>
>
> Display the built app's name:
>
> ``` xojo
> Print(CurrentBuildAppName)
> ```

<div id="ide_scripting_building_commands.currentbuildlocation">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

CurrentBuildLocation

**CurrentBuildLocation** As `String</api/data_types/string>`

> 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.
>
> This property is read-only.
>
> Display the built app's shell path:
>
> ``` xojo
> Print(CurrentBuildLocation)
> ```

<div id="ide_scripting_building_commands.currentbuildlocationnative">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

CurrentBuildLocationNative

**CurrentBuildLocationNative** As `String</api/data_types/string>`

> 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.
>
> This property is read-only.
>
> Display the built app's native path:
>
> ``` xojo
> Print(CurrentBuildLocationNative)
> ```

<div id="ide_scripting_building_commands.currentbuildtarget">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

CurrentBuildTarget

**CurrentBuildTarget** As `Integer</api/data_types/integer>`

> Returns an `Integer</api/data_types/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.
>
> This property is read-only.
>
> 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        |
> | 9     | macOS Universal  | 64-bit    | Intel & ARM  |
> | 10    | iOS Simulator    | 64-bit    | ARM          |
> | 12    | Xojo Cloud       | 64-bit    | Intel        |
> | 14    | iOS Simulator    | 64-bit    | Intel        |
> | 15    | iOS Device       | 64-bit    | ARM          |
> | 16    | macOS (all)      | 64-bit    | Intel        |
> | 17    | Linux            | 64-bit    | Intel        |
> | 18    | Linux            | 32-bit    | ARM          |
> | 19    | Windows          | 64-bit    | Intel        |
> | 21    | Android Emulator | 64-bit    | Intel & ARM  |
> | 23    | Android Device   | 64-bit    | ARM          |
> | 24    | macOS            | 64-bit    | ARM          |
> | 25    | Windows          | 64-bit    | ARM          |
> | 26    | Linux            | 64-bit    | ARM          |
>
> Get the value for the target that was built:
>
> ``` xojo
> Var result As Integer = CurrentBuildTarget
> ```

## Method descriptions

<div id="ide_scripting_building_commands.buildapp">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

BuildApp

**BuildApp**(buildType As `Integer</api/data_types/integer>`, reveal As `Boolean</api/data_types/boolean>` = `False</api/language/false>`) As `String</api/data_types/string>`

> Starts building the current project.
>
> 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        |
> | 9     | macOS Universal  | 64-bit    | Intel & ARM  |
> | 10    | iOS Simulator    | 64-bit    | ARM          |
> | 12    | Xojo Cloud       | 64-bit    | Intel        |
> | 13    | iOS Simulator    | 64-bit    | Intel        |
> | 14    | iOS Device       | 64-bit    | ARM          |
> | 16    | macOS (all)      | 64-bit    | Intel        |
> | 17    | Linux            | 64-bit    | Intel        |
> | 18    | Linux            | 32-bit    | ARM          |
> | 19    | Windows          | 64-bit    | Intel        |
> | 21    | Android Emulator | 64-bit    | Intel & ARM  |
> | 23    | Android Device   | 64-bit    | ARM          |
> | 24    | macOS            | 64-bit    | ARM          |
> | 25    | Windows          | 64-bit    | ARM          |
> | 26    | Linux            | 64-bit    | ARM          |
>
> If *reveal* is `True</api/language/true>`, the built app is displayed using the OS file manager.
>
> Returns a `String</api/data_types/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.
>
> The code displays the location of a Mac build:
>
> ``` xojo
> Var appPath As String
> appPath = BuildApp(16) ' Mac 64-bit build
> Print("Built: " + appPath)
> ```

<div id="ide_scripting_building_commands.cancelbuild">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

CancelBuild

**CancelBuild**

> Cancels the current build in IDE Pre-Build Scripts. In a Post-Build script this is ignored.
>
> Cancel a build:
>
> ``` xojo
> CancelBuild
> ```

<div id="ide_scripting_building_commands.propertyvalue">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PropertyValue

**PropertyValue**(attribute As `String</api/data_types/string>`) As `String</api/data_types/string>`

**PropertyValue**(attribute As `String</api/data_types/string>`, `Assigns</api/language/assigns>` value As `String</api/data_types/string>`)

> Allows you to set some attributes of the build target.
>
> | Names                                                               | Values                                 |
> |---------------------------------------------------------------------|----------------------------------------|
> | App.MacArchitecture, App.WindowsArchitecture, App.LinuxArchitecture | x32, x64, ARM32, ARM64                 |
> | macOSMinimumVersion                                                 | A version string - for example: 13.0.1 |
>
> If the property doesn't support the *value* passed, the build target will be unchanged.
>
> This example sets the macOS architecture to x64:
>
> ``` xojo
> PropertyValue("App.MacArchitecture") = "x64"
> ```
