Console plugin environment variable issue
Submitted by Friday, 3 October, 2014 - 17:09
on
I've been using jEdit for Atari 2600 homebrew development since 2006. Spurred on by a fellow homebrewer, I recent delved into the plugins to figure out how to compile and run code from jEdit. I got it mostly working, though I ran into a problem with the environment variables. To figure out what was going on, I replaced my Custom Command for the Interpteter with an echo command and did some tests:
echo $f
/Users/darrellspice/Projects/Atari/Draconian/draconian.asm
echo $d
/Users/darrellspice/Projects/Atari/Draconian
echo $n
draconian.asm
echo $c
draconian
I know I can use multiple environment variables per command because my custom compile command works. The following compiles my source code (draconian.asm) and creates three output files(draconian.sym, draconian.lst and draconian.bin):
dasm $n -f3 -v0 -s$c.sym -l$c.lst -o$c.bin
For the interpreter step I needed to use the full path to the bin file, which is the source file with the extension .asm replaced with .bin. I thought that could be accomplished by $d/$c.bin but it fails to work.
echo $d/$c.bin
/Users/darrellspice/Projects/Atari/Draconian/.bin
The results I was expecting were:
/Users/darrellspice/Projects/Atari/Draconian/draconian.bin
So for some reason the second environment variable is being ignored. Any ideas? About jEdit shows:
jEdit 5.2pre1 server-background mode, using Oracle Corporation Java 1.7.0_67
In case you're wondering, Draconian is a port of Bosconian for the 2600. You can read about it, and even download a WIP ROM to run in Stella, over at AtariAge:
http://atariage.com/forums/topic/225044-draconian-2600/
http://stella.sourceforge.net
Thanks!
echo $f
/Users/darrellspice/Projects/Atari/Draconian/draconian.asm
echo $d
/Users/darrellspice/Projects/Atari/Draconian
echo $n
draconian.asm
echo $c
draconian
I know I can use multiple environment variables per command because my custom compile command works. The following compiles my source code (draconian.asm) and creates three output files(draconian.sym, draconian.lst and draconian.bin):
dasm $n -f3 -v0 -s$c.sym -l$c.lst -o$c.bin
For the interpreter step I needed to use the full path to the bin file, which is the source file with the extension .asm replaced with .bin. I thought that could be accomplished by $d/$c.bin but it fails to work.
echo $d/$c.bin
/Users/darrellspice/Projects/Atari/Draconian/.bin
The results I was expecting were:
/Users/darrellspice/Projects/Atari/Draconian/draconian.bin
So for some reason the second environment variable is being ignored. Any ideas? About jEdit shows:
jEdit 5.2pre1 server-background mode, using Oracle Corporation Java 1.7.0_67
In case you're wondering, Draconian is a port of Bosconian for the 2600. You can read about it, and even download a WIP ROM to run in Stella, over at AtariAge:
http://atariage.com/forums/topic/225044-draconian-2600/
http://stella.sourceforge.net
Thanks!