Changeset 781
- Timestamp:
- 01/29/14 12:22:33 (10 years ago)
- Location:
- trunk/src/org/expeditee/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/Browser.java
r777 r781 225 225 String userName = UserSettings.ProfileName.get(); 226 226 //UserSettings.UserName.set(UserSettings.ProfileName.get()); 227 228 // Load documentation and start pages 229 FrameUtils.extractResources(false); 230 // Load fonts before loading any frames so the items on the frames will be able to access their fonts 231 Text.InitFonts(); 227 232 228 233 Frame profile = loadProfile(userName); … … 283 288 284 289 Settings.Init(); 285 286 Text.InitFonts();287 290 288 291 DisplayIO.Init(this); -
trunk/src/org/expeditee/gui/FrameUtils.java
r778 r781 1499 1499 yPos = 100; 1500 1500 1501 // Load documentation and start pages1502 extractResources();1503 1504 1501 // Add documentation links 1505 1502 File helpDirectory = new File(FrameIO.HELP_PATH); … … 1723 1720 * Extracts files/folders from the assets/resources folder directly into 1724 1721 * ${PARENT_FOLDER} (~/.expeditee) 1722 * 1723 * @param force if true, resources will be extracted even if they have already been extracted before 1725 1724 */ 1726 private static void extractResources() { 1725 public static void extractResources(boolean force) { 1726 File check = new File(FrameIO.PARENT_FOLDER + ".res"); 1727 if(!force && check.exists()) { 1728 return; 1729 } 1727 1730 System.out.println("Extracting/Installing resources:"); 1728 1731 try { 1732 check.getParentFile().mkdirs(); 1733 check.createNewFile(); 1734 1729 1735 ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); 1730 1736 URL docURL = classLoader.getResource("org/expeditee/assets/resources"); … … 1747 1753 File out = new File(FrameIO.PARENT_FOLDER + ze.getName().substring(resLength)); 1748 1754 // System.out.println("Didn't crash here " + out.getPath()); 1749 if(out.exists()) {1750 continue;1751 }1755 // if(out.exists()) { 1756 // continue; 1757 // } 1752 1758 if(ze.isDirectory()) { 1753 1759 // System.out.println(out.getPath() + " IS DIRECTORY"); … … 1791 1797 } 1792 1798 } 1793 catch (Exception e) 1794 { 1799 catch (Exception e) { 1795 1800 e.printStackTrace(); 1796 1801 } … … 1819 1824 System.out.println(file.getPath()); 1820 1825 File out = new File(FrameIO.PARENT_FOLDER + file.getPath().substring(file.getPath().indexOf(res) + resLength)); 1821 if(out.exists()) {1822 continue;1823 }1826 // if(out.exists()) { 1827 // continue; 1828 // } 1824 1829 out.getParentFile().mkdirs(); 1825 1830 FileOutputStream fOut = null;
Note:
See TracChangeset
for help on using the changeset viewer.