diff --git a/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderTool.java b/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderTool.java index 0d479ebc1..0211cae7a 100644 --- a/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderTool.java +++ b/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderTool.java @@ -128,6 +128,7 @@ import org.openide.NotifyDescriptor; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.modules.InstalledFileLocator; +import org.openide.modules.Places; import org.openide.util.Exceptions; import org.openide.util.Utilities; import org.openide.windows.WindowManager; @@ -165,7 +166,7 @@ public class BlenderTool { } private static boolean checkBlenderFolders() { - String jmpDir = System.getProperty("netbeans.user"); + String jmpDir = Places.getUserDirectory().getAbsolutePath(); FileObject fileObject = FileUtil.toFileObject(new File(jmpDir)); if (fileObject != null) { FileObject configFileObject = fileObject.getFileObject(configFolderName); @@ -215,7 +216,7 @@ public class BlenderTool { } private static String getConfigEnv() { - String ret = System.getProperty("netbeans.user") + "/" + configFolderName; + String ret = Places.getUserDirectory().getAbsolutePath() + "/" + configFolderName; ret = ret.replace("/", File.separator); return ret; } @@ -229,13 +230,13 @@ public class BlenderTool { } private static String getUserScriptsEnv() { - String ret = System.getProperty("netbeans.user") + "/" + userScriptsFolderName; + String ret = Places.getUserDirectory().getAbsolutePath() + "/" + userScriptsFolderName; ret = ret.replace("/", File.separator); return ret; } private static String getScriptPath(String scriptName, String prefix) { - String ret = System.getProperty("netbeans.user") + "/" + jmeScriptsFolderName + "/" + prefix + "_" + scriptName + ".py"; + String ret = Places.getUserDirectory().getAbsolutePath() + "/" + jmeScriptsFolderName + "/" + prefix + "_" + scriptName + ".py"; ret = ret.replace("/", File.separator); return ret; } diff --git a/sdk/jme3-core/src/com/jme3/gde/core/Installer.java b/sdk/jme3-core/src/com/jme3/gde/core/Installer.java index 7c1c8ea66..fd42ef3ce 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/Installer.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/Installer.java @@ -38,6 +38,7 @@ import java.util.logging.Logger; import javax.swing.JPopupMenu; import org.openide.filesystems.FileChooserBuilder; import org.openide.modules.ModuleInstall; +import org.openide.modules.Places; import org.openide.util.NbBundle; import org.openide.util.NbPreferences; @@ -91,7 +92,7 @@ public class Installer extends ModuleInstall { System.setProperty("netbeans.projects.dir", projectDir); //set extraction dir for platform natives - String jmpDir = System.getProperty("netbeans.user"); + String jmpDir = Places.getUserDirectory().getAbsolutePath(); File file = new File(jmpDir); if (!file.exists()) { logger.log(Level.INFO, "Create settings dir {0}", projectDir); diff --git a/sdk/jme3-core/src/com/jme3/gde/core/util/ZipExtensionTool.java b/sdk/jme3-core/src/com/jme3/gde/core/util/ZipExtensionTool.java index 310a9b714..39e075787 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/util/ZipExtensionTool.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/util/ZipExtensionTool.java @@ -52,6 +52,8 @@ import org.netbeans.api.progress.ProgressHandle; import org.netbeans.api.progress.ProgressHandleFactory; import org.openide.DialogDisplayer; import org.openide.NotifyDescriptor; +import org.openide.modules.InstalledFileLocator; +import org.openide.modules.Places; import org.openide.util.Exceptions; import org.openide.util.Utilities; @@ -69,7 +71,7 @@ public class ZipExtensionTool { private static final Logger logger = Logger.getLogger(ZipExtensionTool.class.getName()); static final ConcurrentHashMap installMap = new ConcurrentHashMap(); static final int BUFFER = 2048; - private final String settingsFolder = System.getProperty("netbeans.user"); + private final String settingsFolder = Places.getUserDirectory().getAbsolutePath(); public String SUFFIX_WIN = "windows"; public String SUFFIX_LINUX = "linux"; public String SUFFIX_OSX = "mac"; diff --git a/sdk/jme3-ogretools/nbproject/genfiles.properties b/sdk/jme3-ogretools/nbproject/genfiles.properties index 7894c99f3..14ad59acf 100644 --- a/sdk/jme3-ogretools/nbproject/genfiles.properties +++ b/sdk/jme3-ogretools/nbproject/genfiles.properties @@ -3,6 +3,6 @@ build.xml.script.CRC32=6423eb2c build.xml.stylesheet.CRC32=79c3b980@1.31.2.7 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=356157ce +nbproject/build-impl.xml.data.CRC32=2f86c6ee nbproject/build-impl.xml.script.CRC32=4a050ba2 nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1 diff --git a/sdk/jme3-ogretools/nbproject/project.xml b/sdk/jme3-ogretools/nbproject/project.xml index 4e009485d..3e653173e 100644 --- a/sdk/jme3-ogretools/nbproject/project.xml +++ b/sdk/jme3-ogretools/nbproject/project.xml @@ -81,6 +81,14 @@ 7.57.2 + + org.openide.modules + + + + 7.43.1 + + org.openide.nodes diff --git a/sdk/jme3-ogretools/src/com/jme3/gde/ogretools/convert/OgreXMLConvert.java b/sdk/jme3-ogretools/src/com/jme3/gde/ogretools/convert/OgreXMLConvert.java index 58e7f2033..cbc632ca9 100644 --- a/sdk/jme3-ogretools/src/com/jme3/gde/ogretools/convert/OgreXMLConvert.java +++ b/sdk/jme3-ogretools/src/com/jme3/gde/ogretools/convert/OgreXMLConvert.java @@ -16,6 +16,7 @@ import org.netbeans.api.progress.ProgressHandle; import org.openide.DialogDisplayer; import org.openide.NotifyDescriptor; import org.openide.NotifyDescriptor.Confirmation; +import org.openide.modules.Places; import org.openide.util.Exceptions; import org.openide.util.Utilities; @@ -26,9 +27,9 @@ import org.openide.util.Utilities; public class OgreXMLConvert { static final int BUFFER = 2048; - public static String osx_path = System.getProperty("netbeans.user") + "/ogretools/"; - public static String windows_path = System.getProperty("netbeans.user") + "\\ogretools\\"; - public static String linux_path = System.getProperty("netbeans.user") + "/.ogretools/"; + public static String osx_path = Places.getUserDirectory().getAbsolutePath() + "/ogretools/"; + public static String windows_path = Places.getUserDirectory().getAbsolutePath() + "\\ogretools\\"; + public static String linux_path = Places.getUserDirectory().getAbsolutePath() + "/.ogretools/"; public boolean doConvert(OgreXMLConvertOptions options, ProgressHandle handle) { if (!checkTools()) {