Changeset 3488db38 for launchers


Ignore:
Timestamp:
May 1, 2018 3:40:07 AM (3 years ago)
Author:
meeh <meeh@…>
Branches:
master
Children:
345e741
Parents:
8957c85
Message:

Moved a function to a more logic place.

Location:
launchers/common/src/main/scala/net/i2p/launchers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • launchers/common/src/main/scala/net/i2p/launchers/DeployProfile.scala

    r8957c85 r3488db38  
    1818  */
    1919object DeployProfile {
     20
     21
     22  /**
     23    * This function will find the executing jar. "myself"
     24    * @return
     25    */
     26  def executingJarFile = getClass().getProtectionDomain().getCodeSource().getLocation()
    2027
    2128  /**
  • launchers/common/src/main/scala/net/i2p/launchers/OSXDeployment.scala

    r8957c85 r3488db38  
    7777  ) {
    7878
    79   /**
    80     * This function will find the executing jar. "myself"
    81     * @return
    82     */
    83   def executingJarFile = getClass().getProtectionDomain().getCodeSource().getLocation()
    8479
    8580
     
    126121  def copyDirFromRes(dir: File): Unit = {
    127122    // A small hack
    128     val zipFile = new ZipFile(executingJarFile.getFile)
     123    val zipFile = new ZipFile(DeployProfile.executingJarFile.getFile)
    129124    zipFile.entries().asScala.toList.filter(_.toString.startsWith(dir.getPath)).filter(!_.isDirectory).map { entry =>
    130125      new File(DeployProfile.pathJoin(baseDir,entry.getName)).getParentFile.mkdirs()
Note: See TracChangeset for help on using the changeset viewer.