Changeset 636 for AE/installer2/src/net/oni2/aeinstaller
- Timestamp:
- Jan 19, 2013, 4:35:35 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/AEInstaller.properties
r634 r636 1 1 appname=AE Installer 2 2 appversion=0.9 2b2 appversion=0.93 -
AE/installer2/src/net/oni2/aeinstaller/backend/depot/DepotConfig.java
r626 r636 20 20 * @return Vocabulary name for platform field 21 21 */ 22 publicstatic String getVocabularyName_Platform() {22 static String getVocabularyName_Platform() { 23 23 return "Platform"; 24 24 } … … 27 27 * @return Vocabulary name for installtype field 28 28 */ 29 publicstatic String getVocabularyName_InstallType() {29 static String getVocabularyName_InstallType() { 30 30 return "Install method"; 31 31 } … … 34 34 * @return Vocabulary name for modtype field 35 35 */ 36 publicstatic String getVocabularyName_ModType() {36 static String getVocabularyName_ModType() { 37 37 return "Mod type"; 38 38 } … … 62 62 * @return Taxonomy term name for installtype Package 63 63 */ 64 publicstatic String getTaxonomyName_InstallType_Package() {64 static String getTaxonomyName_InstallType_Package() { 65 65 return "Package"; 66 66 } … … 87 87 * @return URL of Depot 88 88 */ 89 publicstatic String getDepotUrl() {89 static String getDepotUrl() { 90 90 return Settings.getInstance().get("depot_url", "http://mods.oni2.net/"); 91 91 } … … 94 94 * @return URL of Depot API 95 95 */ 96 publicstatic String getDepotApiUrl() {96 static String getDepotApiUrl() { 97 97 return Settings.getInstance().get("depot_api_url", 98 98 "http://mods.oni2.net/?q=api/"); -
AE/installer2/src/net/oni2/aeinstaller/backend/depot/model/TaxonomyTerm.java
r591 r636 13 13 private String description; 14 14 private String uri; 15 16 /**17 * Manually create a taxonomy term for internal use18 *19 * @param tid20 * ID21 * @param vid22 * VocabID23 * @param name24 * Term name25 */26 public TaxonomyTerm(int tid, int vid, String name) {27 this.tid = tid;28 this.vid = vid;29 this.name = name;30 this.description = "";31 this.uri = "";32 }33 15 34 16 /** -
AE/installer2/src/net/oni2/aeinstaller/backend/mods/Mod.java
r631 r636 85 85 File plain = new File(getLocalPath(), "plain"); 86 86 if (config.exists()) { 87 try { 88 FileInputStream fstream = new FileInputStream(config); 89 InputStreamReader isr = new InputStreamReader(fstream); 90 BufferedReader br = new BufferedReader(isr); 91 String strLine; 92 while ((strLine = br.readLine()) != null) { 93 if (strLine.indexOf("->") < 1) 94 continue; 95 if (strLine.indexOf("//") >= 0) 96 strLine = strLine.substring(0, strLine.indexOf("//")); 97 String[] split = strLine.split("->", 2); 98 String sName = split[0].trim(); 99 String sVal = split[1].trim(); 100 if (sName.equalsIgnoreCase("AEInstallVersion")) { 101 aeVersion = Double.parseDouble(sVal); 102 } else if (sName.equalsIgnoreCase("NameOfMod")) { 103 if (node == null) 104 name = sVal; 105 } else if (sName.equalsIgnoreCase("Creator")) { 106 if (node == null) 107 creator = sVal; 108 } else if (sName.equalsIgnoreCase("HasBsl")) { 109 if (sVal.equalsIgnoreCase("addon")) 110 bslInstallType = EBSLInstallType.ADDON; 111 } else if (sName.equalsIgnoreCase("ModVersion")) { 112 if (node == null) 113 version = sVal; 114 } else if (sName.equalsIgnoreCase("Readme")) { 115 if (node == null) 116 description = sVal.replaceAll("\\\\n", "<br>"); 117 } else if (sName.equalsIgnoreCase("DependsOn")) { 118 String[] depsS = sVal.split(","); 119 for (String s : depsS) { 120 try { 121 int dep = Integer.parseInt(s); 122 dependencies.add(dep); 123 } catch (NumberFormatException e) { 124 System.err 125 .format("Mod %05d does contain a non-number dependency: '%s'\n", 126 packageNumber, s); 127 } 128 } 129 } else if (sName.equalsIgnoreCase("IncompatibleWith")) { 130 String[] confS = sVal.split(","); 131 for (String s : confS) { 132 try { 133 int conf = Integer.parseInt(s); 134 incompatibilities.add(conf); 135 } catch (NumberFormatException e) { 136 System.err 137 .format("Mod %05d does contain a non-number incompatibility: '%s'\n", 138 packageNumber, s); 139 } 140 } 141 } else if (sName.equalsIgnoreCase("UnlockLevel")) { 142 String[] levelsS = sVal.split(","); 143 for (String s : levelsS) { 144 try { 145 int level = Integer.parseInt(s); 146 unlockLevel.add(level); 147 } catch (NumberFormatException e) { 148 System.err 149 .format("Mod %05d does contain a non-number UnlockLevel value: '%s'\n", 150 packageNumber, s); 151 } 152 } 153 } else if (sName.equalsIgnoreCase("ExeName")) { 154 exeFile = new File(Paths.getEditionBasePath(), sVal); 155 } else if (sName.equalsIgnoreCase("WorkingDir")) { 156 workingDir = sVal; 157 } else if (sName.equalsIgnoreCase("IconName")) { 158 iconFile = new File(Paths.getEditionBasePath(), sVal); 159 } 160 } 161 isr.close(); 162 } catch (FileNotFoundException e) { 163 } catch (IOException e) { 164 e.printStackTrace(); 87 Mod_Info mi = new Mod_Info(config, packageNumber); 88 89 aeVersion = mi.getAeVersion(); 90 bslInstallType = mi.getBslInstallType(); 91 if (node == null) { 92 name = mi.getName(); 93 creator = mi.getCreator(); 94 version = mi.getVersion(); 95 description = mi.getDescription(); 165 96 } 97 98 dependencies = mi.getDependencies(); 99 incompatibilities = mi.getIncompatibilities(); 100 unlockLevel = mi.getUnlockLevel(); 101 102 exeFile = mi.getExeFile(); 103 workingDir = mi.getWorkingDir(); 104 iconFile = mi.getIconFile(); 166 105 } else { 167 106 System.err.println("No config found for mod folder: " -
AE/installer2/src/net/oni2/aeinstaller/backend/mods/ModManager.java
r635 r636 269 269 * @return Mod/tool or null 270 270 */ 271 p ublicMod getModByNumber(int number) {271 private Mod getModByNumber(int number) { 272 272 if (mods.containsKey(number)) 273 273 return mods.get(number); -
AE/installer2/src/net/oni2/aeinstaller/backend/mods/Type.java
r600 r636 9 9 */ 10 10 public class Type { 11 String name; 12 TaxonomyTerm depotTerm; 11 private String name; 12 @SuppressWarnings("unused") 13 private TaxonomyTerm depotTerm; 13 14 14 HashSet<Mod> entries = new HashSet<Mod>();15 private HashSet<Mod> entries = new HashSet<Mod>(); 15 16 16 17 /** -
AE/installer2/src/net/oni2/aeinstaller/gui/HTMLLinkLabel.java
r600 r636 23 23 private static final long serialVersionUID = 2416829757362043910L; 24 24 25 String prefix;26 String suffix;25 private String prefix; 26 private String suffix; 27 27 28 28 /** -
AE/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTableFilter.java
r630 r636 10 10 */ 11 11 public class ModTableFilter extends RowFilter<ModTableModel, Integer> { 12 Type type = null;13 int downloadState = 0;12 private Type type = null; 13 private int downloadState = 0; 14 14 15 15 /** -
AE/installer2/src/net/oni2/aeinstaller/gui/settings/LaFComboModel.java
r592 r636 18 18 public class LaFComboModel implements ComboBoxModel { 19 19 20 Vector<LookAndFeelInfo> items;21 HashSet<ListDataListener> listeners;22 int selected;20 private Vector<LookAndFeelInfo> items; 21 private HashSet<ListDataListener> listeners; 22 private int selected; 23 23 24 24 /**
Note:
See TracChangeset
for help on using the changeset viewer.