Constants
Description
These constants can be used in Build Step IDE Scripts.
Name |
Type |
---|---|
Constant descriptions
AppSupportsDarkMode As Boolean
Returns True if the app is built with Supports Dark Mode property set to ON.
AppSupportsHiDPI As Boolean
Returns True if the app is built with Supports HiDPI property set to ON.
CurrentBuildTargetIs32Bit As Boolean
Returns True when doing a 32-bit build.
CurrentBuildTargetIs64Bit As Boolean
Returns True when doing a 64-bit build.
CurrentBuildTargetIsAndroid As Boolean
Returns True when doing a building an Android app.
CurrentBuildTargetIsARM As Boolean
Returns True when doing a build for a the ARM CPU architecture.
CurrentBuildTargetIsConsole As Boolean
Returns True when building a Console app.
CurrentBuildTargetIsDesktop As Boolean
Returns True when building a Desktop app.
CurrentBuildTargetIsIntel As Boolean
Returns True when doing a build for the Intel CPU architecture (x86 or x86-64).
CurrentBuildTargetIsIOS As Boolean
Returns True when building an iOS app.
CurrentBuildTargetIsLinux As Boolean
Returns True when doingn a Linux build.
CurrentBuildTargetIsMacOS As Boolean
Returns True when doing a macOS build.
CurrentBuildTargetIsUniversal As Boolean
Returns True when doing a macOS Universal build.
CurrentBuildTargetIsWeb As Boolean
Returns True when building a Web app.
CurrentBuildTargetIsWindows As Boolean
Returns True when doing a Windows build.
CurrentBuildTargetIsXojoCloud As Boolean
Returns True when doing a Xojo Cloud build.
CurrentScriptName As String
Returns the name of the script that is currently running.
DebugBuild As Boolean
Indicates if the app is being run in debug mode (True) or as a Build (False).
Update an App constant to indicate the number of debug runs:
If DebugBuild Then If SelectProjectItem("App") Then ' Constant kDebugRuns must exist on App Var value As Integer = Val(ConstantValue("kDebugRuns")) + 1 ConstantValue("kDebugRuns") = value.ToString End If End If
PreBuild As Boolean
Returns True if the script is running before the Build step.
TargetLinux As Boolean
Indicates if the Xojo IDE is running on Linux.
TargetMacOS As Boolean
Indicates if the Xojo IDE is running on a Mac.
If the project is being built on a Mac, then code sign it:
If TargetMacOS Then Var command As String command = "codesign -f --deep -s ""Developer ID Application: YourName "" ""YourXojoApp.app """ Var result As String result = DoShellCommand(command) End If
TargetWindows As Boolean
Indicates if the Xojo IDE is running on Windows.
If the project is being built on Windows, start Inno Setup after the build is finished:
If TargetWindows Then Var innoSetupPath As String innoSetupPath = "C:\\Program Files (x86)\Inno Setup 5/Compil32.exe" Var result As String Var resultCode As Integer result = DoShellCommand(innoSetupPath, 20000, resultCode) End If