Platform/Platform-specific build defines: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(→‎Prefs files: Add warning about pref overriding)
(Add reftests table also, and MOZ_MULET)
Line 91: Line 91:
| 
| 
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| 
|-
!MOZ_MULET
| || 
| || 
| || 
|style="background: green; color: white"|✓
| || 
| 
| 
|-
|-
Line 195: Line 203:
|-
|-
|[https://hg.mozilla.org/mozilla-central/file/tip/b2g/dev/app/mulet.js mulet.js]
|[https://hg.mozilla.org/mozilla-central/file/tip/b2g/dev/app/mulet.js mulet.js]
| || 
| || 
| 
| 
| 
| 
|style="background: green; color: white"|✓
| || 
| 
| 
|}
'''WARNING''': Until {{bug|1174234}} is resolved firefox.js prefs will override mulet.js prefs on Mulet.
== Reftest conditions ==
Here is another table that tells you what conditions are true on various platforms for use in reftest.list conditions.
{|border="1" style="text-align: center;"
!OS
!colspan="2"|Windows
!colspan="2"|OS X
!colspan="3"|Linux-gtk
!colspan="2"|Android
!iOS
|-
!Product
!Desktop
!B2G
!Desktop
!B2G
!Desktop
!B2G
!Mulet
!Fennec
!B2G
!iOS
|-
!B2G
| || 
| || 
| || || 
| 
| 
|style="background: green; color: white"|✓
| 
| 
|-
!B2GDT
| 
| 
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| 
| 
|style="background: green; color: white"|✓
| 
| 
|style="background: green; color: white"|✓
| 
| || 
| 
|-
!Android
| || 
| || 
| || || 
|style="background: green; color: white"|✓
| 
| 
|-
!cocoaWidget
| || 
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| || || 
| || 
| 
|-
!gtkWidget
| || 
| || 
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| || 
| 
|-
!qtWidget
| || 
| || 
| || || 
| || 
| 
|-
!winWidget
|style="background: green; color: white"|✓
|style="background: green; color: white"|✓
| || 
| || || 
| || 
| 
|-
!Mulet
| || 
| || 
| || 
|style="background: green; color: white"|✓
| || 
| 
| 
|}
|}
'''WARNING''': Until {{bug|1174234}} is resolved firefox.js prefs will override mulet.js prefs on Mulet.
You may also be interested in [[Platform/Channel-specific_build_defines]]
You may also be interested in [[Platform/Channel-specific_build_defines]]

Revision as of 06:28, 26 June 2015

In the Gecko code we have a bunch of preprocessor conditions that help us conditionally compile code for specific platforms. These can get confusing so here is a handy-dandy table to help you keep them straight.

OS Windows OS X Linux-gtk Android iOS
Product Desktop B2G Desktop B2G Desktop B2G Mulet Fennec B2G iOS
XP_WIN                
XP_DARWIN              
XP_MACOSX                
XP_IOS                  
XP_UNIX    
XP_LINUX          
ANDROID                
MOZ_B2G          
MOZ_MULET                  
MOZ_WIDGET_GTK              
MOZ_WIDGET_ANDROID                  
MOZ_WIDGET_GONK                  
MOZ_WIDGET_UIKIT                  

Prefs files

Here is a similar table, but to see which prefs get used in which product:

OS Windows OS X Linux-gtk Android iOS
Product Desktop B2G Desktop B2G Desktop B2G Mulet Fennec B2G iOS
all.js
firefox.js            
mobile.js                  
b2g.js          
mulet.js                  

WARNING: Until bug 1174234 is resolved firefox.js prefs will override mulet.js prefs on Mulet.

Reftest conditions

Here is another table that tells you what conditions are true on various platforms for use in reftest.list conditions.

OS Windows OS X Linux-gtk Android iOS
Product Desktop B2G Desktop B2G Desktop B2G Mulet Fennec B2G iOS
B2G                  
B2GDT              
Android                  
cocoaWidget                
gtkWidget              
qtWidget                    
winWidget                
Mulet                  

You may also be interested in Platform/Channel-specific_build_defines