Rich
rich****@lithi*****
Mon Jun 7 04:52:23 JST 2004
You're code worked pefectly... but I'm having some problems... Maybe I can explain them without posting the code (which isn't in the greatest of shape). I need to generate the EXR file automatically using code similar to what you provided before... ... and I'm using a BMP file for an icon in an FXRuby application, which I tried to include, but can't seem to get at, and I'm wondering if I can still perform an "rb" type of open on the file... (File.open('file_name','rb')) I hope this makes sense! Thanks so much for all of your help! -Rich ----- Original Message ----- From: "Yuya Kato" <yuya****@katod*****> To: "exerb-eng" <exerb****@lists*****> Sent: Sunday, May 16, 2004 10:21 AM Subject: [exerb-eng:0053] Re: Is there a way to change the Icon? > Hi Rich, > > On Fri, 14 May 2004 07:19:51 -0600 > Rich <rich****@lithi*****> wrote: > > > Does anyone know how to change the icon for my exe? > If you using Exerb 3.0.0 or later, you can change > an icon by the following code. > > require 'exerb/recipe' > require 'exerb/executable' > > icon16 = Exerb::Resource::Icon.new_from_file('your_icon.ico', 16, 16, 4) # 16x16 4bit-color > icon32 = Exerb::Resource::Icon.new_from_file('your_icon.ico', 32, 32, 4) # 32x32 4bit-color > group_icon = Exerb::Resource::GroupIcon.new > group_icon.add(1, icon16) > group_icon.add(2, icon32) > > recipe = Exerb::Recipe.new_from_file('your_recipe.exr') > executable = Exerb::Executable.new_from_file('../data/exerb/ruby181g.exc') > executable.rsrc.add_archive(recipe.archive) > executable.rsrc.add_icon(1, icon16) > executable.rsrc.add_icon(2, icon32) > executable.rsrc.add_group_icon(100, group_icon) # No.100 is main icon > executable.write_to_file('your_exe.exe') > > ====== Yuya Kato ====== > E-Mail yuya****@katod***** > Web http://nuance.cc/ > i-mode http://nuance.cc/i/ >