Package com.iizix.run

Class RuntimeBuilderSettings

java.lang.Object
com.iizix.run.RuntimeBuilderSettings

public class RuntimeBuilderSettings extends Object
The build settings loaded from the property container.
Author:
Christopher Mindus
  • Field Details Link icon

    • ICONS_COMMON Link icon

      public static final String[] ICONS_COMMON
      The transparent icon names for Common use (Web, etc) required in the icons directory.
    • ICONS_ANDROID_STANDARD Link icon

      public static final String[] ICONS_ANDROID_STANDARD
      The transparent icon names for Android required in the icons directory.
    • ICONS_ANDROID_ADAPTIVE_SIZE Link icon

      public static final int[] ICONS_ANDROID_ADAPTIVE_SIZE
      Adaptive icon sizes for Android.
    • ICONS_ANDROID_ADAPTIVE_DENSITY Link icon

      public static final String[] ICONS_ANDROID_ADAPTIVE_DENSITY
      Adaptive icon densities for Android.
    • ICONS_IOS Link icon

      public static final String[] ICONS_IOS
      The opaque icon names for iOS required in the icons directory.

      Note that there are TWO names that begins with "ios/" and needs a subdirectory. These icons are not square.

    • TOTAL_ICONS_COUNT Link icon

      public static final int TOTAL_ICONS_COUNT
      Count of icons needed (for wizard to display).
    • props Link icon

      public final RuntimeBuilderProps props
      The settings property.
    • build_version Link icon

      public final String build_version
      Full version number expressed in major.minor.patch notation (default 1.0.0).
    • build_android Link icon

      public final boolean build_android
      Builds the customized iiziRun for Android, default true.
    • build_android_release Link icon

      public final int build_android_release
      When build Android for release, this value should be 1 (one) if a Bundle (AAB) should be created, 0 (zero) means an APK, and 2 means BOTH formats. Please note that it takes almost twice the time to build both formats.

      Android App Bundles (AAB) is a publishing format and you can't install the AAB file on a device, only APK files.

    • build_ios Link icon

      public final boolean build_ios
      Builds the customized iiziRun for iOS, default true.
    • build_target_types Link icon

      public final int build_target_types
      Targets to build: 0=debug, 1=release, 2=both. Please note that it takes almost twice the time to produce both build types, and when combined for both Android AAB and APK formats for the release version, it will take about three times longer.
    • build_remote Link icon

      public final String build_remote
      Specifies the address of the Remote iiziRun Builder machine. Format is 'addr:port'. All communication is done over secured TLS connections.
    • build_remote_tls Link icon

      public final boolean build_remote_tls
      Secured with TLS.
    • build_remote_all Link icon

      public final boolean build_remote_all
      Build all remotely.
    • app_id Link icon

      public final String app_id
      Specifies the app's reverse-domain identifier, e.g. 'com.iizix.run.devel'. This name cannot be changed once the app has been published.
    • app_name Link icon

      public final String app_name
      Short name of the app without spaces. This name cannot be localized. This name cannot be changed once the app has been published.
    • default_locale Link icon

      public final String default_locale
      Default locale for the app: "en-US".
    • app_textTable Link icon

      public final String app_textTable
      Base text table for iiziRun texts. When multiple languages are used, this is the base language text file.
    • textTable Link icon

      protected TextTable textTable
      The text table, null if it comes from a remote party.
    • assets_folder Link icon

      public final String assets_folder
      The Assets folder for "icons" and "splash" screens.
    • app_locName Link icon

      public final PlainKString app_locName
      Name of the app displayed to the user. The name can contain spaces and can be localized. It can also be changed after publishing of the app.
    • app_descr Link icon

      public final PlainKString app_descr
      Descriptive text of the app, use text table externalized for multiple languages
    • author_name Link icon

      public final PlainKString author_name
      Name of author. Use text table to localize name.
    • author_email Link icon

      public final String author_email
      Email to author for app.
    • author_href Link icon

      public final String author_href
      Website of author for app.
    • cert_CN Link icon

      public final String cert_CN
      The Common Name of the author for certificates. If unspecified, it is the author's name in the default language (English). This is only used for Android.
    • cert_O Link icon

      public final String cert_O
      Certificate "O": Large organization name, e.g. "Onizuka, Inc.". If unspecified, it is the author's name in the default language (English). This is only used for Android.
    • cert_OU Link icon

      public final String cert_OU
      Certificate "OU": Small organization name, e.g. "Purchasing". This is only used for Android.
    • cert_L Link icon

      public final String cert_L
      Certificate "L": Locality (city) name, e.g. "Palo Alto". This is only used for Android.
    • cert_ST Link icon

      public final String cert_ST
      Certificate "ST": State name, e.g. "California". This is only used for Android.
    • cert_C Link icon

      public final String cert_C
      Certificate "C": Two letter country code, e.g. "CH". This is only used for Android.
    • server_addr Link icon

      public final String server_addr
      Address of the iiziServer. The address can be a DNS name (recommended) but can also be an IP address. This address does not necessarily have to be public on the internet.
    • server_port Link icon

      public final int server_port
      Server port number, normally 443 for secure TLS connections (default), otherwise e.g. 80 for unsecure connections.
    • server_secure Link icon

      public final boolean server_secure
      Indicates the server port is configured for secure TLS communication, default true.
    • server_validate Link icon

      public final boolean server_validate
      Validates that the server is really present and an iiziServer. This is done in order to ensure that the server settings are correct. Default is true.
    • srv_app_id Link icon

      public final String srv_app_id
      The iiziServer App ID. This value MUST be specified and VALID.
    • srv_app_descr Link icon

      public final String srv_app_descr
      The iiziServer App Description. null or an empty string means that no description is available. This value is used merely for the interface on the client side for choosing the app, when this is possible.
    • login_user Link icon

      public final String login_user
      The initial user name for a default login.

      In order to avoid a login prompt and to handle the login process inside the app, provide a valid and authorized User name and Password. This user should just have access to the app initially.

      The default is "iiziRun Developer" with "secret" password.

    • login_password Link icon

      public final String login_password
      The initial password for a default login.

      The default is "iiziRun Developer" with "secret" password.

    • output_path Link icon

      public final String output_path
      Path where the build output of the customized iiziRun will be placed. The default is the directory 'iiziRun' in the module project.
    • jdk_path Link icon

      public final String jdk_path
      Path to the root of the Java 1.8 to 11 Development Kit. The default will attempt to use the Eclipse settings.
    • plugin_camera Link icon

      public final boolean plugin_camera
      Enables taking pictures and for choosing images from the system's image library.
    • plugin_firebase Link icon

      public final boolean plugin_firebase
      Enables push notifications, analytics, event tracking, crash reporting and more from Google Firebase.
    • plugin_geolocation Link icon

      public final boolean plugin_geolocation
      Enables the geolocation functions.

      Enabled by default.

    • plugin_media Link icon

      public final boolean plugin_media
      This plugin provides the ability to record and play back audio files on a device.
    • plugin_media_capture Link icon

      public final boolean plugin_media_capture
      This plugin provides access to the device's audio, image, and video capture capabilities.

      WARNING: Collection and use of images, video, or audio from the device's camera or microphone raises important privacy issues. Your app's privacy policy should discuss how the app uses such sensors and whether the data recorded is shared with any other parties. In addition, if the app's use of the camera or microphone is not apparent in the user interface, you should provide a just-in-time notice before the app accesses the camera or microphone (if the device operating system doesn't do so already). That notice should provide the same information noted above, as well as obtaining the user's permission (e.g., by presenting choices for 'OK' and 'No Thanks'). Note that some app marketplaces may require your app to provide just-in-time notice and obtain permission from the user prior to accessing the camera or microphone.

    • plugin_native_settings Link icon

      public final boolean plugin_native_settings
      Enables you to open OS settings on iOS and Android, e.g. allow you to open the keyboard settings, Wi-Fi, bluetooth, etc.
    • plugin_fingerprint Link icon

      public final boolean plugin_fingerprint
      Enables fingerprint authentication with Android Fingerprint scanner or iOS Touch ID.
    • plugin_vibration Link icon

      public final boolean plugin_vibration
      Enables simple vibrations on the device.
    • plugin_barcode_scanner Link icon

      public final boolean plugin_barcode_scanner
      Enables Barcode Scanner.
    • plugin_wifi Link icon

      public final boolean plugin_wifi
      Enables advanced Wi-Fi functions.
    • plugin_flashlight Link icon

      public final boolean plugin_flashlight
      Enables flashlight on the device.
    • app_id_android Link icon

      public final String app_id_android
      Specifies the app's reverse-domain identifier, e.g. 'com.iizix.run.devel'. This name cannot be changed once the app has been published. This name is used to override the Android app ID. This name can be null, in which case the default "app_id" is used instead.
    • useAdaptiveBGColor Link icon

      public boolean useAdaptiveBGColor
      Flag for adaptive bgcolor.xml to be used.
    • app_id_ios Link icon

      public final String app_id_ios
      Specifies the app's reverse-domain identifier, e.g. 'com.iizix.run.devel'. This name cannot be changed once the app has been published. This name is used to override the iOS app ID. This name can be null, in which case the default "app_id" is used instead.
    • iOS_criticalAlerts Link icon

      public final boolean iOS_criticalAlerts
      Flag indicating critical push notifications alerts are enabled, if the user allows it, default false.
    • iOS_debug_developmentTeam Link icon

      public final String iOS_debug_developmentTeam
      The development team name for Debug builds.
    • iOS_release_developmentTeam Link icon

      public final String iOS_release_developmentTeam
      The development team name for Release builds.
    • fb_analyticsCollection Link icon

      public final boolean fb_analyticsCollection
      Flag for Firebase Analytics Collection enabled.
    • fb_performanceCollection Link icon

      public final boolean fb_performanceCollection
      Flag for Firebase Performance Collection enabled.
    • fb_crashlyticsCollection Link icon

      public final boolean fb_crashlyticsCollection
      Flag for Firebase Crashlytics Collection enabled.
  • Constructor Details Link icon

    • RuntimeBuilderSettings Link icon

      public RuntimeBuilderSettings(RuntimeBuilderProps pc)
      The constructor.
      Parameters:
      pc - The runtime builder properties container.
  • Method Details Link icon

    • verify Link icon

      public void verify(boolean isDesigner, boolean doCheckAll, File projectDir, Set<String> textTableIDs, ArrayList<BuilderError> errors)
      Performs verification of the settings.
      Parameters:
      isDesigner - Flag for Designer.
      doCheckAll - Final check-all verification to also check URL's etc.
      projectDir - The project directory (for Eclipse, for Remote Server it is null.
      textTableIDs - Text table IDs required, null for no checking.
      errors - The errors array to fill in.
    • getOutputDirectory Link icon

      public File getOutputDirectory()
      Gets the output directory where to place the builds.
      Returns:
      The directory, it might not to be present, but the parent directory is.
    • getLocalizedString Link icon

      public String getLocalizedString(PlainKString pks, String languageCode)
      Resolves a PlainKString that refers to the text table with the specified language code.
      Parameters:
      pks - The plain KString.
      languageCode - The language code supported by the application, null for default English or if language code is not found.
      Returns:
      The localized String.

      Note: If the text fails to resolve, a severe error is logged, and the original raw string is returned instead.

    • getAssetsSubdirectory Link icon

      public File getAssetsSubdirectory()
      Gets the projects subdirectory in the Assets folder.
      Returns:
      The directory, or null if not verified.
    • hasAndroidKeyStore Link icon

      public boolean hasAndroidKeyStore(boolean isRelease)
      Checks for presence of Android keystore of debug or release type.
      Parameters:
      isRelease - true for release, false for debug.
      Returns:
      true if created, false otherwise.
    • hasAndroidKeyStore Link icon

      public static boolean hasAndroidKeyStore(RuntimeBuilderProps props, boolean isRelease)
      Checks for presence of Android keystore of debug or release type.
      Parameters:
      props - The runtime builder properties.
      isRelease - true for release, false for debug.
      Returns:
      true if created, false otherwise.
    • getAndroidDebugAlias Link icon

      public static String getAndroidDebugAlias()
      Gets the Android debug code alias in the keystore ("androiddebugkey").
      Returns:
      The alias "androiddebugkey".
    • getAndroidReleaseAlias Link icon

      public static String getAndroidReleaseAlias()
      Gets the Android release code alias in the keystore ("iizi").
      Returns:
      The alias "iizi".
    • getAndroidDebugPassword Link icon

      public static String getAndroidDebugPassword()
      Gets the Android debug code signing password.
      Returns:
      The password "android".
    • getAndroidReleasePassword Link icon

      public String getAndroidReleasePassword()
      Gets the Android release code signing password.
      Returns:
      The password, null if no code signing is configured.
    • getAndroidReleasePassword Link icon

      public static String getAndroidReleasePassword(RuntimeBuilderProps props)
      Gets the Android release code signing password.
      Parameters:
      props - The runtime builder properties.
      Returns:
      The password, null if no code signing is configured.
    • getAndroidDebugOwner Link icon

      public static X500Principal getAndroidDebugOwner()
      Gets the Android Debug owner for signing apps.
      Returns:
      The Android owner.
    • getAndroidCertificateOwner Link icon

      public X500Principal getAndroidCertificateOwner() throws Exception
      Gets the Android app owner used when signing release builds, an X.500 principal used for certificate creation.
      Returns:
      The principal.
      Throws:
      Exception - For errors.
    • generateAndroidDebugKeyStore Link icon

      Generates the Android debug key store and saves it to the properties.
      Parameters:
      assetsDir - The directory where the project Assets are located, to write the android-debug.p12 file into. If null, no such PKCS#12 file is created.
      Returns:
      "The keystore.p12" file name written, null for none.
      Throws:
      IOException - For I/O errors.
      CertificateException - If any of the certificates in the keystore could not be saved.
      NoSuchAlgorithmException - If the algorithm used to check the integrity of the keystore cannot be found.
      KeyStoreException - If no Provider supports a KeyStoreSpi implementation for the PKCS#12 type.
      SignatureException - If the signature is in error.
      IllegalStateException - If the state is invalid to generate a keystore.
      NoSuchProviderException - If no provider for the certificate is available.
      InvalidKeyException - If the key in invalid.
      PropException - If there is a Property Exception.
    • generateAndroidDebugKeyStore Link icon

      Generates the Android debug key store and saves it to the properties.
      Parameters:
      props - The runtime builder properties.
      assetsDir - The directory where the project Assets are located, to write the android-debug.p12 file into. If null, no such PKCS#12 file is created.
      Returns:
      "The keystore.p12" file name written, null for none.
      Throws:
      IOException - For I/O errors.
      CertificateException - If any of the certificates in the keystore could not be saved.
      NoSuchAlgorithmException - If the algorithm used to check the integrity of the keystore cannot be found.
      KeyStoreException - If no Provider supports a KeyStoreSpi implementation for the PKCS#12 type.
      SignatureException - If the signature is in error.
      IllegalStateException - If the state is invalid to generate a keystore.
      NoSuchProviderException - If no provider for the certificate is available.
      InvalidKeyException - If the key in invalid.
      PropException - If there is a Property Exception.
    • generateAndroidReleaseKeyStore Link icon

      Generates the Android release key store and saves it to the properties.
      Parameters:
      owner - The certificate owner.
      assetsDir - The directory where the project Assets are located, to write the android-release.p12 file into. If null, no such PKCS#12 file is created.
      Returns:
      "The keystore.p12" file name written, null for none.
      Throws:
      IOException - For I/O errors.
      CertificateException - If any of the certificates in the keystore could not be saved.
      NoSuchAlgorithmException - If the algorithm used to check the integrity of the keystore cannot be found.
      KeyStoreException - If no Provider supports a KeyStoreSpi implementation for the PKCS#12 type.
      SignatureException - If the signature is in error.
      IllegalStateException - If the state is invalid to generate a keystore.
      NoSuchProviderException - If no provider for the certificate is available.
      InvalidKeyException - If the key in invalid.
      PropException - If there is a Property Exception.
    • generateAndroidReleaseKeyStore Link icon

      Generates the Android release key store and saves it to the properties.
      Parameters:
      props - The runtime builder properties.
      owner - The certificate owner.
      assetsDir - The directory where the project Assets are located, to write the android-release.p12 file into. If null, no such PKCS#12 file is created.
      Returns:
      "The keystore.p12" file name written, null for none.
      Throws:
      IOException - For I/O errors.
      CertificateException - If any of the certificates in the keystore could not be saved.
      NoSuchAlgorithmException - If the algorithm used to check the integrity of the keystore cannot be found.
      KeyStoreException - If no Provider supports a KeyStoreSpi implementation for the PKCS#12 type.
      SignatureException - If the signature is in error.
      IllegalStateException - If the state is invalid to generate a keystore.
      NoSuchProviderException - If no provider for the certificate is available.
      InvalidKeyException - If the key in invalid.
      PropException - If there is a Property Exception.
    • writeAndroidKeyStore Link icon

      public String writeAndroidKeyStore(File file, boolean isRelease) throws NotFoundException, KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException
      Writes an Android KeyStore to file.
      Parameters:
      file - Destination file for a PKCS#12 KeyStore (i.e. "file-name.p12").
      isRelease - The release KeyStore when true, debug when false.
      Returns:
      The password for the keystore.
      Throws:
      NotFoundException - If properties are not found.
      IOException - For I/O errors.
      CertificateException - If any of the certificates in the keystore could not be saved.
      NoSuchAlgorithmException - If the algorithm used to check the integrity of the keystore cannot be found.
      KeyStoreException - If no Provider supports a KeyStoreSpi implementation for the PKCS#12 type.
    • writeAndroidKeyStore Link icon

      public static String writeAndroidKeyStore(RuntimeBuilderProps props, File file, boolean isRelease) throws NotFoundException, KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException
      Writes an Android KeyStore to file.
      Parameters:
      props - The runtime builder properties.
      file - Destination file for a PKCS#12 KeyStore (i.e. "file-name.p12").
      isRelease - The release KeyStore when true, debug when false.
      Returns:
      The password for the keystore.
      Throws:
      NotFoundException - If properties are not found.
      IOException - For I/O errors.
      CertificateException - If any of the certificates in the keystore could not be saved.
      NoSuchAlgorithmException - If the algorithm used to check the integrity of the keystore cannot be found.
      KeyStoreException - If no Provider supports a KeyStoreSpi implementation for the PKCS#12 type.
    • getTextTable Link icon

      public TextTable getTextTable()
      Gets the text table.
      Returns:
      The text table used, null for none.
    • getDerivedTextTables Link icon

      public TextTable[] getDerivedTextTables()
      Gets all tables in all open projects that derives from this text table.

      In runtime, this method returns an empty array!

      Returns:
      An array of all derived tables, in runtime always empty, only defined in the Designer!
    • isInternalBuild Link icon

      public boolean isInternalBuild()
      Checks for internal build.
      Returns:
      true if internal build, false for external.