그래서,이 작업을 수행하는 방법은, 불행하게도 J2ME - 폴란드어 소스를 변경하는 것입니다! 이 bug report에 설명 된대로 J2ME 폴란드어 빌드 프레임 워크 (버전 2.1.4)는 RAP-RELC에 RIM-MIDlet-Flags-x JAD 속성을 전달하지 않습니다.
변화는 비교적 단순하다 - 그렇지 않으면 단순히 (2.1.4 원본 소스처럼)을 0으로 설정하는 경우에 정의 된 JAD RIM-미들 릿 - 1 플래그 값에 전달.
은 diff (2.1.4에서) 출처 :하지 않습니다 (하지 않음) 작업
Index: /enough-polish-build/source/extensions/de/enough/polish/blackberry/JarToCodFinalizer.java
===================================================================
--- /enough-polish-build/source/extensions/de/enough/polish/blackberry/JarToCodFinalizer.java (revision 315)
+++ /enough-polish-build/source/extensions/de/enough/polish/blackberry/JarToCodFinalizer.java (revision 316)
@@ -36,6 +36,7 @@
import java.util.Calendar;
import java.util.Locale;
import java.util.Map;
+import java.util.List;
import java.util.Properties;
import org.apache.tools.ant.BuildException;
@@ -185,6 +186,13 @@
}
}
File iconFile = null;
+ Map jadProperties;
+ try {
+ jadProperties = FileUtil.readPropertiesFile(jadFile, ':');
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new BuildException("Unable to read JAD file " + e.toString());
+ }
if (mainClassName != null) {
try {
/*
@@ -230,12 +238,26 @@
"MicroEdition-Configuration: CLDC-1.1",
//"MIDlet-1: Demo," + iconUrl + ",",
"MIDlet-1: " + env.getVariable("MIDlet-Name") + "," + iconUrl + ",",
- //"MIDlet-Icon: " + iconUrl,
- "RIM-MIDlet-Flags-1: 0"
+ //"MIDlet-Icon: " + iconUrl
};
+ /* Ensure that if RIM-MIDlet-Flags is defined in the JAD, it is
+ * passed on to RAPC to create the COD file.
+ * See https://developer.berlios.de/bugs/?func=detailbug&group_id=1246&bug_id=16901
+ * for details.
+ */
+ ArrayList newEntriesList = new ArrayList(Arrays.asList(newEntries));
+ final String flagsKey = "RIM-MIDlet-Flags-1";
+ String flagString = (String)jadProperties.get(flagsKey);
+ if (flagString == null) {
+ flagString = "0";
+ }
+ flagString = flagString.trim();
+ System.out.println("JarToCodFinalizer setting " + flagsKey + ": " + flagString);
+ newEntriesList.add(flagsKey+ ": " + flagString);
+
File rapcFile = new File(jadFile.getParent(), codName + ".rapc");
- FileUtil.writeTextFile(rapcFile, newEntries);
+ FileUtil.writeTextFile(rapcFile, newEntriesList);
} catch (IOException e) {
// this shouldn't happen
e.printStackTrace();
@@ -367,7 +389,6 @@
// now rewrite JAD file so that it is ready for OTA download:
// (first backup JAD file:)
//FileUtil.copy(jadFile, new File(jadFile.getParent(), jadFile.getName() + ".bak"));
- Map jadProperties = FileUtil.readPropertiesFile(jadFile, ':');
Object[] keys = jadProperties.keySet().toArray();
for (int i = 0; i < keys.length; i++) {
String key = (String) keys[i];
일부 변경 사항은 polish thread http : // www.j2mepolish.org/forum/viewtopic.php?p=3379#3379 – drubin