-
- Downloads
Big directory rework.
Eliminate all uses of the current working directory, and set up multiple directories specified by absolute paths for various uses. Add a WorkingDir class to create a user config directory and migrate files to it for new installs. The directory will be $HOME/.i2p on linux and %APPDIR%\I2P on Windows, or as specified in the system property -Di2p.dir.config=/path/to/i2pdir All files except for the base install and temp files will be in the config directory by default. Temp files will be in a i2p-xxxxx subdirectory of the system temp directory specified by the system property java.io.tmpdir. Convert all file opens in the code to be relative to a specific directory, as specified in the context. Code and applications should never open files relative to the current working directory (e.g. new File("foo")). All files should be accessed in the appropriate context directory, e.g. new File(_context.getAppDir(), "foo"). The router.config file location may be specified as a system property on the java command line with -Drouter.configLocation=/path/to/router.config All directories may be specified as properties in the router.config file. The migration will copy all files from an existing installation, except i2psnark/, with the system property -Di2p.dir.migrate=true. Otherwise it will just set up a new directory with a minimal configuration. The migration will also create a modified wrapper.config and (on linux only) a modified i2prouter script, and place them in the config directory. There are no changes to the installer or the default i2prouter, i2prouter.bat, i2prouter, wrapper.config, runplain.sh, windows service installer/uninstaller, etc. in this checkin. * Directories. These are all set at instantiation and will not be changed by * subsequent property changes. * All properties, if set, should be absolute paths. * * Name Property Method Files * ----- -------- ----- ----- * Base i2p.dir.base getBaseDir() lib/, webapps/, docs/, geoip/, licenses/, ... * Temp i2p.dir.temp getTempDir() Temporary files * Config i2p.dir.config getConfigDir() *.config, hosts.txt, addressbook/, ... * * (the following all default to the same as Config) * * Router i2p.dir.router getRouterDir() netDb/, peerProfiles/, router.*, keyBackup/, ... * Log i2p.dir.log getLogDir() wrapper.log*, logs/ * PID i2p.dir.pid getPIDDir() wrapper *.pid files, router.ping * App i2p.dir.app getAppDir() eepsite/, ... * * Note that we can't control where the wrapper actually puts its files. All these will be set appropriately in a Router Context. In an I2P App Context, all except Temp will be the current working directory. Lightly tested so far, needs much more testing.
Showing
- apps/BOB/src/net/i2p/BOB/BOB.java 16 additions, 7 deletionsapps/BOB/src/net/i2p/BOB/BOB.java
- apps/addressbook/java/src/addressbook/AddressBook.java 4 additions, 3 deletionsapps/addressbook/java/src/addressbook/AddressBook.java
- apps/addressbook/java/src/addressbook/Daemon.java 8 additions, 5 deletionsapps/addressbook/java/src/addressbook/Daemon.java
- apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java 1 addition, 1 deletionapps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java
- apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java 15 additions, 8 deletionsapps/i2psnark/java/src/org/klomp/snark/SnarkManager.java
- apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java 1 addition, 0 deletions...2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
- apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java 8 additions, 0 deletionsapps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java
- apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelConnectClient.java 7 additions, 4 deletions...el/java/src/net/i2p/i2ptunnel/I2PTunnelConnectClient.java
- apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java 11 additions, 7 deletions...unnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java
- apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java 2 additions, 0 deletions...2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java
- apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelControllerGroup.java 4 additions, 2 deletions...nel/java/src/net/i2p/i2ptunnel/TunnelControllerGroup.java
- apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java 1 addition, 1 deletion...ole/java/src/net/i2p/router/web/ConfigServiceHandler.java
- apps/routerconsole/java/src/net/i2p/router/web/ContentHelper.java 3 additions, 1 deletion...terconsole/java/src/net/i2p/router/web/ContentHelper.java
- apps/routerconsole/java/src/net/i2p/router/web/LogsHelper.java 37 additions, 33 deletions...routerconsole/java/src/net/i2p/router/web/LogsHelper.java
- apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java 19 additions, 20 deletions...outerconsole/java/src/net/i2p/router/web/NewsFetcher.java
- apps/routerconsole/java/src/net/i2p/router/web/ReseedHandler.java 1 addition, 1 deletion...terconsole/java/src/net/i2p/router/web/ReseedHandler.java
- apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java 13 additions, 7 deletions...sole/java/src/net/i2p/router/web/RouterConsoleRunner.java
- apps/routerconsole/java/src/net/i2p/router/web/UpdateHandler.java 7 additions, 4 deletions...terconsole/java/src/net/i2p/router/web/UpdateHandler.java
- apps/routerconsole/jsp/flags.jsp 4 additions, 1 deletionapps/routerconsole/jsp/flags.jsp
- apps/routerconsole/jsp/viewtheme.jsp 4 additions, 2 deletionsapps/routerconsole/jsp/viewtheme.jsp
Loading
Please register or sign in to comment