OSDN Git Service

added ios to project update code
authorMario Zechner <contact@badlogicgames.com>
Sun, 20 Jan 2013 12:03:24 +0000 (13:03 +0100)
committerMario Zechner <contact@badlogicgames.com>
Sun, 20 Jan 2013 12:03:24 +0000 (13:03 +0100)
extensions/gdx-setup-ui/src/aurelienribon/gdxsetupui/Helper.java
extensions/gdx-setup-ui/src/aurelienribon/gdxsetupui/ProjectUpdate.java

index 85c2331..0823913 100644 (file)
@@ -65,6 +65,10 @@ public class Helper {
        public static String getHtmlPrjPath(BaseProjectConfiguration cfg) {
                return FilenameUtils.normalize(cfg.destinationPath + "/" + cfg.projectName + cfg.suffixHtml + "/", true);
        }
+       
+       public static String getIosPrjPath (ProjectUpdateConfiguration cfg) {
+               return FilenameUtils.normalize(cfg.destinationPath + "/" + cfg.projectName + cfg.suffixIos + "/", true);
+       }
 
        // -------------------------------------------------------------------------
        // Classpath
index 2c15427..ff2730b 100644 (file)
@@ -67,6 +67,7 @@ public class ProjectUpdate {
                File desktopPrjLibsDir = new File(Helper.getDesktopPrjPath(cfg) + "libs");
                File androidPrjLibsDir = new File(Helper.getAndroidPrjPath(cfg) + "libs");
                File htmlPrjLibsDir = new File(Helper.getHtmlPrjPath(cfg) + "war/WEB-INF/lib");
+               File iosPrjLibsDir = new File(Helper.getIosPrjPath(cfg) + "libs");
                File dataDir = new File(Helper.getAndroidPrjPath(cfg) + "assets");
 
                for (String library : cfg.libraries) {
@@ -99,6 +100,11 @@ public class ProjectUpdate {
                                        for (String elemName : def.libsHtml)
                                                if (entryName.endsWith(elemName)) copyEntry(zis, elemName, htmlPrjLibsDir);
                                }
+                               
+                               if(cfg.isIosIncluded) {
+                                       for(String elemName : def.libsIos)
+                                               if (entryName.endsWith(elemName)) copyEntry(zis, elemName, iosPrjLibsDir);
+                               }
                        }
 
                        zis.close();