diff --git a/configs/phoenix/phoenix-overrides.cfg b/configs/phoenix/phoenix-overrides.cfg index aa16f35e..70471be8 100644 --- a/configs/phoenix/phoenix-overrides.cfg +++ b/configs/phoenix/phoenix-overrides.cfg @@ -2,6 +2,7 @@ // Get constants /// These are set here instead of `ironfox.cfg` so that they are always parsed as early as possible) +const IRONFOX_APP_ID = getPref("browser.ironfox.const.IRONFOX_APP_ID"); const IRONFOX_APP_NAME = getPref("browser.ironfox.const.IRONFOX_APP_NAME"); const IRONFOX_APP_NAME_PRETTY = getPref("browser.ironfox.const.IRONFOX_APP_NAME_PRETTY"); const IRONFOX_BUGS_URL = getPref("browser.ironfox.const.IRONFOX_BUGS_URL"); diff --git a/patches/gecko-overlay/ironfox/android/core/build.gradle b/patches/gecko-overlay/ironfox/android/core/build.gradle index cffa67d9..76b0c586 100644 --- a/patches/gecko-overlay/ironfox/android/core/build.gradle +++ b/patches/gecko-overlay/ironfox/android/core/build.gradle @@ -17,6 +17,7 @@ android { consumerProguardFiles "proguard-rules.pro" // Set constants + buildConfigField 'String', "IRONFOX_APP_ID", "\"${gradle.mozconfig.defines.IRONFOX_APP_ID}\""; buildConfigField 'String', "IRONFOX_APP_NAME", "\"${gradle.mozconfig.defines.IRONFOX_APP_NAME}\""; buildConfigField 'String', "IRONFOX_APP_NAME_PRETTY", "\"${gradle.mozconfig.defines.IRONFOX_APP_NAME_PRETTY}\""; buildConfigField 'String', "IRONFOX_BUGS_URL", "\"${gradle.mozconfig.defines.IRONFOX_BUGS_URL}\""; diff --git a/patches/gecko-overlay/ironfox/android/core/src/main/java/org/ironfoxoss/core/IFConstants.kt b/patches/gecko-overlay/ironfox/android/core/src/main/java/org/ironfoxoss/core/IFConstants.kt index 7dc44391..e639152e 100644 --- a/patches/gecko-overlay/ironfox/android/core/src/main/java/org/ironfoxoss/core/IFConstants.kt +++ b/patches/gecko-overlay/ironfox/android/core/src/main/java/org/ironfoxoss/core/IFConstants.kt @@ -7,6 +7,7 @@ import org.ironfoxoss.core.BuildConfig * */ object IFConstants { + const val IRONFOX_APP_ID = BuildConfig.IRONFOX_APP_ID const val IRONFOX_APP_NAME = BuildConfig.IRONFOX_APP_NAME const val IRONFOX_APP_NAME_PRETTY = BuildConfig.IRONFOX_APP_NAME_PRETTY const val IRONFOX_BUGS_URL = BuildConfig.IRONFOX_BUGS_URL diff --git a/patches/gecko-overlay/ironfox/core/IFConstants.sys.mjs b/patches/gecko-overlay/ironfox/core/IFConstants.sys.mjs index 5fbfb452..fa52ae6d 100644 --- a/patches/gecko-overlay/ironfox/core/IFConstants.sys.mjs +++ b/patches/gecko-overlay/ironfox/core/IFConstants.sys.mjs @@ -4,6 +4,7 @@ * IronFox Constants */ export const IFConstants = Object.freeze({ + IRONFOX_APP_ID: "@IRONFOX_APP_ID@", IRONFOX_APP_NAME: "@IRONFOX_APP_NAME@", IRONFOX_APP_NAME_PRETTY: "@IRONFOX_APP_NAME_PRETTY@", IRONFOX_BUGS_URL: "@IRONFOX_BUGS_URL@", diff --git a/patches/gecko-overlay/ironfox/ironfox.configure b/patches/gecko-overlay/ironfox/ironfox.configure index dd916ca8..dc82df39 100644 --- a/patches/gecko-overlay/ironfox/ironfox.configure +++ b/patches/gecko-overlay/ironfox/ironfox.configure @@ -118,6 +118,15 @@ def ironfox_channel(release): return "release" return "nightly" +# Set the application ID +@depends("--enable-ironfox-release") +def ironfox_app_id(release): + if release: + return "org.ironfoxoss.ironfox" + return "org.ironfoxoss.ironfox.nightly" + +set_define("IRONFOX_APP_ID", ironfox_app_id) + # Set constants ## These values are shared and can be used directly by both Gecko and Java/Kotlin libraries (via their respective IFConstants) project_flag("IRONFOX_BUGS_URL", nargs=1, help="IronFox issue tracker URL", set_as_define=True) diff --git a/patches/gecko-overlay/ironfox/prefs/ironfox.js b/patches/gecko-overlay/ironfox/prefs/ironfox.js index d35161e5..ed22ca11 100644 --- a/patches/gecko-overlay/ironfox/prefs/ironfox.js +++ b/patches/gecko-overlay/ironfox/prefs/ironfox.js @@ -6,6 +6,7 @@ /// Set constants // (These are set as prefs for use by ironfox.cfg) // (The values should match Gecko's IFConstants.sys.mjs) +pref("browser.ironfox.const.IRONFOX_APP_ID", "@IRONFOX_APP_ID@", locked); pref("browser.ironfox.const.IRONFOX_APP_NAME", "@IRONFOX_APP_NAME@", locked); pref("browser.ironfox.const.IRONFOX_APP_NAME_PRETTY", "@IRONFOX_APP_NAME_PRETTY@", locked); pref("browser.ironfox.const.IRONFOX_BUGS_URL", "@IRONFOX_BUGS_URL@", locked);