Permalink
Browse files

* Added custom GLSurfaceView to start the render thread with larger s…

…tack on Android 2.3and older.

* Solves Issue #2 Image Appears Garbled
* Added Rakefile to generate the JAR and GEM.
  • Loading branch information...
1 parent a58cc53 commit 0637bf39e286e900e16c4754c4bff4680720f4f1 @donv donv committed Mar 31, 2013
Showing with 1,964 additions and 5 deletions.
  1. +2 −0 .gitignore
  2. +26 −0 Rakefile
  3. +1,927 −0 java/GLSurfaceView.java
  4. BIN lib/gosu.java.jar
  5. +1 −1 lib/gosu_android/main-window.rb
  6. +7 −3 lib/gosu_android/requires.rb
  7. +1 −1 lib/gosu_android/version.rb
View
@@ -0,0 +1,2 @@
+/.idea
+/pkg
View
@@ -0,0 +1,26 @@
+CLASSES_DIR = 'pkg/classes'
+JAVA_SOURCES = 'java/*'
+
+unless ENV['ANDROID_HOME']
+ begin
+ adb_path = `which adb`
+ ENV['ANDROID_HOME'] = File.dirname(File.dirname(adb_path)) if $? == 0
+ rescue Errno::ENOENT
+ puts "Unable to detect adb location: #$!"
+ end
+end
+(puts 'You need to set the ANDROID_HOME environment variable.'; exit 1) unless ENV['ANDROID_HOME']
+
+directory CLASSES_DIR
+
+desc 'Generate the gosu.java.jar'
+task :jar => [CLASSES_DIR] + FileList[JAVA_SOURCES] do
+ sh "javac -source 1.6 -target 1.6 -bootclasspath #{ENV['ANDROID_HOME']}/platforms/android-10/android.jar -d #{CLASSES_DIR} #{JAVA_SOURCES}"
+ sh "jar cf lib/gosu.java.jar -C #{CLASSES_DIR} gosu"
+end
+
+desc 'Build the gem'
+task :gem => :jar do
+ sh 'gem build gosu_android.gemspec'
+ sh 'mv gosu_android-*.gem pkg/'
+end
Oops, something went wrong.

0 comments on commit 0637bf3

Please sign in to comment.