jEdit via a USB stick
comments | Posted in jedit | texteditor on Sunday, August 12 2007 02:25:00 PDT

Since I have used jEdit for about 7 years now I've had my run of playing of playing with superabbrev templates, macros, and look&feel changes. Having jEdit available wherever you go really helps you to learn it. In CalPoly I developed a simple Windows batch file to invoke jEdit from anywhere (note: this jEdit deployment can depend on a host system JRE or one bundled on the usb device).

For starters I'll explain that the script is easy to maintain you only have to edit 1 variable when you move from system to system. To do so quickly I usually would do the following steps from Windows: cmd.exe [installed usb path] edit devshell.bat (changed MPATH= to correct path value) ALT+F+S devshell.bat

And you've got your developer shell up and running with all the paths/executables properly set.

Here is a snapshot of the actual batchfile.

@echo off REM ---------------------------------------------------------------------------- REM CONFIGURE PATHS AND JRE Settings REM ----------------------------------------------------------------------------

REM ---------------------------------------------------------------------------- REM Global paths used by device and apps REM ---------------------------------------------------------------------------- set MPATH=F: set APPS=%MPATH%\files\apps

REM ---------------------------------------------------------------------------- REM ---- Java Runtime Enviroment Settings ---- REM ---------------------------------------------------------------------------- set JAVAHOME=%APPS%\jre1.5.005\bin set JAVAEXE=%JAVAHOME%\java.exe set XBT=-Xbootclasspath/a:%APPS%\jEdit\jars\looks-1.2.2.jar set GUI=-Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel set SOPTS=-Xms8m -Xmx16m set LOPTS=-Xms8m -Xmx64m set JAntiA=-Dswing.aatext=true

REM ---------------------------------------------------------------------------- REM ---- Configuration Variables for apps ---- REM ----------------------------------------------------------------------------

set CNFG=^-settings=%MPATH%.jEdit

REM ---------------------------------------------------------------------------- REM ---- DOSKEY shortcuts for applications ---- REM ---------------------------------------------------------------------------- PATH = %APPS%\PortableFirefox;%PATH% doskey jedit = %JAVA_EXE% %GUI% %LOPTS% -jar %MPATH%\jEdit\jedit.jar %CNFG% doskey pfox = %APPS%\PortableFirefox\PortableFirefox.exe doskey tbird = %APPS%\PortableThunderbird\PortableThunderbird.exe doskey abiw = %APPS%\PortableAbiWord\PortableAbiWord.exe

REM ---------------------------------------------------------------------------- REM ---- Ruby Configuration Settings ---- REM ---------------------------------------------------------------------------- set RUBOPT=rubygems set RUBYHOME=%APPS%\ruby set GEMINSTALL=%APPS%\rgems set GEMHOME=%APPS%\rgems\gemrepos REM make ruby callable from command line. PATH=%APPS%\ruby\bin;%PATH% REM so that the 'gem' command can be found. PATH=%GEM_INSTALL%\bin;%PATH% REM tell ruby to load rubygems on every script (yikes). set RUBYOPT=rubygems

REM ---------------------------------------------------------------------------- REM ---- Menu configuration and display ---- REM ---------------------------------------------------------------------------- set BATVER=1.7 REM 1.7 - adding support for full installation of ruby 1.9mswin, for eVault. tbc cls

title MuzioJM200(%MPATH%) DevShell %BATVER% echo +---------------------------------------------------------+ echo : TECHNXs WinXP Shell : echo : muzio path [%MPATH%] : echo : .bat ver [%BATVER%] : echo : : echo : Options Available: : echo : abiw - invoke AbiWord word processor : echo : jedit - invoke the jEdit text editor : echo : pfox - run PortableFirefox web browser : echo : tbird - run PortableThunderbird email client : echo : : echo : note Muzio Path should read the same as CMD below. : echo +---------------------------------------------------------+ cmd

It is setup in a top-down fashion. I set paths and application dependencies as they are needed. If you put a JRE install on your usb stick (I do ... who doesn't) be sure to define a JAVA value before applications that use it. In this way you can invoke nearly any Java application from a usb stick.

I also currently override jEdit look and feel and iconset, but I will make a further post about those items shortly.

blog comments powered by Disqus