Ruby Shoes packager including Shoes in the app - ruby

I can't seem to get the Ruby Shoes packager to correctly create an exe with Shoes included. I'm using the Raisins release (0.r1134), with the pack.rb replaced from github. The exe's the packager makes are all 70-80K files (they obviously don't include shoes or ruby). These exe's will run on my XP machine that already has Shoes on it. but when I copy them to another laptop they start a "Shoes is downloading" dialog that does nothing and then goes away.
I need to make standalone Windows exe's, and my understanding was that the "Yes, I want Shoes included" option in the packager would do that. Did I misunderstand the intent? Is there a way to make this work? Hope so, because I love Shoes. As most women do. Hmm... maybe Shoes was _why's attempt at getting more women into programming as well as kids...but I digress.
The other threads I've found here imply this will work:
Problem in Ruby Shoes packaging?
Shoes packager problem

Although the pack.rb file now references the new website, shoes.heroku.com, it seems as if the files have fallen off it. So it won't be generating a proper .exe. Whoops.
You can work around this by placing the Shoes Raisins installer, if you have it, in the LIB_DIR and renaming it. E.g. this works for me:
D:\Users\me\.shoes\raisins\win32\latest_shoes-novideo.exe
pack.rb will check here before trying to download.
Note that you might still have issues with the executable working. Personally I've found distributing a .shy more reliable.
Some work needs to be done on packaging (I am involved with Shoes).

Related

Problems with deploying a GTK Application

I am currently testing the GTK Application that I built on windows using the MSYS2 64bit shell.
For the program to be able to run outside of the shell, I packed all the required DLLs with it as well as the following:
FOLDER\lib\gdk-pixbuf-2.0\2.10.0\loaders\\*
FOLDER\lib\gdk-pixbuf-2.0\2.10.0\loaders.cache
FOLDER\share\glib-2.0\schemas\gschemas.compiled
FOLDER\share\icons\Adwaita\\*
FOLDER\share\icons\hicolor\\*
The good news is: It works :) And it also works flawlessly on another PC that doesnt have GTK/Msys2/whatever installed.
The bad news is: On yet another PC (I have tested it on 2 other Systems other than my developing System so far, one one of them it works flawlessly), the program itself works, but the GUI is not rendered sharply (texts are blurry).
Do you guys have any idea on what could be the reason for that? I'm guessing it could be one of the following:
The affected system could have some general display problems that have nothing to do with my app.
The gschemas.compiled file does not suit the affected system. In that case I would probably have to create that file dynamically, but I have no idea how to do this.
I am missing some file from GTK or Glib that would solve the problem.
I am thankful for any help :) Compiling/Deploying a GTK App for Windows has proven to be a pain in the ***, but since (almost) everything works now, I feel like its not much that I am missing unless I have overseen something critical.
Regards,
tagelicht
Given the way you created your package, my bet is that you are missing some components, making the drawing code use some fallback routines, hence the "sharp" drawing.
Try to run the application in command line on the machine where your have the problem, to see if there are some unusual warnings you don't have when running it on your machine.
See also my answer on how to distribute a GTK+ application on Windows.

Is there any way to package an app in Shoes?

I am using the latest official release of shoes on Mac OS X 10.8.4.
I made a little test app but the packaging part of Shoes doesn't work apparently. I asked the support people for help but they said it's a known problem and it's not able to be done inside of the Shoes app.When they told me this, I tried the development version of Shoes4. I tried packaging one of the samples and it didn't work.
Has anybody been able to get the shoes packaging thing to work? Is this possible? If so, how?
Packaging for shoes3 is sadly mostly broken (I think some command line options might work, but I do not know them). For shoes4 packaging is work in progress (and sometimes works) - it is scheduled for rc1 but right now we are still in pre alpha.
There are a few open packaging bugs - feel free to report your own so we can figure it out :-)

How to package ruby shoes apps on OSX 10.7

I have been making an app using Ruby Shoes. I am happy with how it turned out and would like to share it with some friends. However, the GUI packager doesn't work in OSX and the Windows packager only seems to make a .shy file. I've been reading around looking for solutions and I don't understand any of them. Can someone clearly explain step-by-step how to package a Ruby Shoes app to say a DMG or an EXE file?
Personally, I prefer to use green_shoes. Green_shoes is a pure ruby gem that you require in your ruby code instead of a program that packages your ruby code. This way, you can use a program such as ocra to make your ruby file into exe. While it is sort of a hack, I feel that it is better than requiring your users to install shoes to run your program.
Check this out.
Compiling/Package a Shoes.app to a standalone Mac.app?
[How?] "By compiling your app and Shoes together. This is what I do with Hackety Hack. Totally works."

PC to Macbook Pro Transition - Getting (re)started?

I'm in my second computer science course right now. I've enjoyed programming so far, but really have just scraped my way by. I've not done much programming outside of required class work. For similar reasons, I never really invested in downloading/learning software to help me program (IDE's, editors, compilers, etc).
I know it sounds tedious, but my current setup is: notepad++ for coding; Filezilla to transfer .cpp & .h files to school's aludra/unix and compiling; unix tells me where my bugs are and I go back to notepad++ to debug; repeat until done.
This isn't fun - and I know it could be easier. But I put it off knowing that I was soon going to switch to a Mac. And, tomorrow, I'm switching.
So...
How should I set up my Macbook for the best programming experience?
What IDEs and editors and debuggers and so on should I download?
How will Mac programming differ from PC?
I'm open to all ideas and comments, even the most basic.
(Background - I'm learning/programming in C++ right now. Next semester, my classes switch to Java. I'm also going to take a class in web development, with HTML/CSS/Javascript/PHP. My new laptop will be a late 2009 Macbook Pro with Leopard, or maybe Snow Leopard. Free would be preferrable for all programs.)
Thank you all.
How exciting for you, I'm sure your new lappy will be able to make your life as a novice programmer much, much simpler.
Here's what I would do.
Download and install eclipse. It's free, and it's a very good IDE to have if you're going to program java. There are versions available for c/c++ and php as well, and there is a silly amount of great plugins for just about anything you'll ever need. Get it here.
Get the subversive plugin to your eclipse. It will make your life so easy when it comes to managing your code through svn. You can download the plugin through eclipse.
Download Ruby. Ruby is (imho) a great language for beginners, and the irb environment is very handy for trying little things out. Get it here.
Get emacs. Emacs is a great editor, and it's free. Use it for editing your system files, or for coding if you find it suits you. Get it here. (I can also recommend Textmate, it's a really good editor, but unfortunatly not free. If you want to spoil yourself a bit, though, I'd really recommend it.)
If you're doing modelling, you should definitly treat yourself to a licence of omnigraffle. It will definitly make your life easier, and it will let you draw models like nothing else. Get it here.
I would advise you not to bother with macports. Generally I find it will install everything, everyone and their dog on your lappy evertyime you use it, and that gets tedious pretty quickly.
If you're doing any php-stuff, get MAMP. MAMP puts you three clicks away from a running apache, mysql and php-setup without you so much as thinking. Very good piece of software, I think. Get it here.
For the rest of it, just download stuff when the need arises. Most of the things you'll need to install comes in handly little installer packages, and you won't need to know much in order to get them installed and working on your computer.
All the best of luck to you!
You definitely need Developer Tools from Apple. They include:
XCode, a very good IDE and editor
InterfaceBuilder
gcc, g++ and clang to compile code, in various versions
gdb as debugger
Instruments for performance analysis
as well as a lot of other utilities to program in C, C++, Java, Objective-C and Objective-C++.
Python, Ruby and PHP interpreters and libraries come preinstalled with every Mac so don't bother installing it by hand. (the Apache web server is also included, so you only need MySQL to have a full MAMP stack)
The Developer Tools package comes with every MacOSX DVD but I recommend you to download the latest version directly from Apple (it requires a free Developer account).
Once you installed it put XCode in the Dock and that's it! No other stuff needed.
NB: This is the simplest and only supported way of getting compilers and debuggers for C-based languages, even if you won't use XCode as an editor.
Speaking of editors, I recommend you to stick to XCode for a while because it is simple enough, yet very powerful, and it's free.
If you don't like it try TextWrangler (free) or TextMate (paid).
Vim and Emacs are two other good editors, but I don't recommend you to try them right now because they use obscure and non-standard key combinations, so you will spend a lot of time learning how to use them instead of programming.
Anyway the best thing you can do is to learn one editor very well, the effort in learning it will surely pay off every day.
Eclipse is the best editor for java. It's available on a mac for free, just as it is on windows.
There's a good text editor made by barebones software called text wrangler. It's free, and is good about syntax coloring for basic editing.
The best of the best for web development on mac is a tie between text mate and coda. If you're going to be doing a lot of web development, they're worth the investment.
To run a test environment in mysql/php, download MAMP (the mac counterpart to WAMP). Google search it - it's free, and really easy.
Mac programming doesn't differ at all from windows programming if you're writing java, php, etc., because it all goes the same place. Java just boils your code down differently depending on your machine, but it does the same stuff. PHP will probably be held on some sort of linux distro, so it's the same on both. C++ is the same given the appropriate compilers.
Enjoy your mac!

Building a Windows executable from my Ruby app?

I'd like to be able to send a Ruby app to some colleagues without requiring them to install a Ruby interpreter. A single exe would be preferable.
I googled and found "RubyScript2Exe".
What are your experiences with that? Are there other such tools or are there better approaches altogether than building an exe?
I've used it about 3 times and I haven't had any problems with it and I ran one of the apps on 10 servers and never had any issues. So, I think RubyScript2Exe is about as good as it gets for ruby.
_why's Shoes framework lets you package the program as an executable for Mac or Windows that installs Shoes (contains a Ruby interpreter). Information about using the packager is here. _why also gives hints about how he makes the Windows executable here.
Don't forget OCRA [1] which I used a couple of times and which Just Worked.
I used to create my exes with RubyScript2Exe as mentioned above but had problems when used with Ruby 1.9 [2].
[1] http://ocra.rubyforge.org/
[2] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/343891
There is another one called Crate. You can find some information about it here. However I haven't tested it on Windows.
Sorry to be late to the party, but I found this question in my search for trying to do this myself (starting to use SO more and more as a primary resource).
Anyway, I have just had success with exerb, although I'd add a couple of notes:
The web page says exerb runs on any platform. That is true; however if you "compile" a program calls out to native code, then exerb will embed your system's native code (e.g. Linux .so files) into the .exe. In practice, that means you have to build any significant app on Windows.
The web page also says ruby -r exerb/mkrbc but the actual command is ruby -r exerb/mkexy.

Resources