Intro
Intro Creating your app Editing the UI Writing Code Packaging
Intro
What is Quickly?
- Application templating system
- Boiler plate
- Commands
- Integration with infrastructure
- Opinionated choices
- shell completion
- Easy and fun
Quickly in Karmic
- 0.2.5
- First iteration of quickly and ubuntu-project template
- Only one template
- PPA support is there, but a bit brittle
- $quickly tutorial up to date
Quickly in Lucid
- 0.4.0
- Second iteration with 2 or 3 templates
- ubuntu-application, ubuntu-cli, maybe ubuntu-arcade
- $quickly tutorial not up to date yet
Installing Quickly
- $sudo apt-get install quickly
- Lots of dependencies, so a slightly large download
- Sets up lots of useful tools
Creating your app
- 0.2.5: quickly create ubuntu-project appname
- 0.4: * quickly create ubuntu-application appname
- Creates a working application
naming
- In 0.2.5/karmic, only support for one work names
- In 0.4.0/Lucid, support for multi-work names
Editing the UI
- Code files and glade files linked by naming
- automatially hooked up for you
Glade Command
- within project directory
- 0.2.5 $quickly glade
- 0.4.0 $quickly design (support non-gnome templates)
- Must use this command, project won't work otherwise
Glade Tips and Tricks
- Fill tool-like interacton
- Selecting in the inspector
- layout via boxes, VBoxes and HBoxes
- Changing position in a Box
- pack_start, pack_end
- Fill and expand control sizing, auto layout on window resizing
- Border and padding control spacing
- Use stock items when possible
- add dialogs with the "dialog" command
- 0.2.5: $quickly dialog dialogname
- .4: $quickly add dialog dialogname
- import the dialog
- use New*Dialog()
d = New*Dialog() response = d.run() if response == gtk.RESPONSE_OK:
- #do your stuff
Signals
- In glade on signal tab
- for buttons, use both clicked and activated
- for menus, just activated
- writing signal handlers
def handlername(self, widget, data=None):
- #do your stuff #widget is the sender
Writing Code
finish_inishializing versus init()
Debugging and Testing
print statements
- most common and easiest
- leaves print statements in code, need to be deleted
Logging
- won't cause debug output to be printed in normal run
- a bit broken at the moment
debugger
- pdb is a command line debugger, works well, but is a bit hard to use
- there are graphical debuggers built into some IDEs
Packaging
- For sharing apps via email, or dropping a file somewhere
- quite forgiving
setting up your app for packaging
- add your name and email to the copyright file
- issue license command
- Edit *.desktop.in to define category
- add author, email, description, long description to setup.py
- $quickly package
Creating a deb
- $quickly package
- try it out
PPAs
- a bit less forgiving than package
- create ssh keys as per launchpad instructions (will need for release)
- create pgp keys as per launchpad instructions
- Don't use a comment!
- set DEBEMAIL and DEBFULLNAME in .bashrc, the same as what was in your gpg key
- match gpg --list-secret-keys
export DEBEMAIL=rick.spencer@canonical.com export DEBFULLNAME=Rick Spencer
- Create a PPA
- for 0.2.5 call it only "ppa", nothing else will work
- 0.4.0 will allow you to choose a ppa
- To release, you need to create a project in launchpad
- $quickly share - puts latest in your ppa
- $quickly release - does the same but also increments version and makes an announcement
UbuntuOpportunisticDeveloperWeek/Quickly/Intro (last edited 2010-03-01 15:55:46 by 63)