/** * create a new PathEntry from the given absolute path name and add it to the * end of the current image path<br> * for usage with jars see; {@link #add(String, String)} * * @param mainPath relative or absolute path * @return true if successful otherwise false */ public static boolean add(String mainPath) { return add(mainPath, null); }
ImagePath.setBundlePath(fScript.getParent()); else { ImagePath.add(fScript.getParent());
/** * forwarded to ImagePath.add() * * @return null if not successful * @deprecated */ @Deprecated public static String addImagePath(String path) { if (!ImagePath.add(path)) { return null; } else { return path; } }
public static boolean addJar(String fpJar, String fpImage) { URL pathURL = null; if (".".equals(fpJar)) { fpJar = runTime.fSxBaseJar.getAbsolutePath(); if (!fpJar.endsWith(".jar")) { return false; } } if (new File(fpJar).exists()) { if (fpImage == null) { fpImage = ""; } pathURL = FileManager.makeURL(fpJar + "!/" + fpImage, "jar"); add(pathURL); } return true; }
public String loadModulePrepare(String modName, String modPath) { log(lvl + 1, "loadModulePrepare: %s in %s", modName, modPath); int nDot = modName.lastIndexOf("."); if (nDot > -1) { modName = modName.substring(nDot + 1); } addSysPath(modPath); if (modPath.endsWith(".sikuli")) { ImagePath.add(modPath); } return modName; }
ImagePath.add(asImagePath);
public static void main(String[] args) throws FindFailed { Run sgr = new Run(); sgr.scr = new Screen(); ImagePath.add("org.sikuli.script.RunTime/ImagesAPI.sikuli"); sgr.setUp(); sgr.testButton(); sgr.tearDown(); }