hi. I want to make .exe that can run in other computer in my app that I
use ruby-gnome2 GUI.
I follow this guide
http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_rubyscript2exe
in ‘rubyscript2exe on Windows, solution 2’
first I create folder “new” that contain 2 file
- init.rb (helloworld.rb in example file and add some code that want use
when make to .exe)
- folder name “run_dep” that contain 3 folder [etc/ lib/ share/] that I
copy from C:/ruby/lib/GTK/
and then I create .exe by
then it show me helloworld button that can work normally so I close it
to make .exe and when create success I open it but it can’t read font at
button. it show some error.(see firse picture)
and in another app I use gdk::… It can’t open what I doing
wrong…
note : I use ruby-gnome2-0.16.0-1-i386-mswin32.exe only to install GTK
for ruby. so I don’t have folder C:/GTK/. maybe it’s cause of error???
and I try to uninstall and install gtk-dev-2.10.11-win32-1.exe that has
glade32 and when I complie my app with SciTE (when I install ruby-gnome2
it can run normally) It can’t compile and run!!!(see
second picture)
has some error. I don’t know how to set path and I try this about 1
week. I still can’t make it please help me :'(((((
first picture
second picture
Mathieu B. wrote:
Hi,
This is not an answer to your problem but this is somewhat related. In
my application Fantasdic, I took a different approach. I created a
self-contained archive including Ruby, Gtk, RG2 and my application.
Everything uses relative path so you can unzip it anywhere.
The good thing about it is that my application starts almost
instantaneously. This is because, everything is already in place,
unlike with rubyscript2exe, which has to unzip the content contained
in the executable. The downside is that my archive is quite large. I
didn’t even try to reduce the size of the archive though. Some ideas
to reduce space: remove GTK translation files, remove unused Ruby
libraries.
If this approach is interesting for you, I think you could use my
archive as a starting point and replace my application with yours.
Apps - GNOME Wiki!
HTH,
Mathieu
2008/5/1 Pat K. [email protected]:
your fantasdic is work! Can you tell me step of creating gnome to exe.
you use rubyscript2exe?? and what’s gnome version you use? sorry for my
bad english.
Hi,
This is not an answer to your problem but this is somewhat related. In
my application Fantasdic, I took a different approach. I created a
self-contained archive including Ruby, Gtk, RG2 and my application.
Everything uses relative path so you can unzip it anywhere.
The good thing about it is that my application starts almost
instantaneously. This is because, everything is already in place,
unlike with rubyscript2exe, which has to unzip the content contained
in the executable. The downside is that my archive is quite large. I
didn’t even try to reduce the size of the archive though. Some ideas
to reduce space: remove GTK translation files, remove unused Ruby
libraries.
If this approach is interesting for you, I think you could use my
archive as a starting point and replace my application with yours.
http://www.gnome.org/projects/fantasdic/
HTH,
Mathieu
2008/5/1 Pat K. [email protected]:
Mathieu B. wrote:
2008/5/1 Pat K. [email protected]:
your fantasdic is work! Can you tell me step of creating gnome to exe.
you use rubyscript2exe?? and what’s gnome version you use? sorry for my
bad english.
I didn’t use rubyscript2exe. As I said, this is simply an archive
containing everything necessary. People just have to unzip and that’s
it! The trick is that it uses relative paths.
- Remove fantasdic and put your application instead
- Your main ruby file must add the directory of the extensions to
$LOAD_PATH (see lib/fantasdic/bin/fantasdic and you’ll see)
- You must adjust the path to your main rb file in
lib/fantasdic/win32/fantasdic.c and recompile it. I used DevC++.
I would think those are the only things you need to change in my
archive.
Mathieu
I confuse with it
first, I copy my init.rb to new folder that I copy from fandastic and
rename file to fandastic like this.
and “Your main ruby file must add the directory of the extensions to
$LOAD_PATH” I don’t understand this my directory that show file
above is ‘D:\ruby2\fantasdic’) what I must do with fantasdic file?? what
line??
and “You must adjust the path to your main rb file in
lib/fantasdic/win32/fantasdic.c and recompile it. I used DevC++.”
I have devc++ and I open that file . but I don’t how where I adjust path
to my rb file please help me again.
Hum, I don’t want to be mean but you need to search a little bit more
by yourself. I gave you all the details that you need in my previous
email. You won’t get everything to work in 5 minutes. Just relax and
try to understand how everything works
Mathieu
2008/5/1 Pat K. [email protected]:
2008/5/1 Pat K. [email protected]:
your fantasdic is work! Can you tell me step of creating gnome to exe.
you use rubyscript2exe?? and what’s gnome version you use? sorry for my
bad english.
I didn’t use rubyscript2exe. As I said, this is simply an archive
containing everything necessary. People just have to unzip and that’s
it! The trick is that it uses relative paths.
- Remove fantasdic and put your application instead
- Your main ruby file must add the directory of the extensions to
$LOAD_PATH (see lib/fantasdic/bin/fantasdic and you’ll see)
- You must adjust the path to your main rb file in
lib/fantasdic/win32/fantasdic.c and recompile it. I used DevC++.
I would think those are the only things you need to change in my
archive.
Mathieu