Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e91386b
Showing
48 changed files
with
3,729 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
P5_MAIN_CLASS = "RakeP5Demo" | ||
|
||
MIN_MEMORY_MB = "64m" | ||
MAX_MEMORY_MB = "512m" | ||
|
||
|
||
require 'rake' | ||
|
||
task :default => :build | ||
|
||
task :build, [:main_class] do |t, args| | ||
args.with_defaults(:main_class => P5_MAIN_CLASS) | ||
|
||
puts "\n## Building..." | ||
|
||
start_secs = Time.now.to_f | ||
|
||
Dir.mkdir("bin") unless File.exists?("bin") | ||
Dir.mkdir("bin/classes") unless File.exists?("bin/classes") | ||
|
||
system "javac -sourcepath src -cp \"#{library_classpath}\" -d bin/classes src/#{args.main_class}.java" | ||
|
||
puts "## Built sketch in #{Time.now.to_f - start_secs} seconds." | ||
|
||
# Stuff for Jar which isnt working yet | ||
# sh "echo Main-Class: #{MAIN_CLASS}>bin/manifest" | ||
# sh "jar cmf bin/manifest bin/#{MAIN_CLASS}.jar -C bin/classes ." | ||
end | ||
|
||
task :run, [:main_class] => :build do |t, args| | ||
args.with_defaults(:main_class => P5_MAIN_CLASS) | ||
run_sketch(args.main_class) | ||
end | ||
|
||
# task :run_fs => :build do | ||
# run_sketch true | ||
# end | ||
|
||
task :clean do | ||
rmfiles = ['bin/classes', 'bin/manifest', "bin/#{P5_MAIN_CLASS}.jar"] | ||
rmfiles.each do |file| | ||
sh "rm -rf #{file}" if File.exists?(file) | ||
end | ||
end | ||
|
||
|
||
def run_sketch(main_class) | ||
puts "\n## Running... Prepare for downcount.\n\n" | ||
|
||
java_args = main_class | ||
|
||
# if present | ||
# java_args += " --present --exclusive --hide-stop" | ||
# end | ||
|
||
system "java -Xms#{MIN_MEMORY_MB} -Xmx#{MAX_MEMORY_MB} -cp \"#{library_classpath}:bin/classes\" -Djava.library.path=\"#{library_jnipath}\" processing.core.PApplet #{java_args}" | ||
|
||
# Hmm running from Jar isn't working yet.. | ||
# sh "java -cp \"#{class_path}\" -jar bin/#{MAIN_CLASS}.jar #{MAIN_CLASS}" | ||
end | ||
|
||
|
||
def library_classpath() | ||
cp_jars = Dir.glob(File.join('library', '*.jar')) # catch free floating jars | ||
|
||
library_dirs.each do |dir| | ||
# eventually work this in | ||
# if File.exists?("#{dir}/export.txt") | ||
|
||
cp_jars += Dir.glob(File.join(dir, '*.jar')) | ||
end | ||
|
||
return cp_jars.join(':') | ||
end | ||
|
||
def library_jnipath() | ||
jni_dirs = [] # Native Library Folders | ||
|
||
library_dirs.each do |dir| | ||
jni_files = Dir.glob(File.join(dir, '*.jnilib')) | ||
|
||
if jni_files.length > 0 | ||
jni_dirs << dir | ||
end | ||
end | ||
|
||
return jni_dirs.join(':') | ||
end | ||
|
||
def library_dirs() | ||
return Dir.glob(File.join('library', '**', 'library')) | ||
end |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
K 25 | ||
svn:wc:ra_dav:version-url | ||
V 31 | ||
/meshwalk/!svn/ver/12/trunk/lib | ||
END | ||
core.jar | ||
K 25 | ||
svn:wc:ra_dav:version-url | ||
V 40 | ||
/meshwalk/!svn/ver/12/trunk/lib/core.jar | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
9 | ||
|
||
dir | ||
54 | ||
http://svn.onecm.com/meshwalk/trunk/lib | ||
http://svn.onecm.com/meshwalk | ||
|
||
|
||
|
||
2009-03-19T01:24:37.484418Z | ||
12 | ||
ryan | ||
|
||
|
||
svn:special svn:externals svn:needs-lock | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
e13ec501-5b54-0410-9cb1-ea4ea950c392 | ||
|
||
|
||
|
||
|
||
|
||
|
||
0 | ||
|
||
core.jar | ||
file | ||
|
||
|
||
|
||
|
||
2009-02-24T15:49:09.000000Z | ||
9fdec8bee615bc8411a0118751269e13 | ||
2009-03-19T01:24:37.484418Z | ||
12 | ||
ryan | ||
has-props | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
229713 | ||
|
||
opengl | ||
dir | ||
|
||
dir | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
K 13 | ||
svn:mime-type | ||
V 24 | ||
application/octet-stream | ||
END |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry combineaccessrules="false" kind="src" path="/core"/> | ||
<classpathentry kind="lib" path="library/jogl.jar" sourcepath="jogl-src.zip"> | ||
<attributes> | ||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="opengl/library"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="lib" path="library/gluegen-rt.jar"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>opengl</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
Oops, something went wrong.