Vojtech Szocs has uploaded a new change for review.

Change subject: webadmin,userportal: Consolidate gwt.userAgent property
......................................................................

webadmin,userportal: Consolidate gwt.userAgent property

1, gwt.userAgent default value is now Firefox (only)

2, all-user-agents Maven profile can now be used to
   build oVirt GWT UI for all supported browsers
   (no need to enumerate all browsers anymore)

3, Opera excluded from all-user-agents profile

4, in Makefile, DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS
   now defaults to empty value - gwt.userAgent will
   fall back to Firefox (only)

5, in Makefile, BUILD_ALL_USER_AGENTS option can now
   be used to trigger all-user-agents Maven profile

Example 1: build for Firefox (only)

  $ make clean install-dev PREFIX=$HOME/ovirt-engine

Example 2: build for Firefox and Chrome

  $ make clean install-dev PREFIX=$HOME/ovirt-engine \
    DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS="-Dgwt.userAgent=gecko1_8,safari"

Example 3: build for all supported browsers

  $ make clean install-dev PREFIX=$HOME/ovirt-engine \
    BUILD_ALL_USER_AGENTS=1

Note that DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS takes
precedence over BUILD_ALL_USER_AGENTS - in example
below, oVirt GWT UI will be built for Firefox and
Chrome:

  $ make clean install-dev PREFIX=$HOME/ovirt-engine \
    DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS="-Dgwt.userAgent=gecko1_8,safari" \
    BUILD_ALL_USER_AGENTS=1

Change-Id: I19f5009bb9a73bc554d7ffbd39075130c615c34f
Signed-off-by: Vojtech Szocs <vsz...@redhat.com>
---
M Makefile
M frontend/webadmin/modules/pom.xml
2 files changed, 14 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/64/32164/1

diff --git a/Makefile b/Makefile
index 55b7b9b..b6e1dcf 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,7 @@
 BUILD_GWT=1
 BUILD_GWT_USERPORTAL=1
 BUILD_GWT_WEBADMIN=1
+BUILD_ALL_USER_AGENTS=0
 BUILD_LOCALES=0
 BUILD_DEV=0
 BUILD_UT=1
@@ -36,7 +37,7 @@
 DEV_REBUILD=1
 DEV_BUILD_GWT_DRAFT=0
 DEV_EXTRA_BUILD_FLAGS=
-DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS=-D gwt.userAgent=gecko1_8
+DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS=
 PATTERNFLY_DIR=/usr/share/patternfly1/resources
 
 PACKAGE_NAME=ovirt-engine
@@ -102,6 +103,9 @@
 BUILD_FLAGS:=$(BUILD_FLAGS) -P gwt-admin
 endif
 endif
+ifneq ($(BUILD_ALL_USER_AGENTS),0)
+BUILD_FLAGS:=$(BUILD_FLAGS) -P all-user-agents
+endif
 ifneq ($(BUILD_LOCALES),0)
 BUILD_FLAGS:=$(BUILD_FLAGS) -P all-langs
 endif
diff --git a/frontend/webadmin/modules/pom.xml 
b/frontend/webadmin/modules/pom.xml
index 12b63c1..eac3dfa 100644
--- a/frontend/webadmin/modules/pom.xml
+++ b/frontend/webadmin/modules/pom.xml
@@ -56,8 +56,8 @@
       -Djava.util.prefs.userRoot="${project.build.directory}/tmp/.java"
     </gwt-plugin.extraJvmArgs>
     <!-- Control target browsers for GWT compilation, maps to 'user.agent' 
deferred binding property in *.gwt.xml -->
-    <!-- By default, all modern browsers are supported, see 
[gwt-user.jar:com/google/gwt/user/UserAgent.gwt.xml] for a complete list -->
-    <gwt.userAgent>ie8,ie9,gecko1_8,safari,opera</gwt.userAgent>
+    <!-- By default, compile for Firefox browser only, use 'all-user-agents' 
profile to compile for all browsers -->
+    <gwt.userAgent>gecko1_8</gwt.userAgent>
     <!-- Control target locales for GWT compilation, maps to 'locale' deferred 
binding property in *.gwt.xml -->
     <!-- By default, only English locale is supported, see 'all-langs' profile 
for a complete list -->
     <gwt.locale>en_US</gwt.locale>
@@ -204,6 +204,13 @@
   </build>
   <profiles>
     <profile>
+      <id>all-user-agents</id>
+      <properties>
+        <!-- See [gwt-user.jar:com/google/gwt/useragent/UserAgent.gwt.xml] for 
a complete list -->
+        <gwt.userAgent>ie8,ie9,gecko1_8,safari</gwt.userAgent>
+      </properties>
+    </profile>
+    <profile>
       <id>all-langs</id>
       <properties>
         
<gwt.locale>en_US,es_ES,fr_FR,ja_JP,pt_BR,zh_CN,de_DE,ko_KR</gwt.locale>


-- 
To view, visit http://gerrit.ovirt.org/32164
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I19f5009bb9a73bc554d7ffbd39075130c615c34f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vsz...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to