Changeset 524
- Timestamp:
- 11/02/09 20:43:40 (2 years ago)
- Location:
- branches/LogicMail-1.1/LogicMail
- Files:
-
- 5 edited
-
build.xml (modified) (3 diffs)
-
project.properties (modified) (1 diff)
-
src/org/logicprobe/LogicMail/AppInfo.java (modified) (4 diffs)
-
src/org/logicprobe/LogicMail/LogicMail.java (modified) (1 diff)
-
src/org/logicprobe/LogicMail/ui/GlobalConfigScreen.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/LogicMail-1.1/LogicMail/build.xml
r479 r524 28 28 <!-- Build the application --> 29 29 <target name="build"> 30 <!-- Prepare the resource file list --> 31 <propertyregex property="rrc.files" 32 input="${module.locales}" 33 regexp="([^,]+)" 34 global="true" 35 replace="LogicMail_\1.rrc" 36 /> 37 38 <!-- Create the fileset of sources and images --> 39 <fileset dir="${src.dir}" id="sources"> 40 <include name="**/*.java" /> 41 <exclude name="**/bb40/*.java" /> 42 <exclude name="**/*BB40.java" /> 43 <include name="**/*.png" /> 44 </fileset> 45 <!-- Create the fileset of translations --> 46 <fileset dir="${src.dir}/org/logicprobe/LogicMail" 47 includes="LogicMail.rrc,LogicMail.rrh,${rrc.files}" 48 id="translations"/> 49 50 <!-- Prepare the arguments --> 51 <if><isset property="module.build"/> 52 <then><property name="argument.build" value="-build:${module.build}"/></then> 53 <else><property name="argument.build" value=""/></else> 54 </if> 55 <if><istrue value="${module.release}"/> 56 <then><property name="argument.release" value="-release"/></then> 57 <else><property name="argument.release" value=""/></else> 58 </if> 59 30 60 <mkdir dir="${dist.dir}" /> 31 61 <copy file="${src.dir}/icons/logicmail.png" todir="${dist.dir}" /> 32 62 <rapc output="${module.name}" 33 srcdir="${src.dir}"34 63 destdir="${dist.dir}" 35 64 jdehome="${jde.home}"> … … 40 69 midletclass="org.logicprobe.LogicMail.LogicMail" 41 70 icon="logicmail.png" 42 arguments=" -build:${module.build}">71 arguments="${argument.build} ${argument.release}"> 43 72 </jdp> 44 73 <src> 45 <fileset dir="${src.dir}"> 46 <include name="**/*.java" /> 47 <include name="**/*.rrc" /> 48 <include name="**/*.rrh" /> 49 <exclude name="**/bb40" /> 50 <exclude name="**/*BB40.java" /> 51 <include name="**/*.png" /> 52 </fileset> 74 <fileset refid="sources" /> 75 <fileset refid="translations" /> 53 76 <fileset dir="${startup.src.dir}"> 54 77 <include name="**/*.java" /> … … 112 135 <replaceregexp file="${dist.ota.dir}/LogicMail.jad" match="MIDlet-Jar-Size(.*)\n" replace="" /> 113 136 <unzip src="${dist.dir}/${module.name}.cod" dest="${dist.ota.dir}" /> 114 </target>137 </target> 115 138 116 139 <!-- Prepare the distribution --> -
branches/LogicMail-1.1/LogicMail/project.properties
r422 r524 8 8 module.copyright=Copyright (c) 2009, Derek Konigsberg 9 9 module.version=1.1.0 10 # 11 # Build number, typically set for automated builds 12 # 10 13 module.build=0 14 # 15 # Locales to include in addition to the default 16 # 17 module.locales=es,zh,zh_CN 18 # 19 # Set to "yes" for release builds. This disables any application features 20 # intended only for testing, such as manual locale selection. 21 # 22 module.release=no 11 23 # 12 24 # Set the path to the JDE to build with -
branches/LogicMail-1.1/LogicMail/src/org/logicprobe/LogicMail/AppInfo.java
r423 r524 43 43 public final static long GUID = 0x6bc611e33074e780L; 44 44 45 private static String PARAM_BUILD = "-build:"; 46 private static String PARAM_RELEASE = "-release"; 47 45 48 private static String appName; 46 49 private static String appVersion; 50 private static boolean release; 51 47 52 /** 48 53 * Initializes the application information from the descriptor and the … … 51 56 */ 52 57 public static synchronized void initialize(String args[]) { 53 String build = null;58 String buildParam = null; 54 59 for(int i=0; i<args.length; i++) { 55 if(args[i].indexOf("-build:") != -1) { 56 int p = args[i].indexOf("-build:"); 60 if(args[i].indexOf(PARAM_BUILD) != -1) { 61 int p_len = PARAM_BUILD.length(); 62 int p = args[i].indexOf(PARAM_BUILD); 57 63 int q = args[i].indexOf(' '); 58 64 if(q == -1) { 59 build = args[i].substring(p + 7);65 buildParam = args[i].substring(p + p_len); 60 66 } 61 67 else { 62 build = args[i].substring(p + 7, q);68 buildParam = args[i].substring(p + p_len, q); 63 69 } 64 70 } 71 else if(args[i].indexOf(PARAM_RELEASE) != -1) { 72 release = true; 73 } 65 74 } 66 75 … … 72 81 StringBuffer buf = new StringBuffer(); 73 82 buf.append(appDesc.getVersion()); 74 if(build != null) {83 if(buildParam != null) { 75 84 buf.append(" ("); 76 buf.append(build );85 buf.append(buildParam); 77 86 buf.append(')'); 78 87 } 79 88 appVersion = buf.toString(); 80 89 } 90 81 91 public static String getName() { 82 92 return appName; … … 86 96 return appVersion; 87 97 } 98 99 public static boolean isRelease() { 100 return release; 101 } 88 102 } -
branches/LogicMail-1.1/LogicMail/src/org/logicprobe/LogicMail/LogicMail.java
r474 r524 60 60 MailSettings.getInstance().loadSettings(); 61 61 62 // Set the language, if configured 63 String languageCode = 64 MailSettings.getInstance().getGlobalConfig().getLanguageCode(); 65 if(languageCode != null && languageCode.length() > 0) { 66 try { 67 Locale.setDefault(Locale.get(languageCode)); 68 } catch (Exception e) { } 62 if(!AppInfo.isRelease()) { 63 // Set the language, if configured 64 String languageCode = 65 MailSettings.getInstance().getGlobalConfig().getLanguageCode(); 66 if(languageCode != null && languageCode.length() > 0) { 67 try { 68 Locale.setDefault(Locale.get(languageCode)); 69 } catch (Exception e) { } 70 } 69 71 } 70 72 -
branches/LogicMail-1.1/LogicMail/src/org/logicprobe/LogicMail/ui/GlobalConfigScreen.java
r509 r524 42 42 import net.rim.device.api.ui.text.TextFilter; 43 43 44 import org.logicprobe.LogicMail.AppInfo; 44 45 import org.logicprobe.LogicMail.LogicMailResource; 45 46 import org.logicprobe.LogicMail.conf.GlobalConfig; … … 124 125 resources.getString(LogicMailResource.CONFIG_GLOBAL_LANGUAGE), 125 126 languageChoices, languageIndex); 126 add(fldLanguage); 127 if(!AppInfo.isRelease()) { 128 add(fldLanguage); 129 } 127 130 128 131 fldUnicodeNormalization = new CheckboxField(resources.getString(
Note: See TracChangeset
for help on using the changeset viewer.
