OSDN Git Service

Change build system ant to sbt.
authorkobayasi <kobayasi@pscnet.co.jp>
Sun, 16 Feb 2014 17:10:33 +0000 (02:10 +0900)
committerkobayasi <kobayasi@pscnet.co.jp>
Sun, 16 Feb 2014 17:25:48 +0000 (02:25 +0900)
51 files changed:
build.sbt [new file with mode: 0644]
desktop/build.sbt [new file with mode: 0644]
desktop/src/main/java/com/jme3/app/AppletHarness.java [moved from engine/src/desktop/com/jme3/app/AppletHarness.java with 100% similarity]
desktop/src/main/java/com/jme3/system/JmeCanvasContext.java [moved from engine/src/desktop/com/jme3/system/JmeCanvasContext.java with 98% similarity]
desktop/src/main/java/com/jme3/system/JmeSystemDelegateImpl.java [new file with mode: 0644]
desktop/src/main/java/com/jme3/system/Natives.java [moved from engine/src/desktop/com/jme3/system/Natives.java with 98% similarity]
desktop/src/main/java/com/jme3/system/awt/AwtPanel.java [moved from engine/src/desktop/com/jme3/system/awt/AwtPanel.java with 97% similarity]
desktop/src/main/java/com/jme3/system/awt/AwtPanelsContext.java [moved from engine/src/desktop/com/jme3/system/awt/AwtPanelsContext.java with 96% similarity]
desktop/src/main/java/com/jme3/system/awt/PaintMode.java [moved from engine/src/desktop/com/jme3/system/awt/PaintMode.java with 100% similarity]
desktop/src/main/resources/native/linux/libbulletjme.so [new file with mode: 0644]
desktop/src/main/resources/native/linux/libbulletjme64.so [new file with mode: 0644]
desktop/src/main/resources/native/linux/libjinput-linux.so [new file with mode: 0644]
desktop/src/main/resources/native/linux/libjinput-linux64.so [new file with mode: 0644]
desktop/src/main/resources/native/linux/liblwjgl.so [new file with mode: 0644]
desktop/src/main/resources/native/linux/liblwjgl64.so [new file with mode: 0644]
desktop/src/main/resources/native/linux/libopenal.so [new file with mode: 0644]
desktop/src/main/resources/native/linux/libopenal64.so [new file with mode: 0644]
desktop/src/main/resources/native/macosx/libbulletjme.jnilib [new file with mode: 0644]
desktop/src/main/resources/native/macosx/libjinput-osx.jnilib [new file with mode: 0644]
desktop/src/main/resources/native/macosx/liblwjgl.jnilib [new file with mode: 0644]
desktop/src/main/resources/native/macosx/libopenal.dylib [new file with mode: 0644]
desktop/src/main/resources/native/macosx/openal.dylib [new file with mode: 0644]
desktop/src/main/resources/native/solaris/libbulletjme.so [new file with mode: 0644]
desktop/src/main/resources/native/solaris/libbulletjme64.so [new file with mode: 0644]
desktop/src/main/resources/native/solaris/liblwjgl.so [new file with mode: 0644]
desktop/src/main/resources/native/solaris/liblwjgl64.so [new file with mode: 0644]
desktop/src/main/resources/native/solaris/libopenal.so [new file with mode: 0644]
desktop/src/main/resources/native/solaris/libopenal64.so [new file with mode: 0644]
desktop/src/main/resources/native/windows/OpenAL32.dll [new file with mode: 0644]
desktop/src/main/resources/native/windows/OpenAL64.dll [new file with mode: 0644]
desktop/src/main/resources/native/windows/bulletjme.dll [new file with mode: 0644]
desktop/src/main/resources/native/windows/bulletjme.lib [new file with mode: 0644]
desktop/src/main/resources/native/windows/bulletjme64.dll [new file with mode: 0644]
desktop/src/main/resources/native/windows/bulletjme64.lib [new file with mode: 0644]
desktop/src/main/resources/native/windows/jinput-dx8.dll [new file with mode: 0644]
desktop/src/main/resources/native/windows/jinput-dx8_64.dll [new file with mode: 0644]
desktop/src/main/resources/native/windows/jinput-raw.dll [new file with mode: 0644]
desktop/src/main/resources/native/windows/jinput-raw_64.dll [new file with mode: 0644]
desktop/src/main/resources/native/windows/lwjgl.dll [new file with mode: 0644]
desktop/src/main/resources/native/windows/lwjgl64.dll [new file with mode: 0644]
engine/build.sbt [new file with mode: 0644]
engine/lib/MMDLoaderJME3-javadoc.jar [deleted file]
engine/lib/MMDLoaderJME3-lib.jar [deleted file]
engine/lib/MMDLoaderJME3-source.jar [deleted file]
engine/src/core/com/jme3/app/Application.java
engine/src/desktop/com/jme3/system/JmeSystem.java
engine/src/desktop/com/jme3/system/JmeSystemDelegate.java [new file with mode: 0644]
niftygui/build.sbt [new file with mode: 0644]
project/Common.scala [new file with mode: 0644]
project/build.properties [new file with mode: 0644]
project/plugins.sbt [new file with mode: 0644]

diff --git a/build.sbt b/build.sbt
new file mode 100644 (file)
index 0000000..18a240e
--- /dev/null
+++ b/build.sbt
@@ -0,0 +1,17 @@
+lazy val root =
+  (project.in(file("."))
+    .settings(Common.settings: _*)
+    .aggregate(engine, desktop, android, gdx, niftygui)
+    )
+
+lazy val engine = project
+
+lazy val desktop = project.dependsOn(engine)
+
+lazy val android = project
+
+lazy val gdx = project
+
+lazy val niftygui = project.dependsOn(engine)
+
+
diff --git a/desktop/build.sbt b/desktop/build.sbt
new file mode 100644 (file)
index 0000000..3deb975
--- /dev/null
@@ -0,0 +1,19 @@
+Common.settings
+
+name := "mms-desktop"
+
+unmanagedSourceDirectories in Compile ++= Seq(
+    baseDirectory.value / "../engine/src/lwjgl-oal"
+    , baseDirectory.value / "../engine/src/lwjgl-ogl"
+    , baseDirectory.value / "../engine/src/blender"
+)
+
+libraryDependencies += "org.lwjgl.lwjgl" % "lwjgl" % "2.9.0"
+
+libraryDependencies += "net.sf.sociaal" % "j-ogg-oggd" % "3.0.0.20130526"
+
+libraryDependencies += "net.sf.sociaal" % "j-ogg-vorbisd" % "3.0.0.20130526"
+
+libraryDependencies += "net.java.jinput" % "jinput" % "2.0.5"
+
+libraryDependencies += "org.bushe" % "eventbus" % "1.4"
@@ -32,7 +32,7 @@
 
 package com.jme3.system;
 
-import java.awt.Canvas;
+import java.awt.*;
 
 public interface JmeCanvasContext extends JmeContext {
     public Canvas getCanvas();
diff --git a/desktop/src/main/java/com/jme3/system/JmeSystemDelegateImpl.java b/desktop/src/main/java/com/jme3/system/JmeSystemDelegateImpl.java
new file mode 100644 (file)
index 0000000..91e62c9
--- /dev/null
@@ -0,0 +1,345 @@
+/*
+ * Copyright (c) 2009-2010 jMonkeyEngine
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
+ *   may be used to endorse or promote products derived from this software
+ *   without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jme3.system;
+
+import com.jme3.app.SettingsDialog;
+import com.jme3.app.SettingsDialog.SelectionListener;
+import com.jme3.asset.AssetManager;
+import com.jme3.asset.AssetNotFoundException;
+import com.jme3.asset.DesktopAssetManager;
+import com.jme3.audio.AudioRenderer;
+
+import javax.swing.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class JmeSystemDelegateImpl implements JmeSystemDelegate{
+
+    private static final Logger logger = Logger.getLogger(JmeSystemDelegateImpl.class.getName());
+    private boolean initialized = false;
+    private boolean lowPermissions = false;
+
+    public boolean trackDirectMemory() {
+        return false;
+    }
+
+    public void setLowPermissions(boolean lowPerm) {
+        lowPermissions = lowPerm;
+    }
+
+    public boolean isLowPermissions() {
+        return lowPermissions;
+    }
+
+    public AssetManager newAssetManager(URL configFile) {
+        return new DesktopAssetManager(configFile);
+    }
+
+    public AssetManager newAssetManager() {
+        return new DesktopAssetManager(null);
+    }
+
+    public boolean showSettingsDialog(AppSettings sourceSettings, final boolean loadFromRegistry) {
+        if (SwingUtilities.isEventDispatchThread()) {
+            throw new IllegalStateException("Cannot run from EDT");
+        }
+
+
+        final AppSettings settings = new AppSettings(false);
+        settings.copyFrom(sourceSettings);
+        String iconPath = sourceSettings.getSettingsDialogImage();
+        final URL iconUrl = JmeSystem.class.getResource(iconPath.startsWith("/") ? iconPath : "/" + iconPath);
+        if (iconUrl == null) {
+            throw new AssetNotFoundException(sourceSettings.getSettingsDialogImage());
+        }
+
+        final AtomicBoolean done = new AtomicBoolean();
+        final AtomicInteger result = new AtomicInteger();
+        final Object lock = new Object();
+
+        final SelectionListener selectionListener = new SelectionListener() {
+
+            public void onSelection(int selection) {
+                synchronized (lock) {
+                    done.set(true);
+                    result.set(selection);
+                    lock.notifyAll();
+                }
+            }
+        };
+        SwingUtilities.invokeLater(new Runnable() {
+
+            public void run() {
+                synchronized (lock) {
+                    SettingsDialog dialog = new SettingsDialog(settings, iconUrl, loadFromRegistry);
+                    dialog.setSelectionListener(selectionListener);
+                    dialog.showDialog();
+                }
+            }
+        });
+
+        synchronized (lock) {
+            while (!done.get()) {
+                try {
+                    lock.wait();
+                } catch (InterruptedException ex) {
+                }
+            }
+        }
+
+        sourceSettings.copyFrom(settings);
+
+        return result.get() == SettingsDialog.APPROVE_SELECTION;
+    }
+
+    private boolean is64Bit(String arch) {
+        if (arch.equals("x86")) {
+            return false;
+        } else if (arch.equals("amd64")) {
+            return true;
+        } else if (arch.equals("x86_64")) {
+            return true;
+        } else if (arch.equals("ppc") || arch.equals("PowerPC")) {
+            return false;
+        } else if (arch.equals("ppc64")) {
+            return true;
+        } else if (arch.equals("i386") || arch.equals("i686")) {
+            return false;
+        } else if (arch.equals("universal")) {
+            return false;
+        } else {
+            throw new UnsupportedOperationException("Unsupported architecture: " + arch);
+        }
+    }
+
+    public Platform getPlatform() {
+        String os = System.getProperty("os.name").toLowerCase();
+        String arch = System.getProperty("os.arch").toLowerCase();
+        logger.log(Level.INFO,"os = "+os+" arch = "+arch);
+        boolean is64 = is64Bit(arch);
+        if (os.contains("windows")) {
+            return is64 ? Platform.Windows64 : Platform.Windows32;
+        } else if (os.contains("linux") || os.contains("freebsd")) {
+            return is64 ? Platform.Linux64 : Platform.Linux32;
+        } else if (os.contains("mac os x") || os.contains("darwin")) {
+            if (arch.startsWith("ppc")) {
+                return is64 ? Platform.MacOSX_PPC64 : Platform.MacOSX_PPC32;
+            } else {
+                return is64 ? Platform.MacOSX64 : Platform.MacOSX32;
+            }
+        } else if (os.contains("sunos")) {
+            return is64 ? Platform.SolarisAMD64 : Platform.SolarisX86;
+        } else {
+            throw new UnsupportedOperationException("The specified platform: " + os + " is not supported.");
+        }
+    }
+
+    private JmeContext newContextLwjgl(AppSettings settings, JmeContext.Type type) {
+        try {
+            Class<? extends JmeContext> ctxClazz = null;
+            switch (type) {
+                case Canvas:
+                    ctxClazz = (Class<? extends JmeContext>) Class.forName("com.jme3.system.lwjgl.LwjglCanvas");
+                    break;
+                case Display:
+                    ctxClazz = (Class<? extends JmeContext>) Class.forName("com.jme3.system.lwjgl.LwjglDisplay");
+                    break;
+                case OffscreenSurface:
+                    ctxClazz = (Class<? extends JmeContext>) Class.forName("com.jme3.system.lwjgl.LwjglOffscreenBuffer");
+                    break;
+                default:
+                    throw new IllegalArgumentException("Unsupported context type " + type);
+            }
+
+            return ctxClazz.newInstance();
+        } catch (InstantiationException ex) {
+            logger.log(Level.SEVERE, "Failed to create context", ex);
+        } catch (IllegalAccessException ex) {
+            logger.log(Level.SEVERE, "Failed to create context", ex);
+        } catch (ClassNotFoundException ex) {
+            logger.log(Level.SEVERE, "CRITICAL ERROR: Context class is missing!\n"
+                    + "Make sure jme3_lwjgl-ogl is on the classpath.", ex);
+        }
+
+        return null;
+    }
+
+    private JmeContext newContextJogl(AppSettings settings, JmeContext.Type type) {
+        try {
+            Class<? extends JmeContext> ctxClazz = null;
+            switch (type) {
+                case Display:
+                    ctxClazz = (Class<? extends JmeContext>) Class.forName("com.jme3.system.jogl.JoglDisplay");
+                    break;
+                case Canvas:
+                    ctxClazz = (Class<? extends JmeContext>) Class.forName("com.jme3.system.jogl.JoglCanvas");
+                    break;
+                default:
+                    throw new IllegalArgumentException("Unsupported context type " + type);
+            }
+
+            return ctxClazz.newInstance();
+        } catch (InstantiationException ex) {
+            logger.log(Level.SEVERE, "Failed to create context", ex);
+        } catch (IllegalAccessException ex) {
+            logger.log(Level.SEVERE, "Failed to create context", ex);
+        } catch (ClassNotFoundException ex) {
+            logger.log(Level.SEVERE, "CRITICAL ERROR: Context class is missing!\n"
+                    + "Make sure jme3_jogl is on the classpath.", ex);
+        }
+
+        return null;
+    }
+
+    private JmeContext newContextCustom(AppSettings settings, JmeContext.Type type) {
+        try {
+            String className = settings.getRenderer().substring("CUSTOM".length());
+
+            Class<? extends JmeContext> ctxClazz = null;
+            ctxClazz = (Class<? extends JmeContext>) Class.forName(className);
+            return ctxClazz.newInstance();
+        } catch (InstantiationException ex) {
+            logger.log(Level.SEVERE, "Failed to create context", ex);
+        } catch (IllegalAccessException ex) {
+            logger.log(Level.SEVERE, "Failed to create context", ex);
+        } catch (ClassNotFoundException ex) {
+            logger.log(Level.SEVERE, "CRITICAL ERROR: Context class is missing!", ex);
+        }
+
+        return null;
+    }
+
+    public JmeContext newContext(AppSettings settings, JmeContext.Type contextType) {
+        initialize(settings);
+        JmeContext ctx;
+        if (settings.getRenderer() == null
+                || settings.getRenderer().equals("NULL")
+                || contextType == JmeContext.Type.Headless) {
+            ctx = new NullContext();
+            ctx.setSettings(settings);
+        } else if (settings.getRenderer().startsWith("LWJGL")) {
+            ctx = newContextLwjgl(settings, contextType);
+            ctx.setSettings(settings);
+        } else if (settings.getRenderer().startsWith("JOGL")) {
+            ctx = newContextJogl(settings, contextType);
+            ctx.setSettings(settings);
+        } else if (settings.getRenderer().startsWith("CUSTOM")) {
+            ctx = newContextCustom(settings, contextType);
+            ctx.setSettings(settings);
+        } else {
+            throw new UnsupportedOperationException(
+                    "Unrecognizable renderer specified: "
+                    + settings.getRenderer());
+        }
+        return ctx;
+    }
+
+    public AudioRenderer newAudioRenderer(AppSettings settings) {
+        initialize(settings);
+        Class<? extends AudioRenderer> clazz = null;
+        try {
+            if (settings.getAudioRenderer().startsWith("LWJGL")) {
+                clazz = (Class<? extends AudioRenderer>) Class.forName("com.jme3.audio.lwjgl.LwjglAudioRenderer");
+            } else if (settings.getAudioRenderer().startsWith("JOAL")) {
+                clazz = (Class<? extends AudioRenderer>) Class.forName("com.jme3.audio.joal.JoalAudioRenderer");
+            } else {
+                throw new UnsupportedOperationException(
+                        "Unrecognizable audio renderer specified: "
+                        + settings.getAudioRenderer());
+            }
+
+            AudioRenderer ar = clazz.newInstance();
+            return ar;
+        } catch (InstantiationException ex) {
+            logger.log(Level.SEVERE, "Failed to create context", ex);
+        } catch (IllegalAccessException ex) {
+            logger.log(Level.SEVERE, "Failed to create context", ex);
+        } catch (ClassNotFoundException ex) {
+            logger.log(Level.SEVERE, "CRITICAL ERROR: Audio implementation class is missing!\n"
+                    + "Make sure jme3_lwjgl-oal or jm3_joal is on the classpath.", ex);
+        }
+        return null;
+    }
+
+    public void initialize(AppSettings settings) {
+        if (initialized) {
+            return;
+        }
+
+        initialized = true;
+        try {
+            if (!lowPermissions) {
+                // can only modify logging settings
+                // if permissions are available
+//                JmeFormatter formatter = new JmeFormatter();
+//                Handler fileHandler = new FileHandler("jme.log");
+//                fileHandler.setFormatter(formatter);
+//                Logger.getLogger("").addHandler(fileHandler);
+//                Handler consoleHandler = new ConsoleHandler();
+//                consoleHandler.setFormatter(formatter);
+//                Logger.getLogger("").removeHandler(Logger.getLogger("").getHandlers()[0]);
+//                Logger.getLogger("").addHandler(consoleHandler);
+            }
+//        } catch (IOException ex){
+//            logger.log(Level.SEVERE, "I/O Error while creating log file", ex);
+        } catch (SecurityException ex) {
+            logger.log(Level.SEVERE, "Security error in creating log file", ex);
+        }
+        logger.log(Level.INFO, "Running on {0} chototsu", getFullName());
+
+
+        if (!lowPermissions) {
+            try {
+                Natives.extractNativeLibs(getPlatform(), settings);
+            } catch (IOException ex) {
+                logger.log(Level.SEVERE, "Error while copying native libraries", ex);
+            }
+        }
+    }
+
+    public String getFullName() {
+        return "jMonkeyEngine 3.0.0 Beta";
+    }
+
+    public InputStream getResourceAsStream(String name) {
+        return JmeSystem.class.getResourceAsStream(name);
+    }
+
+    public URL getResource(String name) {
+        return JmeSystem.class.getResource(name);
+    }
+}
  */
 package com.jme3.system;
 
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
+import java.io.*;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
@@ -8,13 +8,8 @@ import com.jme3.texture.FrameBuffer;
 import com.jme3.texture.Image.Format;
 import com.jme3.util.BufferUtils;
 import com.jme3.util.Screenshots;
-import java.awt.AWTException;
-import java.awt.BufferCapabilities;
-import java.awt.Canvas;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.ImageCapabilities;
-import java.awt.RenderingHints;
+
+import java.awt.*;
 import java.awt.event.ComponentAdapter;
 import java.awt.event.ComponentEvent;
 import java.awt.geom.AffineTransform;
@@ -7,11 +7,8 @@ import com.jme3.input.TouchInput;
 import com.jme3.input.awt.AwtKeyInput;
 import com.jme3.input.awt.AwtMouseInput;
 import com.jme3.renderer.Renderer;
-import com.jme3.system.AppSettings;
-import com.jme3.system.JmeContext;
-import com.jme3.system.JmeSystem;
-import com.jme3.system.SystemListener;
-import com.jme3.system.Timer;
+import com.jme3.system.*;
+
 import java.util.ArrayList;
 
 public class AwtPanelsContext implements JmeContext {
diff --git a/desktop/src/main/resources/native/linux/libbulletjme.so b/desktop/src/main/resources/native/linux/libbulletjme.so
new file mode 100644 (file)
index 0000000..600af2c
Binary files /dev/null and b/desktop/src/main/resources/native/linux/libbulletjme.so differ
diff --git a/desktop/src/main/resources/native/linux/libbulletjme64.so b/desktop/src/main/resources/native/linux/libbulletjme64.so
new file mode 100644 (file)
index 0000000..17cc241
Binary files /dev/null and b/desktop/src/main/resources/native/linux/libbulletjme64.so differ
diff --git a/desktop/src/main/resources/native/linux/libjinput-linux.so b/desktop/src/main/resources/native/linux/libjinput-linux.so
new file mode 100644 (file)
index 0000000..3cdc439
Binary files /dev/null and b/desktop/src/main/resources/native/linux/libjinput-linux.so differ
diff --git a/desktop/src/main/resources/native/linux/libjinput-linux64.so b/desktop/src/main/resources/native/linux/libjinput-linux64.so
new file mode 100644 (file)
index 0000000..de1ee5f
Binary files /dev/null and b/desktop/src/main/resources/native/linux/libjinput-linux64.so differ
diff --git a/desktop/src/main/resources/native/linux/liblwjgl.so b/desktop/src/main/resources/native/linux/liblwjgl.so
new file mode 100644 (file)
index 0000000..79a5e93
Binary files /dev/null and b/desktop/src/main/resources/native/linux/liblwjgl.so differ
diff --git a/desktop/src/main/resources/native/linux/liblwjgl64.so b/desktop/src/main/resources/native/linux/liblwjgl64.so
new file mode 100644 (file)
index 0000000..e3189e2
Binary files /dev/null and b/desktop/src/main/resources/native/linux/liblwjgl64.so differ
diff --git a/desktop/src/main/resources/native/linux/libopenal.so b/desktop/src/main/resources/native/linux/libopenal.so
new file mode 100644 (file)
index 0000000..0a3a619
Binary files /dev/null and b/desktop/src/main/resources/native/linux/libopenal.so differ
diff --git a/desktop/src/main/resources/native/linux/libopenal64.so b/desktop/src/main/resources/native/linux/libopenal64.so
new file mode 100644 (file)
index 0000000..e0693c0
Binary files /dev/null and b/desktop/src/main/resources/native/linux/libopenal64.so differ
diff --git a/desktop/src/main/resources/native/macosx/libbulletjme.jnilib b/desktop/src/main/resources/native/macosx/libbulletjme.jnilib
new file mode 100644 (file)
index 0000000..6f270e8
Binary files /dev/null and b/desktop/src/main/resources/native/macosx/libbulletjme.jnilib differ
diff --git a/desktop/src/main/resources/native/macosx/libjinput-osx.jnilib b/desktop/src/main/resources/native/macosx/libjinput-osx.jnilib
new file mode 100644 (file)
index 0000000..59a3eab
Binary files /dev/null and b/desktop/src/main/resources/native/macosx/libjinput-osx.jnilib differ
diff --git a/desktop/src/main/resources/native/macosx/liblwjgl.jnilib b/desktop/src/main/resources/native/macosx/liblwjgl.jnilib
new file mode 100644 (file)
index 0000000..6745b83
Binary files /dev/null and b/desktop/src/main/resources/native/macosx/liblwjgl.jnilib differ
diff --git a/desktop/src/main/resources/native/macosx/libopenal.dylib b/desktop/src/main/resources/native/macosx/libopenal.dylib
new file mode 100644 (file)
index 0000000..3c6d0f7
Binary files /dev/null and b/desktop/src/main/resources/native/macosx/libopenal.dylib differ
diff --git a/desktop/src/main/resources/native/macosx/openal.dylib b/desktop/src/main/resources/native/macosx/openal.dylib
new file mode 100644 (file)
index 0000000..cb8e458
Binary files /dev/null and b/desktop/src/main/resources/native/macosx/openal.dylib differ
diff --git a/desktop/src/main/resources/native/solaris/libbulletjme.so b/desktop/src/main/resources/native/solaris/libbulletjme.so
new file mode 100644 (file)
index 0000000..1b586ad
Binary files /dev/null and b/desktop/src/main/resources/native/solaris/libbulletjme.so differ
diff --git a/desktop/src/main/resources/native/solaris/libbulletjme64.so b/desktop/src/main/resources/native/solaris/libbulletjme64.so
new file mode 100644 (file)
index 0000000..b111ed6
Binary files /dev/null and b/desktop/src/main/resources/native/solaris/libbulletjme64.so differ
diff --git a/desktop/src/main/resources/native/solaris/liblwjgl.so b/desktop/src/main/resources/native/solaris/liblwjgl.so
new file mode 100644 (file)
index 0000000..0521801
Binary files /dev/null and b/desktop/src/main/resources/native/solaris/liblwjgl.so differ
diff --git a/desktop/src/main/resources/native/solaris/liblwjgl64.so b/desktop/src/main/resources/native/solaris/liblwjgl64.so
new file mode 100644 (file)
index 0000000..18ba304
Binary files /dev/null and b/desktop/src/main/resources/native/solaris/liblwjgl64.so differ
diff --git a/desktop/src/main/resources/native/solaris/libopenal.so b/desktop/src/main/resources/native/solaris/libopenal.so
new file mode 100644 (file)
index 0000000..be5dbce
Binary files /dev/null and b/desktop/src/main/resources/native/solaris/libopenal.so differ
diff --git a/desktop/src/main/resources/native/solaris/libopenal64.so b/desktop/src/main/resources/native/solaris/libopenal64.so
new file mode 100644 (file)
index 0000000..3ef75b5
Binary files /dev/null and b/desktop/src/main/resources/native/solaris/libopenal64.so differ
diff --git a/desktop/src/main/resources/native/windows/OpenAL32.dll b/desktop/src/main/resources/native/windows/OpenAL32.dll
new file mode 100644 (file)
index 0000000..1f69e94
Binary files /dev/null and b/desktop/src/main/resources/native/windows/OpenAL32.dll differ
diff --git a/desktop/src/main/resources/native/windows/OpenAL64.dll b/desktop/src/main/resources/native/windows/OpenAL64.dll
new file mode 100644 (file)
index 0000000..6f2a2fe
Binary files /dev/null and b/desktop/src/main/resources/native/windows/OpenAL64.dll differ
diff --git a/desktop/src/main/resources/native/windows/bulletjme.dll b/desktop/src/main/resources/native/windows/bulletjme.dll
new file mode 100644 (file)
index 0000000..e14f709
Binary files /dev/null and b/desktop/src/main/resources/native/windows/bulletjme.dll differ
diff --git a/desktop/src/main/resources/native/windows/bulletjme.lib b/desktop/src/main/resources/native/windows/bulletjme.lib
new file mode 100644 (file)
index 0000000..7b80f08
Binary files /dev/null and b/desktop/src/main/resources/native/windows/bulletjme.lib differ
diff --git a/desktop/src/main/resources/native/windows/bulletjme64.dll b/desktop/src/main/resources/native/windows/bulletjme64.dll
new file mode 100644 (file)
index 0000000..ed44912
Binary files /dev/null and b/desktop/src/main/resources/native/windows/bulletjme64.dll differ
diff --git a/desktop/src/main/resources/native/windows/bulletjme64.lib b/desktop/src/main/resources/native/windows/bulletjme64.lib
new file mode 100644 (file)
index 0000000..e8c494a
Binary files /dev/null and b/desktop/src/main/resources/native/windows/bulletjme64.lib differ
diff --git a/desktop/src/main/resources/native/windows/jinput-dx8.dll b/desktop/src/main/resources/native/windows/jinput-dx8.dll
new file mode 100644 (file)
index 0000000..6d27ad5
Binary files /dev/null and b/desktop/src/main/resources/native/windows/jinput-dx8.dll differ
diff --git a/desktop/src/main/resources/native/windows/jinput-dx8_64.dll b/desktop/src/main/resources/native/windows/jinput-dx8_64.dll
new file mode 100644 (file)
index 0000000..6730589
Binary files /dev/null and b/desktop/src/main/resources/native/windows/jinput-dx8_64.dll differ
diff --git a/desktop/src/main/resources/native/windows/jinput-raw.dll b/desktop/src/main/resources/native/windows/jinput-raw.dll
new file mode 100644 (file)
index 0000000..ce1d162
Binary files /dev/null and b/desktop/src/main/resources/native/windows/jinput-raw.dll differ
diff --git a/desktop/src/main/resources/native/windows/jinput-raw_64.dll b/desktop/src/main/resources/native/windows/jinput-raw_64.dll
new file mode 100644 (file)
index 0000000..3d2b3ad
Binary files /dev/null and b/desktop/src/main/resources/native/windows/jinput-raw_64.dll differ
diff --git a/desktop/src/main/resources/native/windows/lwjgl.dll b/desktop/src/main/resources/native/windows/lwjgl.dll
new file mode 100644 (file)
index 0000000..b20daef
Binary files /dev/null and b/desktop/src/main/resources/native/windows/lwjgl.dll differ
diff --git a/desktop/src/main/resources/native/windows/lwjgl64.dll b/desktop/src/main/resources/native/windows/lwjgl64.dll
new file mode 100644 (file)
index 0000000..a6025c6
Binary files /dev/null and b/desktop/src/main/resources/native/windows/lwjgl64.dll differ
diff --git a/engine/build.sbt b/engine/build.sbt
new file mode 100644 (file)
index 0000000..b25ff60
--- /dev/null
@@ -0,0 +1,47 @@
+import sbt.Keys._
+
+Common.settings
+
+name := "mms-engine"
+
+unmanagedSourceDirectories in Compile := Seq(
+//  baseDirectory.value / "src/blender"
+    baseDirectory.value / "src/bullet"
+  , baseDirectory.value / "src/core"
+  , baseDirectory.value / "src/core-data"
+  , baseDirectory.value / "src/core-effects"
+  , baseDirectory.value / "src/core-plugins"
+  , baseDirectory.value / "src/desktop"
+  , baseDirectory.value / "src/desktop-fx"
+  , baseDirectory.value / "src/games"
+//  , baseDirectory.value / "src/jheora"
+//  , baseDirectory.value / "src/lwjgl-oal"
+//  , baseDirectory.value / "src/lwjgl-ogl"
+  , baseDirectory.value / "src/mmd"
+  , baseDirectory.value / "src/networking"
+//  , baseDirectory.value / "src/niftygui"
+  , baseDirectory.value / "src/ogre"
+  , baseDirectory.value / "src/pack"
+  , baseDirectory.value / "src/tools"
+  , baseDirectory.value / "src/terrain"
+  , baseDirectory.value / "src/xml"
+)
+
+sources in Compile ~= {
+  dirs => dirs filter(file => (!file.getAbsolutePath.contains("cinematic")))
+}
+
+unmanagedResourceDirectories in Compile <<= unmanagedSourceDirectories in Compile
+
+unmanagedResources in Compile ~= {
+  dirs => dirs filter(file => (!file.getAbsolutePath.endsWith(".java") && !file.getAbsolutePath.endsWith(".scala")))
+}
+
+//unmanagedBase := baseDirectory.value / "lib2"
+
+libraryDependencies += "java3d" % "vecmath" % "1.3.1"
+
+libraryDependencies += "xpp3" % "xpp3" % "1.1.4c"
+
+libraryDependencies += "com.jme3" % "noise" % "3.0.0-SNAPSHOT"
+
diff --git a/engine/lib/MMDLoaderJME3-javadoc.jar b/engine/lib/MMDLoaderJME3-javadoc.jar
deleted file mode 100644 (file)
index 9162f81..0000000
Binary files a/engine/lib/MMDLoaderJME3-javadoc.jar and /dev/null differ
diff --git a/engine/lib/MMDLoaderJME3-lib.jar b/engine/lib/MMDLoaderJME3-lib.jar
deleted file mode 100644 (file)
index 6c9fa25..0000000
Binary files a/engine/lib/MMDLoaderJME3-lib.jar and /dev/null differ
diff --git a/engine/lib/MMDLoaderJME3-source.jar b/engine/lib/MMDLoaderJME3-source.jar
deleted file mode 100644 (file)
index d9bfa2e..0000000
Binary files a/engine/lib/MMDLoaderJME3-source.jar and /dev/null differ
index b39fa3a..9503f45 100644 (file)
@@ -48,7 +48,6 @@ import com.jme3.input.InputManager;
 import com.jme3.renderer.RenderManager;\r
 import com.jme3.renderer.ViewPort;\r
 import com.jme3.system.AppSettings;\r
-import com.jme3.system.JmeCanvasContext;\r
 import com.jme3.system.JmeContext;\r
 import java.net.MalformedURLException;\r
 import java.net.URL;\r
index c759c66..8659069 100644 (file)
  */
 package com.jme3.system;
 
-import com.jme3.app.SettingsDialog;
-import com.jme3.app.SettingsDialog.SelectionListener;
 import com.jme3.asset.AssetManager;
-import com.jme3.asset.AssetNotFoundException;
-import com.jme3.asset.DesktopAssetManager;
 import com.jme3.audio.AudioRenderer;
-import java.io.IOException;
+
 import java.io.InputStream;
 import java.net.URL;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.logging.Level;
 import java.util.logging.Logger;
-import javax.swing.SwingUtilities;
 
 public class JmeSystem {
 
     private static final Logger logger = Logger.getLogger(JmeSystem.class.getName());
     private static boolean initialized = false;
-    private static boolean lowPermissions = false;
+
+    private static JmeSystemDelegate delegate;
+
+    static {
+        try {
+            delegate = (JmeSystemDelegate) Class.forName("com.jme3.system.JmeSystemDelegateImpl").newInstance();
+        } catch (Exception ex) {
+            throw new RuntimeException("initialize failed.", ex);
+        }
+    }
 
     public static boolean trackDirectMemory() {
         return false;
     }
 
+    public static JmeSystemDelegate getDelegate() {
+        return delegate;
+    }
+
+    public static void setDelegate(JmeSystemDelegate delegate) {
+        JmeSystem.delegate = delegate;
+    }
+
     public static void setLowPermissions(boolean lowPerm) {
-        lowPermissions = lowPerm;
+        delegate.setLowPermissions(lowPerm);
     }
 
     public static boolean isLowPermissions() {
-        return lowPermissions;
+        return delegate.isLowPermissions();
     }
 
     public static AssetManager newAssetManager(URL configFile) {
-        return new DesktopAssetManager(configFile);
+        return delegate.newAssetManager(configFile);
     }
 
     public static AssetManager newAssetManager() {
-        return new DesktopAssetManager(null);
+        return delegate.newAssetManager(null);
     }
 
     public static boolean showSettingsDialog(AppSettings sourceSettings, final boolean loadFromRegistry) {
-        if (SwingUtilities.isEventDispatchThread()) {
-            throw new IllegalStateException("Cannot run from EDT");
-        }
-
-
-        final AppSettings settings = new AppSettings(false);
-        settings.copyFrom(sourceSettings);
-        String iconPath = sourceSettings.getSettingsDialogImage();
-        final URL iconUrl = JmeSystem.class.getResource(iconPath.startsWith("/") ? iconPath : "/" + iconPath);
-        if (iconUrl == null) {
-            throw new AssetNotFoundException(sourceSettings.getSettingsDialogImage());
-        }
-
-        final AtomicBoolean done = new AtomicBoolean();
-        final AtomicInteger result = new AtomicInteger();
-        final Object lock = new Object();
-
-        final SelectionListener selectionListener = new SelectionListener() {
-
-            public void onSelection(int selection) {
-                synchronized (lock) {
-                    done.set(true);
-                    result.set(selection);
-                    lock.notifyAll();
-                }
-            }
-        };
-        SwingUtilities.invokeLater(new Runnable() {
-
-            public void run() {
-                synchronized (lock) {
-                    SettingsDialog dialog = new SettingsDialog(settings, iconUrl, loadFromRegistry);
-                    dialog.setSelectionListener(selectionListener);
-                    dialog.showDialog();
-                }
-            }
-        });
-
-        synchronized (lock) {
-            while (!done.get()) {
-                try {
-                    lock.wait();
-                } catch (InterruptedException ex) {
-                }
-            }
-        }
-
-        sourceSettings.copyFrom(settings);
-
-        return result.get() == SettingsDialog.APPROVE_SELECTION;
-    }
-
-    private static boolean is64Bit(String arch) {
-        if (arch.equals("x86")) {
-            return false;
-        } else if (arch.equals("amd64")) {
-            return true;
-        } else if (arch.equals("x86_64")) {
-            return true;
-        } else if (arch.equals("ppc") || arch.equals("PowerPC")) {
-            return false;
-        } else if (arch.equals("ppc64")) {
-            return true;
-        } else if (arch.equals("i386") || arch.equals("i686")) {
-            return false;
-        } else if (arch.equals("universal")) {
-            return false;
-        } else {
-            throw new UnsupportedOperationException("Unsupported architecture: " + arch);
-        }
+        return delegate.showSettingsDialog(sourceSettings, loadFromRegistry);
     }
 
     public static Platform getPlatform() {
-        String os = System.getProperty("os.name").toLowerCase();
-        String arch = System.getProperty("os.arch").toLowerCase();
-        logger.log(Level.INFO,"os = "+os+" arch = "+arch);
-        boolean is64 = is64Bit(arch);
-        if (os.contains("windows")) {
-            return is64 ? Platform.Windows64 : Platform.Windows32;
-        } else if (os.contains("linux") || os.contains("freebsd")) {
-            return is64 ? Platform.Linux64 : Platform.Linux32;
-        } else if (os.contains("mac os x") || os.contains("darwin")) {
-            if (arch.startsWith("ppc")) {
-                return is64 ? Platform.MacOSX_PPC64 : Platform.MacOSX_PPC32;
-            } else {
-                return is64 ? Platform.MacOSX64 : Platform.MacOSX32;
-            }
-        } else if (os.contains("sunos")) {
-            return is64 ? Platform.SolarisAMD64 : Platform.SolarisX86;
-        } else {
-            throw new UnsupportedOperationException("The specified platform: " + os + " is not supported.");
-        }
-    }
-
-    private static JmeContext newContextLwjgl(AppSettings settings, JmeContext.Type type) {
-        try {
-            Class<? extends JmeContext> ctxClazz = null;
-            switch (type) {
-                case Canvas:
-                    ctxClazz = (Class<? extends JmeContext>) Class.forName("com.jme3.system.lwjgl.LwjglCanvas");
-                    break;
-                case Display:
-                    ctxClazz = (Class<? extends JmeContext>) Class.forName("com.jme3.system.lwjgl.LwjglDisplay");
-                    break;
-                case OffscreenSurface:
-                    ctxClazz = (Class<? extends JmeContext>) Class.forName("com.jme3.system.lwjgl.LwjglOffscreenBuffer");
-                    break;
-                default:
-                    throw new IllegalArgumentException("Unsupported context type " + type);
-            }
-
-            return ctxClazz.newInstance();
-        } catch (InstantiationException ex) {
-            logger.log(Level.SEVERE, "Failed to create context", ex);
-        } catch (IllegalAccessException ex) {
-            logger.log(Level.SEVERE, "Failed to create context", ex);
-        } catch (ClassNotFoundException ex) {
-            logger.log(Level.SEVERE, "CRITICAL ERROR: Context class is missing!\n"
-                    + "Make sure jme3_lwjgl-ogl is on the classpath.", ex);
-        }
-
-        return null;
-    }
-
-    private static JmeContext newContextJogl(AppSettings settings, JmeContext.Type type) {
-        try {
-            Class<? extends JmeContext> ctxClazz = null;
-            switch (type) {
-                case Display:
-                    ctxClazz = (Class<? extends JmeContext>) Class.forName("com.jme3.system.jogl.JoglDisplay");
-                    break;
-                case Canvas:
-                    ctxClazz = (Class<? extends JmeContext>) Class.forName("com.jme3.system.jogl.JoglCanvas");
-                    break;
-                default:
-                    throw new IllegalArgumentException("Unsupported context type " + type);
-            }
-
-            return ctxClazz.newInstance();
-        } catch (InstantiationException ex) {
-            logger.log(Level.SEVERE, "Failed to create context", ex);
-        } catch (IllegalAccessException ex) {
-            logger.log(Level.SEVERE, "Failed to create context", ex);
-        } catch (ClassNotFoundException ex) {
-            logger.log(Level.SEVERE, "CRITICAL ERROR: Context class is missing!\n"
-                    + "Make sure jme3_jogl is on the classpath.", ex);
-        }
-
-        return null;
-    }
-
-    private static JmeContext newContextCustom(AppSettings settings, JmeContext.Type type) {
-        try {
-            String className = settings.getRenderer().substring("CUSTOM".length());
-
-            Class<? extends JmeContext> ctxClazz = null;
-            ctxClazz = (Class<? extends JmeContext>) Class.forName(className);
-            return ctxClazz.newInstance();
-        } catch (InstantiationException ex) {
-            logger.log(Level.SEVERE, "Failed to create context", ex);
-        } catch (IllegalAccessException ex) {
-            logger.log(Level.SEVERE, "Failed to create context", ex);
-        } catch (ClassNotFoundException ex) {
-            logger.log(Level.SEVERE, "CRITICAL ERROR: Context class is missing!", ex);
-        }
-
-        return null;
+        return delegate.getPlatform();
     }
 
     public static JmeContext newContext(AppSettings settings, JmeContext.Type contextType) {
-        initialize(settings);
-        JmeContext ctx;
-        if (settings.getRenderer() == null
-                || settings.getRenderer().equals("NULL")
-                || contextType == JmeContext.Type.Headless) {
-            ctx = new NullContext();
-            ctx.setSettings(settings);
-        } else if (settings.getRenderer().startsWith("LWJGL")) {
-            ctx = newContextLwjgl(settings, contextType);
-            ctx.setSettings(settings);
-        } else if (settings.getRenderer().startsWith("JOGL")) {
-            ctx = newContextJogl(settings, contextType);
-            ctx.setSettings(settings);
-        } else if (settings.getRenderer().startsWith("CUSTOM")) {
-            ctx = newContextCustom(settings, contextType);
-            ctx.setSettings(settings);
-        } else {
-            throw new UnsupportedOperationException(
-                    "Unrecognizable renderer specified: "
-                    + settings.getRenderer());
-        }
-        return ctx;
+        return delegate.newContext(settings, contextType);
     }
 
     public static AudioRenderer newAudioRenderer(AppSettings settings) {
-        initialize(settings);
-        Class<? extends AudioRenderer> clazz = null;
-        try {
-            if (settings.getAudioRenderer().startsWith("LWJGL")) {
-                clazz = (Class<? extends AudioRenderer>) Class.forName("com.jme3.audio.lwjgl.LwjglAudioRenderer");
-            } else if (settings.getAudioRenderer().startsWith("JOAL")) {
-                clazz = (Class<? extends AudioRenderer>) Class.forName("com.jme3.audio.joal.JoalAudioRenderer");
-            } else {
-                throw new UnsupportedOperationException(
-                        "Unrecognizable audio renderer specified: "
-                        + settings.getAudioRenderer());
-            }
-
-            AudioRenderer ar = clazz.newInstance();
-            return ar;
-        } catch (InstantiationException ex) {
-            logger.log(Level.SEVERE, "Failed to create context", ex);
-        } catch (IllegalAccessException ex) {
-            logger.log(Level.SEVERE, "Failed to create context", ex);
-        } catch (ClassNotFoundException ex) {
-            logger.log(Level.SEVERE, "CRITICAL ERROR: Audio implementation class is missing!\n"
-                    + "Make sure jme3_lwjgl-oal or jm3_joal is on the classpath.", ex);
-        }
-        return null;
+        return delegate.newAudioRenderer(settings);
     }
 
     public static void initialize(AppSettings settings) {
-        if (initialized) {
-            return;
-        }
-
+        delegate.initialize(settings);
         initialized = true;
-        try {
-            if (!lowPermissions) {
-                // can only modify logging settings
-                // if permissions are available
-//                JmeFormatter formatter = new JmeFormatter();
-//                Handler fileHandler = new FileHandler("jme.log");
-//                fileHandler.setFormatter(formatter);
-//                Logger.getLogger("").addHandler(fileHandler);
-//                Handler consoleHandler = new ConsoleHandler();
-//                consoleHandler.setFormatter(formatter);
-//                Logger.getLogger("").removeHandler(Logger.getLogger("").getHandlers()[0]);
-//                Logger.getLogger("").addHandler(consoleHandler);
-            }
-//        } catch (IOException ex){
-//            logger.log(Level.SEVERE, "I/O Error while creating log file", ex);
-        } catch (SecurityException ex) {
-            logger.log(Level.SEVERE, "Security error in creating log file", ex);
-        }
-        logger.log(Level.INFO, "Running on {0} chototsu", getFullName());
-
-
-        if (!lowPermissions) {
-            try {
-                Natives.extractNativeLibs(getPlatform(), settings);
-            } catch (IOException ex) {
-                logger.log(Level.SEVERE, "Error while copying native libraries", ex);
-            }
-        }
     }
 
     public static String getFullName() {
-        return "jMonkeyEngine 3.0.0 Beta";
+        return delegate.getFullName();
     }
 
     public static InputStream getResourceAsStream(String name) {
-        return JmeSystem.class.getResourceAsStream(name);
+        return delegate.getResourceAsStream(name);
     }
 
     public static URL getResource(String name) {
-        return JmeSystem.class.getResource(name);
+        return delegate.getResource(name);
     }
 }
diff --git a/engine/src/desktop/com/jme3/system/JmeSystemDelegate.java b/engine/src/desktop/com/jme3/system/JmeSystemDelegate.java
new file mode 100644 (file)
index 0000000..dd41458
--- /dev/null
@@ -0,0 +1,36 @@
+package com.jme3.system;
+
+import com.jme3.asset.AssetManager;
+import com.jme3.audio.AudioRenderer;
+
+import java.io.InputStream;
+import java.net.URL;
+
+/**
+ * Created by kobayasi on 2014/02/17.
+ */
+public interface JmeSystemDelegate {
+    public void setLowPermissions(boolean lowPerm);
+
+    public boolean isLowPermissions();
+
+    public AssetManager newAssetManager(URL configFile);
+
+    public AssetManager newAssetManager();
+
+    public boolean showSettingsDialog(AppSettings sourceSettings, final boolean loadFromRegistry);
+
+    public Platform getPlatform();
+
+    public JmeContext newContext(AppSettings settings, JmeContext.Type contextType);
+
+    public AudioRenderer newAudioRenderer(AppSettings settings);
+
+    public void initialize(AppSettings settings);
+
+    public String getFullName();
+
+    public InputStream getResourceAsStream(String name);
+
+    public URL getResource(String name);
+}
\ No newline at end of file
diff --git a/niftygui/build.sbt b/niftygui/build.sbt
new file mode 100644 (file)
index 0000000..e60d73f
--- /dev/null
@@ -0,0 +1,19 @@
+import sbt.Keys._
+
+Common.settings
+
+name := "mms-niftygui-support"
+
+unmanagedSourceDirectories in Compile := Seq(
+  baseDirectory.value / "../engine/src/niftygui"
+  , baseDirectory.value / "../engine/src/core/com/jme3/cinematic"
+)
+
+libraryDependencies += "lessvoid" % "nifty" % "1.3.3"
+
+
+//sources in Compile ~= {
+//  dirs => dirs filter(_.getAbsolutePath.contains("cinematic"))
+//}
+
+//unmanagedBase := baseDirectory.value / "lib2"
diff --git a/project/Common.scala b/project/Common.scala
new file mode 100644 (file)
index 0000000..2101187
--- /dev/null
@@ -0,0 +1,16 @@
+import sbt._
+import sbt.Keys._
+
+object Common {
+  lazy val settings = Seq(
+    organization := "info.projectkyoto"
+    , version := "1.0.0-SNAPSHOT"
+    , autoScalaLibrary := false
+    , crossPaths := false
+    , javacOptions ++= Seq("-encoding", "UTF-8", "-source", "1.6", "-target", "1.6")
+    , javacOptions in doc := Seq("-locale", "en_US", "-encoding", "UTF-8", "-source", "1.6")
+    , resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots"
+    , resolvers += "nifty-maven-repo.sourceforge.net" at "http://nifty-gui.sourceforge.net/nifty-maven-repo"
+  )
+}
+
diff --git a/project/build.properties b/project/build.properties
new file mode 100644 (file)
index 0000000..1bb3aa3
--- /dev/null
@@ -0,0 +1,2 @@
+sbt.version=0.13.1
+
diff --git a/project/plugins.sbt b/project/plugins.sbt
new file mode 100644 (file)
index 0000000..24369e6
--- /dev/null
@@ -0,0 +1,2 @@
+addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")
+