Last change
on this file since a3a8ee1 was
a3a8ee1,
checked in by meeh <meeh@…>, 3 years ago
|
Major update for the OSX Launcher code. Now it will bundle
installer resources with the fat jar (we add an exclusion list later)
which the base directory will be built(or updated if lacking files) upon
startup of the I2P router. This is done by the OSXDeployment class which
is an extension for the DeployProfile? class written for Mac OS X.
Since the app bundle itself should be R/O, we use ~/Library/I2P as base path,
and continue using ~/Library/Application? Support/i2p as config path. The BB
code will have other paths.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | package net.i2p |
---|
2 | |
---|
3 | import net.i2p.router.Router |
---|
4 | import net.i2p.launchers.OSXDeployment |
---|
5 | import java.io.File |
---|
6 | |
---|
7 | /** |
---|
8 | * |
---|
9 | * For java developers: |
---|
10 | * A scala object is like an instance of a class. |
---|
11 | * If you define a method inside an object, it's equals to |
---|
12 | * java's static methods. |
---|
13 | * |
---|
14 | * Also, in scala, the body of a class/object is executed as it's |
---|
15 | * constructor. |
---|
16 | * |
---|
17 | * Also noteworthy; |
---|
18 | * val is immutable |
---|
19 | * var is mutable |
---|
20 | * |
---|
21 | * |
---|
22 | * The i2p base directory in the build should be in a relative path from |
---|
23 | * the launcher, which would be ../Resources/i2pbase - this directory would |
---|
24 | * need to be copied out to a "writable" area, since we're in a signed "immutable" |
---|
25 | * bundle. First this launcher will check if i2pbase is already deployed to a |
---|
26 | * writable area, if it's not, it deploys, if the i2pbase directory has an older |
---|
27 | * version than the one in the bundle, it upgrades. It does nothing if versions |
---|
28 | * matches. |
---|
29 | * |
---|
30 | * |
---|
31 | * @author Meeh |
---|
32 | * @version 0.0.1 |
---|
33 | * @since 0.9.35 |
---|
34 | */ |
---|
35 | object MacOSXRouterLauncherApp extends App { |
---|
36 | |
---|
37 | val i2pBaseBundleDir = new File(new File("."), "../Resources/i2pbase") |
---|
38 | |
---|
39 | new OSXDeployment() |
---|
40 | |
---|
41 | Router.main(args) |
---|
42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.