Portable Vuze

From VuzeWiki
Jump to: navigation, search

The standard Vuze installation process is aligned with the operating system's approach to maintaining applications. On Windows this means that the program binaries are installed in the 'Program Files' directory on the system drive, and per-user state (such as torrent files and downloaded data) stored in user-specific locations (somewhere in 'Documents and Settings' for each user).

While this works perfectly well for most users it doesn't work well for users that want to install Vuze on portable media (for example a USB drive) and keep the installation separate from the OS.

While it is currently possible (for versions prior to 4.7.0.1_B07) to use configuration switches to make Vuze run from a separate directory the main issue is that the portable media's drive letter can change when it is remounted. Previously this would break Vuze as it stored absolute references to these files and therefore the files would appear to be missing when the letter changed.

For Windows users only a simple approach to setting up such a portable installation is being tested (contact parg@users.sourceforge.net if an alternative OS implementation is of interest). A new configuration option is available that tells Vuze to treat the installation as portable. It is important to note that the level of portability supported is limited to the changing of the installation's drive letter only (for example D:\Azureus to E:\Azureus), it does not allow arbitary movement of the installation's location (e.g. moving it from D:\MyAzureus to D:\YourAzureus)

To set up a portable Windows installation do the following:

  • ) Install Vuze as usual (in general into C:\Program Files\Vuze)
  • ) Identify the install location on your portable device (let's call this V:\Programs\Vuze)
  • ) Copy all of the files from C:\Program Files\Vuze into V:\Programs\Vuze
  • ) Add the new -Dazureus.portable.enable=true option to your startup script. The easiest way to do this is to create an 'Azureus.exe.vmoptions' in V:\Programs\Vuze. Here is example content:
-include-options ${APPDATA}\Azureus\java.vmoptions<br>
-Dazureus.portable.enable=true
  • ) Launch by executing V:\Programs\Vuze\Azureus.exe

For things to work as expected you will need to keep everything that you store on the portable device in the '\Programs\Vuze' directory (including the downloads themselves). If you move anything outside of here then it will not be remapped when the drive letter changes.

Using a portable Java runtime on Windows[edit]

Vuze can explicitly use any Java runtime installed on your system by starting it with a command line instead of using the pre-supplied launcher. The only caveat to this is that you will manually need to manage the Java memory options.

The command line to run Vuze is of the form

%JAVADIR%\bin\java.exe -Xmx256m -Djava.library.path=%VUZEDIR% -Duser.dir=%VUZEDIR% -Dazureus.config.path=%VUZEDIR% -classpath %VUZEDIR%\Azureus2.jar;%VUZEDIR%\swt.jar  -Dazureus.portable.enable=true org.gudy.azureus2.ui.swt.Main

where %JAVADIR% is the Java runtime location and %VUZEDIR% is your Vuze install location.

Create a .bat file that you can use to launch Vuze containing

set JAVADIR=where you installed the Java runtime you want to use
set VUZEDIR=where you installed Vuze to (select the 'customize' option on the first installer screen to specify location)

%JAVADIR%\bin\java.exe -Xmx256m etc from above

This example sets the maximum Java memory size to 256MB.

'Portable Apps' provide a portable Java runtime - see http://portableapps.com/apps/utilities/java_portable