trying to move things around a bit, mostly making a mess

This commit is contained in:
benfry
2002-07-25 04:06:39 +00:00
parent a259399597
commit 0f62bcf62d
4 changed files with 188 additions and 50 deletions
+75 -49
View File
@@ -14,21 +14,30 @@
$blank_line = "\n";
$separator = '/';
$path_separator = ':';
# tell me about this here system
if ($ENV{'WINDIR'} ne '') {
$separator = "\\";
$path_separator = ';';
#if ($ENV{'WINDIR'} ne '') {
# if ($ENV{'TERM'} eq 'cygwin') {
# $separator = "/";
# $path_separator = ':';
# $platform = 'windows'; #'cygwin';
# } else {
# $separator = "\\";
# $path_separator = ';';
# need path to mkdir for win32, because 'mkdir' defaults to the
# crappy dos version.. need to use cygwin instead
#$mkdir_path = 'd:\\cygwin\\bin\\mkdir';
$mkdir_path = 'mkdir';
$platform = 'windows';
} else {
$separator = '/';
$path_separator = ':';
$mkdir_path = '/bin/mkdir';
$platform = 'unix';
}
# #$mkdir_path = 'd:\\cygwin\\bin\\mkdir';
# $mkdir_path = 'mkdir';
# $platform = 'windows';
# }
#} else {
# $separator = '/';
# $path_separator = ':';
# $mkdir_path = '/bin/mkdir';
# $platform = 'unix';
#}
# something else needed here for macosx
# maybe something with OSTYPE or HOSTTYPE (esp OSTYPE)
# e.g. OSTYPE=linux-gnu HOSTTYPE=i386
@@ -41,41 +50,52 @@ if (-d $temp_dir) {
}
mkdirs($temp_dir, 0777) || die $!;
#die "buzz.pl received @ARGV\n";
#print "args = @ARGV\n";
$command = shift(@ARGV);
if ($command eq '') {
print "buzz.pl: perl is misconfigured.. no args passed in.. can't run\n";
print " cygwin perl seems to have problems, use activestate\n";
exit;
die "buzz.pl: received no arguments";
# print "buzz.pl: perl is misconfigured.. no args passed in.. can't run\n";
# print " cygwin perl seems to have problems, use activestate\n";
# exit;
}
if ($command =~ /-classpath/) {
die "cannot set classpath using this version of buzz";
}
#if ($command =~ /-classpath/) {
# die "cannot set classpath using this version of buzz";
#}
$classpath = $ENV{"CLASSPATH"};
if ($classpath eq "") {
# find java in the path
if ($platform eq 'windows') {
@elements = split(';', $ENV{"PATH"});
foreach $element (@elements) {
#print "trying $element\\java.exe\n";
if (-f "$element\\java.exe") {
$classpath = "$element\\..\\lib\\classes.zip";
print "found java: $element\\java.exe\n";
last;
}
}
if ($classpath eq "") {
die "java.exe is not in your path, and classpath not set";
}
} elsif ($platform eq 'unix') {
die "code for searching path not written for unix\nset environment varilable for CLASSPATH before using.\n";
} elsif ($platform eq 'macosx') {
}
if ($classpath eq '') {
die "must set classpath before using buzz.pl";
}
#$classpath =~ s/\\/\//g;
#$classpath =~ s/\;/\:/g;
# # find java in the path
# if ($platform eq 'windows') {
# print "path is $ENV{'PATH'}\n";
# exit;
# @elements = split(';', $ENV{"PATH"});
# foreach $element (@elements) {
# #print "trying $element\\java.exe\n";
# if (-f "$element\\java.exe") {
# $classpath = "$element\\..\\lib\\classes.zip";
# print "found java: $element\\java.exe\n";
# last;
# }
# }
# if ($classpath eq "") {
# die "java.exe is not in your path, and classpath not set";
# }
#
# } elsif ($platform eq 'unix') {
# die "code for searching path not written for unix\nset environment varilable for CLASSPATH before using.\n";
#
# } elsif ($platform eq 'macosx') {
# }
#}
# if target directory, -d, option is used, add it to CLASSPATH
@@ -124,9 +144,10 @@ foreach $arg (@ARGV) {
# buried more than one level deep. this is especially
# important under unix, because the above mkdir stuff won't
# get hit due to *.java being expanded on the cmd line
$arg =~ /(.*)$separator([\w\d]+\.java)/;
#$arg =~ /(.*)$separator([\w\d]+\.java)/;
$arg =~ /(.*)${separator}.*\.java/;
$file_path = $1;
$file_name = $2;
#$file_name = $2; # ignored
if ($file_path ne '') {
#print "_${file_path}_ and _${file_name}_\n";
#if (!(-d $file_path)) {
@@ -161,7 +182,8 @@ foreach $file (@file_list) {
print "compiling...\n";
$files = join(' ', @new_file_list);
$compile_command = "$command -classpath $classpath $files";
#$compile_command = "$command -classpath $classpath $files";
$compile_command = "$command $files";
#print "$compile_command\n";
print `$compile_command`;
@@ -214,6 +236,7 @@ sub read_positive {
# excludes everything until an else or an endif
sub read_negative {
my ($inside_negative) = @_[0];
#print "checking @_[0] $_[0]\n";
my $line;
while ($line = shift(@contents)) {
if ($line =~ /$\#if(\w*)def\s+(\S+)/) {
@@ -255,13 +278,16 @@ sub read_negative {
# this turned into a hack because i was lazy
sub mkdirs {
my $d = @_[0];
#print "making dir $d\n";
# print "making dir $d\n";
`mkdir -p $d`;
if ($platform ne 'windows') {
$d =~ s/\\/\//g; # make backslashes into fwd slashes
my $result = `$mkdir_path -p $d`;
} else {
print $result = `$mkdir_path $d`;
}
# if ($platform ne 'windows') {
# $d =~ s/\\/\//g; # make backslashes into fwd slashes
#my $result = `$mkdir_path -p $d`;
# print `$mkdir_path -p $d`;
# } else {
#print $result = `$mkdir_path $d`;
# print `$mkdir_path $d`;
# }
return 1;
}
+31
View File
@@ -0,0 +1,31 @@
#!/bin/sh
### -- BUILD WINDOWS ---- ---------------------------------------
DIST=build/windows/processing
cp -r build/windows/dist $DIST
### -- BUILD PDE for 1.1 ----------------------------------------
echo Building PDE for JDK 1.1 \(Mac OS 9\)
CLASSPATH=build/macos9/classes:build/macos9/JDKClasses.zip:build/macos9/javax.comm.MRJ.jar:lib/kjc.jar:lib/oro.jar
cp ../bagel/classes/*.class build/macos9/classes/
perl buzz.pl "jikes +D -d build/macos9/classes" *.java kjc/*.java
cd build/macos9/classes
rm -f ../dist/lib/pde.jar
zip -0q ../dist/lib/pde.jar *.class
cd ../../..
### -------------------------------------------------------------
+52
View File
@@ -0,0 +1,52 @@
#!/bin/sh
### standard Proce55ing application build
### -- BUG need to test if lib/export exists, create it if not
### -- may exist but is being pruned by cvs
### -- BUILD BAGEL ----------------------------------------------
cd ..
cd bagel
set SAVED_CLASSPATH=$CLASSPATH
set CLASSPATH=java\lib\ext\comm.jar\;$CLASSPATH
### --- make version with serial for the application
echo Building bagel with serial support
perl make.pl SERIAL
cp classes/*.class ../app/classes/
### --- make version without serial for applet exporting
echo Building bagel for export
perl make.pl
cp classes/*.class ../app/lib/export/
cd ..
cd app
#set CLASSPATH = %SAVED_CLASSPATH%
set CLASSPATH=$SAVED_CLASSPATH
### -- BUILD PDE ------------------------------------------------
echo Building PDE for JDK 1.3
#CLASSPATH2=$CLASSPATH
CLASSPATH=classes:lib/kjc.jar:lib/oro.jar:java/lib/rt.jar:java/lib/ext/comm.jar
#echo cp2 is now ${CLASSPATH2}
#echo classpath is now $CLASSPATH
#rm -f classes/*.class
perl buzz.pl "jikes +D -classpath $CLASSPATH -d classes" -dJDK13 *.java kjc/*.java
#perl buzz.pl "jikes +D -d classes" -dJDK13 *.java kjc/*.java
cd classes
rm -f ../lib/pde.jar
zip -0q ../lib/pde.jar *.class
cd ..
#CLASSPATH=$CLASSPATH2
+30 -1
View File
@@ -4,12 +4,33 @@ X sketch.properties exception when closing on linux and mac
X urlstr was garbage because of windows-specific code
X test build macos9 version with JDK13 flag turned off
dist directories contain only the files specific to that platform
(those are the ones checked into cvs)
when dist.sh is run:
1) a copy of the dist dir is created, renamed 'processing-nnnn'
2) the remaining files are added (buttons.gif, pde.properties)
3) files are lf converted (i.e. notes.txt)
_ make buttons taller by 4 pixels (looking bad on macos9/macosx)
_ change to uppercase (looks dumb on mac, and casey doesn't like)
_ save window position (only during session) of sketch run window
_ present mode should hide editor frame
_ present mode doesn't work for draw()
_ get macutils to build under cygwin. argh.
_ get to build under macosx?
_ make.bat in root of 'app' should jump to build/windows/make.bat
_ dist.bat should be inside build dir
_ and will build for each platform in turn
_ macos may be superior platform for building
_ retain unix file permissions for linux
_ resource fork goodness for the mac
_ hhmmm
_ comm.jar now needs to be in CLASSPATH for build environment
_ for jgl version of bagel, jgl.jar needs to be in classpath
_ perl should be ok to be cygwin perl.. try deinstalling activestate
bagel
a _ fold simpleserial into BApplet
a _ set serial properties inside bagel in kjcengine
@@ -586,4 +607,12 @@ rm -rf web (optional, if you're only doing java dev)
cvs update -P (prune empty directories)
need to have comm.jar in the CLASSPATH to build bagel
just gotta be that way, it's too messy otherwise
just gotta be that way, it's too messy otherwise
need cygwin: zip, unzip, perl
little guys: rm, cp, mv, tcsh
build jikes for cygwin
./configure, make, make install
add $cygwin/usr/local/bin to path