Development/Tutorials/Deploying Qt Ruby Applications as a Debian packages for Kubuntu: Difference between revisions

From KDE TechBase
mNo edit summary
(Added some FHS layout info)
Line 1: Line 1:
<br> '''Notice''': Undefined index: title in '''/home/wikis/public/mediawiki_src/LocalSettings.php''' on line '''40'''
'''Deploying Qt Ruby Applications as a Debian packages for Kubuntu'''  
'''Deploying Qt Ruby Applications as a Debian packages for Kubuntu'''  


Line 15: Line 13:
Fortunately there's tools to help you out on your mission. The <tt>ruby-pkg-tools</tt> suite on Kubuntu contains utilities to help you build your Debian packag. More info on it is available at this [http://pkg-ruby-extras.alioth.debian.org/ruby-pkg-tools/index.html link].  
Fortunately there's tools to help you out on your mission. The <tt>ruby-pkg-tools</tt> suite on Kubuntu contains utilities to help you build your Debian packag. More info on it is available at this [http://pkg-ruby-extras.alioth.debian.org/ruby-pkg-tools/index.html link].  


<code bash="bash"> sudo aptitude install ruby-pkg-tools </code>
<code bash="bash"> sudo aptitude install ruby-pkg-tools </code>
 
= Get Your Application Structure into Shape  =
 
Ok, so as we said earlier the FHS mandates a particular structure for application. We need to put our app on a diet and fit it into this structure! I'm not a 100% sure on this bit it works but will can flesh it out as this article matures. I have a simple app called benchmarkmaster and this is the structure I've used to try to be FHS compliant
 
<code bash="bash">
benchmarksman.rb            # My top level file that kicks off the app.
bin/
  benchmarksman            # A symlink to ../benchmarksman.rb
lib/
  benchmarksman/
      breaker.rb            # Holds a class Breaker that does domain logic.
      ui/                  # Directory holding Qt4 Designer files.
          dashboard.ui      # The Qt4 Designer file (can prob nuke this!).
          dashboard_ui.rb    # The proxy rb file generated by rbuic4.
      view/                # Directory holding presentation logic classes.
          dashboard.rb      # Subclasses dashboard_ui.rb - my presentation.
</code>  


= Download setup.rb - A script that does the hard work so you don't have to (do too much!)  =
= Download setup.rb - A script that does the hard work so you don't have to (do too much!)  =


*Click the Download Latest link at http://i.loveruby.net/en/projects/setup/
*Click the Download Latest link at http://i.loveruby.net/en/projects/setup/

Revision as of 22:35, 25 August 2009

Deploying Qt Ruby Applications as a Debian packages for Kubuntu


Introduction

To share your wonderful application with others you need to have package it up in a standard format. Packaging up Ruby applications for Linux distributions is something that is historically a bit of a controversial subject. One reason for this is that the Debian-based package management software in Kubuntu apt fills a similar role as rubygems, the package management software for Ruby across all Operating Systems. In Linux distros, the File Hierarchy Standards (FHS) mandates a layot for applications to adhere to so that an application's libraries, configs and documentation go in the right place. This is sometimes difficult for Ruby applications. However, fear not! Here's your guide to getting from developers Ruby app to a Debian package.


Install the Appropriate Packages

Fortunately there's tools to help you out on your mission. The ruby-pkg-tools suite on Kubuntu contains utilities to help you build your Debian packag. More info on it is available at this link.

sudo aptitude install ruby-pkg-tools

Get Your Application Structure into Shape

Ok, so as we said earlier the FHS mandates a particular structure for application. We need to put our app on a diet and fit it into this structure! I'm not a 100% sure on this bit it works but will can flesh it out as this article matures. I have a simple app called benchmarkmaster and this is the structure I've used to try to be FHS compliant

benchmarksman.rb # My top level file that kicks off the app. bin/

  benchmarksman             # A symlink to ../benchmarksman.rb

lib/

  benchmarksman/
      breaker.rb            # Holds a class Breaker that does domain logic.
      ui/                   # Directory holding Qt4 Designer files.
         dashboard.ui       # The Qt4 Designer file (can prob nuke this!).
         dashboard_ui.rb    # The proxy rb file generated by rbuic4.
      view/                 # Directory holding presentation logic classes.
         dashboard.rb       # Subclasses dashboard_ui.rb - my presentation.

Download setup.rb - A script that does the hard work so you don't have to (do too much!)