Re: [rawr] need a tutorial or manual

320 views
Skip to first unread message

James Britt

unread,
Jun 4, 2012, 12:25:23 PM6/4/12
to rawr...@googlegroups.com
rebel-warrior wrote:
> I'm trying to learn how to use rawr to compile an exe for windows and
> having no success no matter what platform I use. A manual would be
> greatly appreciated. A video tutorial even better.
> I'm getting some weird errors and it's beyond me to know if it's
> something I'm failing to do or some weird 1.7 - rawr interaction.
>
> I get this error:
> [rawr]$ rake rawr:bundle:exe
> /home/user/.rvm/gems/jruby-1.7.0.preview1/gems/rawr-1.4.5/lib/platform.rb:7:
> Use RbConfig instead of obsolete and deprecated Config.
> rake aborted!
> no such file to load -- ftools

You're using an old version of rawr. Some things in rawr changed to
keep up with changes in JRuby.

You need to get rawr either from the github repo or the gem server at
gems.neurogami.com.


gem install rawr --source http://gems.neurogami.com


You're better off getting the code from github though because there have
been some recent changes and I've not pushed a new gem yet.

https://github.com/rawr/rawr


James Britt


Eric Christopherson

unread,
Jun 27, 2012, 3:12:53 PM6/27/12
to rawr...@googlegroups.com
On Wed, Jun 27, 2012 at 1:52 AM, Stephen Prather <smpr...@gmail.com> wrote:
> Well, with copious amounts of pain, I tried to hack together a version 1.6.4
> with the git source (updated the gemspec and rawr_version.rb). I did a fresh
> 'rawr install', and then got this:
>
>>rake -T
> rake aborted!
> c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rawr-1.6.4/lib/zip/zip.rb:669:
> syntax error, unexpected kEND
>
>       end
>         ^

It looks like c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rawr-1.6.4/lib/zip/zip.rb
is missing a close parenthesis on line 667. Just put it at the end of
the line, save it, and then try rake rawr:jar.

I also had to add `c.target_jvm_version = 1.7` into
build_configuration.rb, since I'm using Java 7. I'm not sure why rawr
doesn't correctly detect that (as evidenced by the fact that it passes
-target 1.6 to javac. (In which case, I get the message "javac: target
release 1.6 conflicts with default source release 1.7".)

Myles

unread,
Jun 28, 2012, 12:33:49 AM6/28/12
to rawr...@googlegroups.com
Ok. Made those fixes. Now I get that trace I will copy below. But if I run javac myself from the same cmd line (note, I'm doing everything in Win7).

C:\Users\Myles\dev\openbass>javac -target 1.7 -cp lib/java/jruby-complete.jar;src -sourcepath src -d package/classes/java src/org/monkeybars/rawr/Main.java

C:\Users\Myles\dev\openbass>

Then when I run rake rawr:jar, I get:

C:\Users\Myles\dev\openbass>rake --trace rawr:jar
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rawr-1.6.4/lib/zip/zip.rb:28:
Use RbConfig instead of obsolete and deprecated Config.
** Invoke rawr:jar (first_time)
** Invoke package/jar/openbass.jar (first_time)
** Invoke package/classes/java/org/monkeybars/rawr/Main.class (first_time, not_needed)
** Invoke src/org/monkeybars/rawr/Main.java (first_time, not_needed)
** Invoke package/classes/java (first_time, not_needed)
** Invoke package/classes/ruby/main.rb (first_time)
** Invoke src/main.rb (first_time, not_needed)
** Invoke package/classes/ruby (first_time)
** Execute package/classes/ruby
mkdir -p package/classes/ruby
** Execute package/classes/ruby/main.rb
Copying source file src/main.rb to package/classes/ruby/main.rb
cp src/main.rb package/classes/ruby/main.rb
** Invoke package/classes/ruby/jc_says_fu.jpg (first_time)
** Invoke src/jc_says_fu.jpg (first_time, not_needed)
** Invoke package/classes/ruby (not_needed)
** Execute package/classes/ruby/jc_says_fu.jpg
Copying non-source file src/jc_says_fu.jpg to package/classes/ruby/jc_says_fu.jpg
cp src/jc_says_fu.jpg package/classes/ruby/jc_says_fu.jpg
** Invoke package/classes/META-INF (first_time)
** Execute package/classes/META-INF
mkdir -p package/classes/META-INF
** Invoke package/jar (first_time)
** Execute package/jar
mkdir -p package/jar
** Execute package/jar/openbass.jar
=== Creating jar file: package/jar/openbass.jar
** Execute rawr:jar
cp lib/java/jruby-complete.jar package/jar/lib/java/jruby-complete.jar

Thanks,
--Myles

Failed rake command:

C:\Users\Myles\dev\openbass>rake --trace rawr:jar
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rawr-1.6.4/lib/zip/zip.rb:28:
Use RbConfig instead of obsolete and deprecated Config.
** Invoke rawr:jar (first_time)
** Invoke package/jar/openbass.jar (first_time)
** Invoke package/classes/java/org/monkeybars/rawr/Main.class (first_time)
** Invoke src/org/monkeybars/rawr/Main.java (first_time, not_needed)
** Invoke package/classes/java (first_time)
** Execute package/classes/java
mkdir -p package/classes/java
** Execute package/classes/java/org/monkeybars/rawr/Main.class
javac -target 1.7 -cp lib/java/jruby-complete.jar;src -sourcepath src -d package/classes/java src/org/monkeybars/rawr/Main.java
rake aborted!
Command failed with status (127): [javac -target 1.7 -cp lib/java/jruby-compl...]
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `create_shell_runner'
org/jruby/RubyProc.java:257:in `call'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:43:in `sh'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rawr-1.6.4/lib/rawr.rb:117:in
`(root)'
org/jruby/RubyProc.java:257:in `call'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
org/jruby/RubyArray.java:1611:in `each'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
c:/jruby-1.7.0.preview1/lib/ruby/1.9/monitor.rb:211:in `mon_synchronize'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `invoke_prerequisites'
org/jruby/RubyArray.java:1611:in `each'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
c:/jruby-1.7.0.preview1/lib/ruby/1.9/monitor.rb:211:in `mon_synchronize'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `invoke_prerequisites'
org/jruby/RubyArray.java:1611:in `each'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
c:/jruby-1.7.0.preview1/lib/ruby/1.9/monitor.rb:211:in `mon_synchronize'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
org/jruby/RubyArray.java:1611:in `each'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
c:/jruby-1.7.0.preview1/lib/ruby/gems/shared/gems/rake-0.9.2.2/bin/rake:33:in `(root)'
org/jruby/RubyKernel.java:1017:in `load'
c:/jruby-1.7.0.preview1/bin/rake:23:in `(root)'
Tasks: TOP => rawr:jar => package/jar/openbass.jar => package/classes/java/org/monkeybars/rawr/Main.class


--
You received this message because you are subscribed to the Google Groups "rawr-lib" group.
To post to this group, send email to rawr...@googlegroups.com.
To unsubscribe from this group, send email to rawr-lib+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rawr-lib?hl=en.


James Britt

unread,
Jun 28, 2012, 8:51:48 AM6/28/12
to rawr...@googlegroups.com
On Sunday, June 3, 2012 6:18:27 PM UTC-7, rebel-warrior wrote:
> I&#39;m trying to learn how to use rawr to compile an exe for windows and having no success no matter what platform I use. A manual would be greatly appreciated. A video tutorial even better. 

That's true, but it's a matter of available time to do it.


> I&#39;m getting some weird errors and it&#39;s beyond me to know if it&#39;s something I&#39;m failing to do or some weird 1.7 - rawr interaction. 


I'm traveling right now so i don't have a Windows machine where I can test this. I'll have to look at it when I get home.

James Britt

Myles

unread,
Jun 28, 2012, 11:18:41 AM6/28/12
to rawr...@googlegroups.com
I was able to get a .exe after I made the fixes I list above and ran javac manually from the cmd line (just copy/paste the command from the rake log). I don't know why the java code compile is failing from within rake. I also put the path to javac (in the jdk 1.7 install dir) in my Windows PATH variable.

--
You received this message because you are subscribed to the Google Groups "rawr-lib" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rawr-lib/-/xUh2n4UAAGMJ.

James Britt

unread,
Jun 28, 2012, 4:15:25 PM6/28/12
to rawr...@googlegroups.com


On Jun 28, 2012 12:51 PM, "Stephen Prather" <smpr...@gmail.com> wrote:
>
> Hi James--
>
> I'm getting this error too. I need to get the latest code from the git server. I got the latest in a zip file. How should I install it? (It'd be really cool if you'd build a new gem with the fix though.)
>

I'm pretty sure the current gem is from the current code in git.

The gem is available here:

http://www.neurogami.com/gems/

Or do a git pull and run

rake gem

James

Reply all
Reply to author
Forward
0 new messages