Changeset 596 for AE/installer2
- Timestamp:
- Jan 2, 2013, 6:00:16 PM (12 years ago)
- Location:
- AE/installer2
- Files:
-
- 6 added
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/.classpath
r593 r596 20 20 <classpathentry kind="lib" path="lib/xstream-1.4.3.jar"/> 21 21 <classpathentry kind="lib" path="lib/macify.jar"/> 22 <classpathentry kind="lib" path="lib/commons-io-2.4.jar"> 23 <attributes> 24 <attribute name="javadoc_location" value="jar:platform:/resource/AEInstaller2/lib/commons-io-2.4-javadoc.jar!/"/> 25 </attributes> 26 </classpathentry> 22 27 <classpathentry kind="output" path="bin"/> 23 28 </classpath> -
AE/installer2/doc/AEI1-stuff_onisplit-commands.txt
r595 r596 21 21 installation: installer.cpp/h - recompileAll() in #500 22 22 23 #ifdef WIN3224 bool splitInstances = false;25 string strImportOption = "-import:nosep";26 string strOniSplit = "Onisplit.exe";27 #else28 bool splitInstances = false;29 string strImportOption = "-import:sep";30 string strOniSplit = "mono Onisplit.exe";31 #endif32 33 23 34 24 … … 39 29 40 30 http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5 41 42 43 44 check globalization:45 bool CheckForGlobalization(bool justDoIt)46 {47 if (!exists("../GameDataFolder"))48 {49 string globMsg = "You haven't globalized yet!\n";50 globMsg = globMsg + "You must globalize to use the Anniversary Edition framework.\n" +51 "Would you like to globalize now? (This could take a while...)\n" +52 "(Selecting \"No\" will exit this program...)";53 wxMessageDialog* YesNoDialog = new wxMessageDialog(TheWindow, globMsg.c_str(), "AE Installer Alert", wxYES_NO | wxICON_EXCLAMATION, wxDefaultPosition);54 55 if (YesNoDialog->ShowModal() == wxID_NO) // if the user said no...56 {57 TheWindow->Close();58 return true;59 }60 }61 else if (!justDoIt)62 return false;63 // Code below this point runs if user clicks "Yes" or if they are never asked but justDoIt is true64 #ifdef WIN3265 boost::thread thrd3(globalize2);66 #else // cannot use multi-threading in Mac build67 TheWindow->InstallButton->Disable();68 TheWindow->ReglobalizeButton->Disable();69 globalizeData();70 TheWindow->InstallButton->Enable();71 TheWindow->ReglobalizeButton->Enable();72 #endif73 74 return true;75 } -
AE/installer2/src/net/oni2/aeinstaller/AEInstaller2.java
r594 r596 17 17 import javax.swing.UIManager.LookAndFeelInfo; 18 18 19 import net.oni2.aeinstaller.backend. OniSplit;19 import net.oni2.aeinstaller.backend.Paths; 20 20 import net.oni2.aeinstaller.backend.Settings; 21 21 import net.oni2.aeinstaller.backend.Settings.Platform; 22 22 import net.oni2.aeinstaller.backend.StuffToRefactorLater; 23 23 import net.oni2.aeinstaller.backend.depot.DepotManager; 24 import net.oni2.aeinstaller.backend.oni.Installer; 25 import net.oni2.aeinstaller.backend.oni.OniSplit; 24 26 import net.oni2.aeinstaller.gui.MainWin; 25 27 … … 62 64 */ 63 65 public static void main(String[] args) { 64 new File(Settings.getPrefsPath()).mkdirs();65 new File(Settings.getDownloadPath()).mkdirs();66 Paths.getPrefsPath().mkdirs(); 67 Paths.getDownloadPath().mkdirs(); 66 68 67 69 boolean debug = false; … … 71 73 if (!debug) { 72 74 try { 73 System.setOut(new PrintStream( Settings.getPrefsPath()74 + "aei_output.log"));75 System.setErr(new PrintStream( Settings.getPrefsPath()76 + "aei_error.log"));75 System.setOut(new PrintStream(new File(Paths.getPrefsPath(), 76 "aei_output.log"))); 77 System.setErr(new PrintStream(new File(Paths.getPrefsPath(), 78 "aei_error.log"))); 77 79 } catch (FileNotFoundException e1) { 78 80 e1.printStackTrace(); … … 86 88 Settings.setDebug(debug); 87 89 DepotManager.getInstance().loadFromFile( 88 new File(Settings.getDepotCacheFilename()));90 Settings.getDepotCacheFilename()); 89 91 90 92 SwingJavaBuilder.getConfig().addResourceBundle(imagesBundle); … … 96 98 System.setProperty("networkaddress.cache.ttl", "5"); 97 99 System.setProperty("networkaddress.cache.negative.ttl", "1"); 98 100 99 101 try { 100 102 String laf = Settings.getInstance().get("lookandfeel", … … 120 122 121 123 // TODO 122 System.out.println("JarPath: " + Settings.getJarPath());123 System.out.println("PrefsPath: " + Settings.getPrefsPath());124 System.out.println("DataPath: " + Settings.getDataPath());125 System.out.println("DownPath: " + Settings.getDownloadPath());126 System.out.println("TempPath: " + Settings.getTempPath());124 System.out.println("JarPath: " + Paths.getInstallerPath()); 125 System.out.println("PrefsPath: " + Paths.getPrefsPath()); 126 System.out.println("DataPath: " + Paths.getModsPath()); 127 System.out.println("DownPath: " + Paths.getDownloadPath()); 128 System.out.println("TempPath: " + Paths.getTempPath()); 127 129 System.out.println("ValidPath: " 128 130 + StuffToRefactorLater.verifyRunningDirectory()); … … 130 132 System.out.println("Architect: " + Settings.getArchitecture()); 131 133 System.out.println(".NET: " + OniSplit.isDotNETInstalled()); 134 System.out.println("Globalized:" + Installer.isEditionInitialized()); 132 135 133 136 if (!StuffToRefactorLater.verifyRunningDirectory()) { … … 139 142 return; 140 143 } 144 } else { 145 Installer.initializeEdition(); 141 146 } 142 147 -
AE/installer2/src/net/oni2/aeinstaller/backend/Settings.java
r594 r596 7 7 import java.io.IOException; 8 8 import java.io.Serializable; 9 import java.io.UnsupportedEncodingException;10 import java.net.URLDecoder;11 9 import java.util.HashMap; 12 10 import java.util.Vector; … … 142 140 143 141 /** 144 * Get the Jar path145 *146 * @return Path147 */148 public static String getJarPath() {149 String jarPath = Settings.class.getProtectionDomain().getCodeSource()150 .getLocation().getPath();151 String decodedPath = null;152 try {153 decodedPath = URLDecoder.decode(jarPath, "UTF-8");154 } catch (UnsupportedEncodingException e) {155 e.printStackTrace();156 }157 return new File(decodedPath).getParentFile().getPath() + "/";158 }159 160 /**161 * Get the preferences path162 *163 * @return Path164 */165 public static String getPrefsPath() {166 return getJarPath();167 }168 169 /**170 * Get the path to store downloaded files171 *172 * @return Download path173 */174 public static String getDownloadPath() {175 return getTempPath() + "oni_aei/";176 }177 178 /**179 * Get the path to store game information data180 *181 * @return Data path182 */183 public static String getDataPath() {184 return getJarPath() + "mods/";185 }186 187 /**188 * Get the systems temp-path189 *190 * @return Path191 */192 public static String getTempPath() {193 return new File(System.getProperty("java.io.tmpdir")).getPath() + "/";194 }195 196 /**197 142 * @return Mod Depot cache filename 198 143 */ 199 public static StringgetDepotCacheFilename() {200 return Settings.getPrefsPath() + "ModDepotCache.xml";201 } 202 203 private static StringgetSettingsFilename() {204 return Settings.getPrefsPath() + "AEI-Settings.xml";144 public static File getDepotCacheFilename() { 145 return new File(Paths.getPrefsPath(), "ModDepotCache.xml"); 146 } 147 148 private static File getSettingsFilename() { 149 return new File(Paths.getPrefsPath(), "AEI-Settings.xml"); 205 150 } 206 151 -
AE/installer2/src/net/oni2/aeinstaller/backend/StuffToRefactorLater.java
r591 r596 1 1 package net.oni2.aeinstaller.backend; 2 2 3 import java.io.File;4 3 5 4 public class StuffToRefactorLater { … … 9 8 */ 10 9 public static boolean verifyRunningDirectory() { 11 File jarPath = new File(Settings.getJarPath()); 12 File parentPath = jarPath.getParentFile().getParentFile(); 13 File gdf = new File(parentPath, "GameDataFolder"); 14 return gdf.exists() && gdf.isDirectory(); 10 return Paths.getVanillaGDF().exists() && Paths.getVanillaGDF().isDirectory(); 15 11 } 16 12 } -
AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
r593 r596 2 2 3 3 import java.awt.Frame; 4 import java.io.File;5 4 import java.util.ArrayList; 6 5 import java.util.Comparator; … … 190 189 private void saveLocalData() { 191 190 Settings.getInstance().serializeToFile(); 192 DepotManager.getInstance().saveToFile( 193 new File(Settings.getDepotCacheFilename())); 191 DepotManager.getInstance().saveToFile(Settings.getDepotCacheFilename()); 194 192 } 195 193 … … 264 262 JOptionPane.INFORMATION_MESSAGE); 265 263 } 266 264 267 265 @SuppressWarnings("unused") 268 266 private void revertSelection() { … … 271 269 JOptionPane.INFORMATION_MESSAGE); 272 270 } 273 274 275 271 276 272 private void modSelection(NodeMod n) {
Note:
See TracChangeset
for help on using the changeset viewer.