def launchHexEditor(): pluginsManager = PluginsLocator.getManager() appfolder = pluginsManager.getApplicationFolder().getAbsolutePath() java = os.path.join(System.getProperties().getProperty("java.home"), "bin", "java") installDir = getResource(__file__, "app").replace("\\", "/") profileDir = getDataFolder().replace("\\", "/") cmd = [ java, "-Duser.home=" + profileDir, "-jar", installDir + "/hexeditor-1.0.jar" ] #print cmd subprocess.call(cmd)
def getRExecPathname(self): if self.getArchitecture() != "x86_64": raise Exception("Architecture not supported.") plugin = PluginsLocator.getManager().getPlugin( "org.gvsig.r.app.mainplugin") pluginFolder = plugin.getPluginDirectory() if self.getOperatingSystem() == "win": f = File(pluginFolder, "R/bin/x64/Rterm.exe") return f.getAbsolutePath().replace("\\", "/") if self.getOperatingSystem() == "lin": f = File(pluginFolder, "R/bin/R") return f.getAbsolutePath() raise Exception("Operating system not supported.")
def launchJEdit(): pluginsManager = PluginsLocator.getManager() appfolder = pluginsManager.getApplicationFolder().getAbsolutePath() java = os.path.join( System.getProperties().getProperty("java.home"), "bin", "java") jeditInstallDir = getResource(__file__, "app").replace("\\","/") jeditProfileDir = getDataFolder().replace("\\","/") CP = "" #jeditInstallDir+"/jedit.jar" for fname in os.listdir(jeditInstallDir+"/jars"): CP += ":"+jeditInstallDir+"/lib/"+fname cmd = [ java, "-cp",CP, "-splash:"+getResource(__file__, "images","jedit-splash"), "-Duser.home="+jeditProfileDir, "-jar", jeditInstallDir+"/jedit.jar", "-settings="+jeditProfileDir, ] #print cmd subprocess.call(cmd)
def addDependencyWithPlugin(pluginCode): pluginsManager = PluginsLocator.getManager() scriptingPlugin = pluginsManager.getPlugin("org.gvsig.scripting.app.extension") scriptingPlugin.addDependencyWithPlugin(pluginsManager.getPlugin(pluginCode))
def addDependencyWithPlugin(pluginCode): pluginsManager = PluginsLocator.getManager() scriptingPlugin = pluginsManager.getPlugin( "org.gvsig.scripting.app.extension") scriptingPlugin.addDependencyWithPlugin( pluginsManager.getPlugin(pluginCode))
def getRExecPathname(): manager = PluginsLocator.getManager() plugin = manager.getPlugin("org.gvsig.r.app.mainplugin") return File(plugin.getPluginDirectory(), "R/bin/x64/R.exe")
def getPluginFolder(): pluginsManager = PluginsLocator.getManager() plugin = pluginsManager.getPlugin("org.gvsig.r.app.mainplugin") f = plugin.getPluginDirectory() return f.getAbsolutePath()