RaggieScript v1.3.0
Browse Table of Contents (17 chapters)
Getting Started (2)
Language Reference (4)
Core Standard Library (3)
Windows, MSI SQL & Native FFI (3)
Wizard UI & Studio Sandboxes (3)
Diagnostics & Bytecode ISA (2)
Master Symbol Index
5 min read Module: raggiesoft.raggiescript F1: IDH_RSSC_BUILTINS (0x2006)

Global Built-In Functions, Enum Constants & compile.* / feature.*

Global functions and built-in enum tables are available in every RaggieScript file without needing any namespace prefix.

Global Built-In Functions (16 Functions)

SignatureReturn TypeMutating?Description
str(value: any)stringRead-OnlyConverts any RaggieScript value (int, float, bool, path, version, array, map) to UTF-8 text.
int(value: any)intRead-OnlyParses or truncates a string, float, or bool into a 64-bit signed integer (0x... hex supported).
float(value: any)floatRead-OnlyConverts a string or int into a 64-bit IEEE floating-point number.
bool(value: any)boolRead-OnlyEvaluates RaggieScript truthiness (false, null, 0, and "" are false).
path(value: any)pathRead-OnlyNormalizes slashes into a first-class OS path value supporting the / path-join operator.
ver(value: any)versionRead-OnlyParses "10.0.22631.0" into a 4-part SemVer value for component-wise < / >= comparisons.
len(collectionOrStr: any)intRead-OnlyReturns character/byte length of a string, element count of an array, or key count of a map.
typeof(value: any)stringRead-OnlyReturns runtime type tag: "null", "bool", "int", "float", "string", "path", "version", "array", "map", or "closure".
print(...values)nullRead-OnlyWrites space-joined values to standard output (stdout / CLI console).
log(message: string, level?: string)nullRead-OnlyAppends a timestamped line to the structured setup log (/l=install.log).
assert(condition: bool, message?: string)boolSafe GateRaises an immediate runtime error if condition is false—automatically triggering LIFO rollback when inside install { ... }!
sleep(milliseconds: int)nullRead-OnlyPauses script execution for milliseconds ms.
coalesce(a: any, b: any, ...)anyRead-OnlyReturns the first non-null, non-empty "" argument (a ?? b operator equivalent).
range(end: int) / range(start: int, end: int, step?: int)arrayRead-OnlyProduces an integer array [start .. end) for deterministic loops.
def(name: string, fallback?: string)stringRead-OnlyReads a compile-time -DNAME=VAL CLI define or #define macro value (returning fallback if unset).
targetArch()stringRead-OnlyReturns the target compilation or native host architecture ("arm64" or "x64").

Global Exit Constants & Built-In Enum Tables

Standard Exit Code Constants

Built-In Enum & Metadata Maps

Global TableMembersPurpose
product.id, .name, .version, .publisher, .scope, .uac, .styleRead-only metadata mirror of the active package / showcase / app header!
ScopeScope.User ("user"), Scope.Machine ("machine")Selects per-user (%LOCALAPPDATA%) vs. per-machine (Program Files) installation scope.
UacUac.AsInvoker, Uac.HighestAvailable, Uac.RequireAdministrator, Uac.DeferredControls PE UAC manifest & deferred commit-time elevation broker.
HiveHive.HKCU, Hive.HKLM, Hive.HKCR, Hive.HKUWindows Registry root hive constants for reg.* calls.
RegViewRegView.Native64, RegView.Wow32, RegView.BothPer-call stateless 64-bit / 32-bit WOW64 Registry view selector (KEY_WOW64_64KEY / 32KEY).
TokenToken.Current, Token.Elevated, Token.DesktopProcess token selector for proc.run() (Token.Desktop de-elevates via explorer.exe!).
IconIcon.Info, Icon.Warning, Icon.Error, Icon.ShieldAccessible glyph selector for ui.taskDialog() and ui.notice().
SetupModeSetupMode.Express, SetupMode.Compact, SetupMode.Custom, SetupMode.CompleteStandard installation preset identifiers.
WizardStyleStandard, Wizard95, Wizard97, AeroWizard, FluentMica, OneClick, PassiveToast, FullScreenBlue, FullScreenTeal, Autorun16x9, SimpleSelects any of the 11 native Per-Monitor V2 DPI Win32 wizard layouts.
DeliveryDelivery.Embedded, Delivery.DownloadMarks a feature as embedded inside #220 or fetched from a SHA-256 verified .rswpak URL.

Validation.* — Wizard Input Validation Helpers

Used inside validate: (val) => ... closures on ui.textBox, ui.folderPicker, and ui.filePicker to gate the Next > button with inline accessible error banners (zero modal MessageBox spam!):

MethodSignatureReturn TypeDescription
Validation.okValidation.ok()mapReturns { ok: true, message: "" }, clearing any inline field error and enabling Next >.
Validation.errorValidation.error(message: string)mapReturns { ok: false, message }, focusing the invalid field and announcing message to screen readers.

compile.* — Build-Time Asset Embedding

compile.* calls execute at compile time during raggiescript.exe compile / pack-exe / instbuild.exe and bake the resulting JSON object or text string directly into the RSWBC2 constant pool—requiring zero external files at runtime!

MethodSignatureReturn TypeDescription
compile.jsoncompile.json(relativePath: string)anyParses a JSON file at build time and embeds the structured map/array into bytecode.
compile.textcompile.text(relativePath: string)stringReads a UTF-8 text/Markdown/RTF file at build time and embeds it as a string constant.
compile.defcompile.def(key: string, fallback?: string)stringAlias for def(key, fallback) reading -DKEY=VAL or #define.
compile.definecompile.define(key: string, fallback?: string)stringAlias for compile.def(key, fallback).

payload.* & feature.* — Package Feature & Payload Inspection

MethodSignatureReturn TypeMutating?Description
payload.dirpayload.dir(payloadId: string)pathRead-OnlyResolves the extracted staging directory path for a declared payload.
payload.pathpayload.path(payloadId: string)pathRead-OnlyResolves the extracted file or directory path for payloadId.
feature.listfeature.list()arrayRead-OnlyReturns an array of { id, title, description, selected, required, inCompact } maps for all declared feature blocks.
feature.infofeature.info(featureId: string)mapRead-OnlyReturns the metadata and selection map for featureId.
feature.isSelectedfeature.isSelected(featureId: string)boolRead-OnlyReturns true if featureId is currently checked for installation.
feature.setSelectedfeature.setSelected(featureId: string, selected?: bool)boolWizard-SafeProgrammatically toggles a non-required feature's selection state (false ignored on required: true features).
feature.setStatefeature.setState(featureId: string, selected?: bool)boolWizard-SafeAlias for feature.setSelected(...).
feature.selectPresetfeature.selectPreset(preset?: string)boolWizard-SafeApplies "express", "compact", or "complete" selection tiers across all declared features.
Indexed API Calls & Symbols on This Page (28):