forked from I2P_Developers/i2p.i2p
Moved a function to a more logic place.
This commit is contained in:
@@ -18,6 +18,13 @@ import java.io.{File, InputStream}
|
||||
*/
|
||||
object DeployProfile {
|
||||
|
||||
|
||||
/**
|
||||
* This function will find the executing jar. "myself"
|
||||
* @return
|
||||
*/
|
||||
def executingJarFile = getClass().getProtectionDomain().getCodeSource().getLocation()
|
||||
|
||||
/**
|
||||
* This joins two paths in a cross platform way. Meaning it takes care of either we use
|
||||
* \\ or / as directory separator. It returns the resulting path in a string.
|
||||
|
||||
@@ -76,11 +76,6 @@ class OSXDeployment extends
|
||||
OSXDefaults.getOSXBaseDirectory.getAbsolutePath
|
||||
) {
|
||||
|
||||
/**
|
||||
* This function will find the executing jar. "myself"
|
||||
* @return
|
||||
*/
|
||||
def executingJarFile = getClass().getProtectionDomain().getCodeSource().getLocation()
|
||||
|
||||
|
||||
/**
|
||||
@@ -125,7 +120,7 @@ class OSXDeployment extends
|
||||
*/
|
||||
def copyDirFromRes(dir: File): Unit = {
|
||||
// A small hack
|
||||
val zipFile = new ZipFile(executingJarFile.getFile)
|
||||
val zipFile = new ZipFile(DeployProfile.executingJarFile.getFile)
|
||||
zipFile.entries().asScala.toList.filter(_.toString.startsWith(dir.getPath)).filter(!_.isDirectory).map { entry =>
|
||||
new File(DeployProfile.pathJoin(baseDir,entry.getName)).getParentFile.mkdirs()
|
||||
if (entry.isDirectory) {
|
||||
|
||||
Reference in New Issue
Block a user