この記事には、B2G ビルドや、Gaia ビルドや、Gecko ビルド変数と、Firefox OS関連のビルド操作期間で必要となるコマンドについての、全てのリファレンスがあります。
B2G ビルド
変数
- Example
- xxx
コマンド
./repo sync- xxx
./config.sh- xxx
Gaia ビルド
変数
全ての変数定義については Gaia MakeFile を見てください。
ADBxxxAPP- いくつかのコマンドは、gaia全体か、あるアプリケーションだけで動作する。この環境変数は、コマンドをあるアプリだけで動作させたいかどうかを決めて、その場合、どのアプリかを指定する。
B2G_SYSTEM_APPS- system アプリが system パーティションにインストールされているのを確実にする。
GAIA_DIRxxxPROFILE_DIRxxxPROFILE_FOLDER- プロファイルが生成されるディレクトリを決める。デフォルトではノーマルプロファイル用に
gaia/profileとなり、DEBUG=1プロファイル(下記参照)用には、gaia/profile-debugとなる。 COREWEBAPPS_DIRxxxSCHEMExxxGAIA_DOMAINxxxDEBUG- 1 にセットされた時、デスクトップ版 Firefox や Firefox OS シミュレータ (B2G デスクトップ):
DEBUG=1 DESKTOP=0 makeとして使われるのに適したプロファイルが生成される。これはhttpd.js拡張機能を含み、gapp://<appname>.gaiamobile.org/を使ってアプリケーションにアクセスできるような初期設定が構成される。いくつかのアプリケーションはこのように動作するのが知られていて、一番有名なのは SMS アプリケーションである。 LOCAL_DOMAINSxxxDESKTOP- This includes a set of extensions in the
DEBUGprofile to allow the Gaia System app to be loaded in Firefox. This is quite broken these days and deprecated in favor of Mulet. It's set to 1 by default whenDEBUG=1is used, but because this is really broken these days, so you'll want to disable it.
Be careful as this also doesn't work with the Firefox OS Simulator (B2G Desktop) at all. DEVICE_DEBUG- Enables a more developer-friendly experience: turns on adb debugging with devtools, disables the lock screen, and enables prefs to allow debugging of certified apps.
NO_LOCK_SCREENxxxSCREEN_TIMEOUT- 0 にセットされた時、プロファイルの初期設定でスクリーンタイムアウトが無効に設定される。
SYSTEMxxxGAIA_PORTxxxGAIA_LOCALES_PATHxxxGAIA_INSTALL_PARENTxxxLOCALES_FILExxxGAIA_KEYBOARD_LAYOUTSxxxGAIA_KEYBOARD_DOWNLOADABLE_LAYOUTSxxxGAIA_KEYBOARD_ENABLE_USER_DICTxxxLOCALE_BASEDIRxxxBUILD_APP_NAME- 本質的に
APP(上記参照) と同じ。 PRODUCTION- プロダクションビルド (エンジニアリングではなく)を生成する; つまりFacebook アプリid と、その他のプロダクションアプリ idが、これと共に使われる。あるいは
make productionでも機能する。 GAIA_OPTIMIZE- 1 にセットされた時、Gaiaアプリのビルド時に、JSコード最小化といった最適化ステップを実行する。この機能はオプトインであるため、全ての gaia アプリに影響するわけではない。
GAIA_DEVICE_TYPExxxGAIA_DEV_PIXELS_PER_PX- The pixel density of the target device. This affects which image and/or video assets are copied into the build. This defaults to 1, but higher spec devices need higher resolultion assets — for example the Flame should use a value of 1.5. It is aliased as
GAIA_DPPX. DOGFOOD- Dogfood Gaia ビルドをオンにする
MOZILLA_OFFICIAL- 非ゼロ値では、Mozilla-ブランドのビルドが生成される。デフォルトは 0 である。
GAIA_DEFAULT_LOCALE- xxx
GAIA_PRETRANSLATExxxGAIA_CONCAT_LOCALESxxxGAIA_DISTRIBUTION_DIR- カスタマイズしたGaiaを指定するのに使用; つまり詳細は Market customizations guide を見てください。
GAIA_APPDIRSxxxGAIA_ALLAPPDIRSxxxGAIA_MEMORY_PROFILE- xxx
NOFTU- 1 にセットした時、プロファイルでFTUを無効化した初期設定がセットされる。
REMOTE_DEBUGGERxxxTARGET_BUILD_VARIANTxxxSETTINGS_PATHxxxFTU_PING_URLxxxKEYBOARD_LAYOUTS_PATHxxxCONTACTS_IMPORT_SERVICES_PATHxxxEMAIL_SERVICES_PATHxxxSTAGE_DIRxxxGAIA_APP_TARGETxxxBUILD_DEBUG- xxx
VARIANT_PATH- xxx
REBUILD- xxx
P- xxx
VERBOSE- xxx
RAPTOR- Enables performance marks and measures to output metadata to logcat. Usage:
RAPTOR=1 make reset-gaia SHARE_PERF_USAGE- xxx
DEFAULT_KEYBOAD_SYMBOLS_FONT- xxx
DEFAULT_GAIA_ICONS_FONT- xxx
MOZ_APPROX_LOCATION- Use this to turn on the privacy panel; the default is off, except in engineering builds.
コマンド
The following is an abbreviated list of the most common commands you'll need. A much more detailed list can be found in the Gaia make options reference.
make- Makes only the profile.
make reset-gaia- Deletes the previous profile and installs a new Gaia profile.
make install-gaia- Installs Gaia on top without deleting anything.
make production- Does the same thing as
PRODUCTION=1 make reset-gaia. make clean- Removes the generated profile.
make really-clean- Removes the generated profile and the directory's xul-runner; you should only run this when things are totally borked.
Gecko ビルド
変数
MOZ_BUILD_DATE- Sets the build id to a specific build date/time.
B2G_DEBUG- xxx
VARIANT- Specifies the Gecko variant you want to build. Valid types are detailed below:
eng |
This is the default flavor. A plain
|
|---|---|
user |
This is the flavor intended for final release.
|
userdebug |
make userdebug
The same as
|
Note: This table is inspired by the Android Build Variants table.
コマンド
./build.sh buildsymbols- Makes build symbols for debugging; see Uploading symbols to Mozilla's symbol server.
./build.sh gecko-update-full- Creates an OTA mar file; see Firefox OS update packages.
./build.sh gecko-update-fota- Creates a FOTA mar/zip based on files containing only a subset of files and directories; see Firefox OS update packages.
./build.sh gecko-update-fota-full- Creates a FOTA mar/zip based on files; see Firefox OS update packages.
./build.sh gecko-update-fota-fullimg- Creates a FOTA mar/zip based on partitions; see Firefox OS update packages.