[Rubygems-developers] Proper way to include non-C code extensions / QtRuby designer UI files to a Gem
Robert J. Berger
rberger at ibd.com
Wed Jan 31 17:53:54 EST 2007
I have a project that utilizes qtruby and output of the QT Designer
The output of the QT Designer tool are XML files (*.ui) that are then
converted into Ruby files using a qtruby tool rbuic.
There are also some image files (*.png or *.jpg) that need to be
converted to a single ruby file also using rbuic.
I would like to include these source files in the gem and have the
gem install process run the rbuic commands (ideally based on
dependencies and thus using Make or Rake). And then put the files in
the proper place so they will be part of the require heirarchy for
the rest of the Ruby code in the project's lib directory.
So what would be the "Best Practices" to do this?
Would they go in the ext directory and I create a extconf.rb that
builds them or builds a make or rake file to build them? If so, do
they go right into the target install library directory or first into
the local lib directory?
Or should I create its own ui directory and have the main rakefile
that is installing the gem run the rbuic process as a set of tasks?
Or is there another way that is most proper?
Before trying to make it into a gem, I had the ui files in the same
directory as the rest of my ruby files and had a makefile that ran
the rbuic process:
$(RBUIC) -x $< -o $@
$(RBUIC) $< -o $@
$(RBUIC) -embed skydriver \
rm -f $(RBUICIMPLS)
Robert J. Berger - Internet Bandwidth Development, LLC.
Voice: 408-882-4755 eFax: +1-408-490-2868
"Until Windows is outlawed, Bots will own Windows."
More information about the Rubygems-developers