IDE Scripting Constants
From Xojo Documentation
Contents
- 1 AppSupportsDarkMode As Boolean
- 2 AppSupportsHiDPI As Boolean
- 3 CurrentBuildTargetIs32Bit As Boolean
- 4 CurrentBuildTargetIs64Bit As Boolean
- 5 CurrentBuildTargetIsARM As Boolean
- 6 CurrentBuildTargetIsConsole As Boolean
- 7 CurrentBuildTargetIsDesktop As Boolean
- 8 CurrentBuildTargetIsIntel As Boolean
- 9 CurrentBuildTargetIsIOS As Boolean
- 10 CurrentBuildTargetIsLinux As Boolean
- 11 CurrentBuildTargetIsMacOS As Boolean
- 12 CurrentBuildTargetIsWeb As Boolean
- 13 CurrentBuildTargetIsWindows As Boolean
- 14 CurrentBuildTargetIsXojoCloud As Boolean
- 15 DebugBuild As Boolean
- 16 PreBuild As Boolean
- 17 TargetLinux As Boolean
- 18 TargetMacOS As Boolean
- 19 TargetWindows As Boolean
These constants can be used in Build Step IDE Scripts.
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.
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.
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.
DebugBuild As Boolean
Indicates if the app is being run in debug mode (True) or as a Build (False).
Sample Code
Update an App constant to indicate the number of debug runs:
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.
Sample Code
If the project is being built on a Mac, then code sign it:
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.
Sample Code
If the project is being built on Windows, start Inno Setup after the build is finished: