-
Notifications
You must be signed in to change notification settings - Fork 86
Variable Substitutions
Jonathan Chan edited this page Aug 2, 2018
·
2 revisions
Throughout an app, references to variables enclosed like @THIS@
will be replaced by its environment variable ($THIS
) during compile time. The following is a list of some of the valid variables and their uses. For a complete list, see the make.sh
file.
Variable | Description | Example |
---|---|---|
SYS_ORGTLD |
Your organization top-level domain as set in the PROFILE file. |
com |
SYS_ORGSLD |
Your organization second-level domain as set in the PROFILE file. |
specific.example |
SYS_APPNAME |
The name of the directory of the app you are compiling. | DemoHelloWorld |
SYS_LOCASEAPPNAME |
SYS_APPNAME in all lowercase letters. |
demohelloworld |
SYS_ORGDOMAIN_REVERSE_DOT |
Your full organization domain in reverse notation separated by . , i.e. SYS_ORGTLD.SYS_SLD in reverse notation. |
com.example.specific |
SYS_PACKAGE_DOT |
The package name of the app in reverse notation separated by . , i.e. SYS_ORGDOMAIN_REVERSE_DOT.SYS_LOCASEAPPNAME . |
com.example.specific.demohelloworld |
SYS_PACKAGE_UNDERSCORE |
SYS_PACKAGE_DOT but with subdomains separated by _ instead. |
com_example_specific_demohelloworld |
SYS_PACKAGE_SLASH |
SYS_PACKAGE_DOT but with subdomains separated by / instead. |
com/example/specific/demoheloworld |
-
Do not use
SYS_ORGTLD.SYS_ORGSLD.SYS_LOCASEAPPNAME
to refer to your app's package name or bundle ID! If you have subdomains inside ofSYS_ORGSLD
, they will not be correctly reversed. Do useSYS_PACKAGE_DOTS
in its place, orSYS_ORGDOMAIN_REVERSE_DOT
when you need your organization domain. -
Prefer using
(system-appname)
over usingSYS_APPNAME
when referencing the name of the app in Scheme code. - In Android builds,
SYS_ORGDOMAIN_REVERSE_DOT
is the keystore alias. - JNI native functions declared as
native void fnName(...);
in Java need to be declared in C asvoid Java_@SYS_PACKAGE_UNDERSCORE@_@SYS_APPNAME@_fnName(...) { ...}
. - Finding the main class name in JNI, which needs a fully-qualified class name, is done by calling
(*env)->FindClass(env, "@SYS_PACKAGE_SLASH@/@SYS_APPNAME@");
.
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip