Hot answers tagged application-development
9
One fast and easy option is Quickly.
Creating a project is as easy as typing this at terminal:
quickly create ubuntu-application my-new-project
See this intro video.
Also this is a great site: http://developer.ubuntu.com/get-started/
And, of course, the manual: man quickly
You will be using python.
6
In general, I'd recommend using the toolkit supported ways to put menus in the global menubar... but, I'm assuming it's too late to convince you at this point :-) Also, I'll note that even thought we're using Dbusmenu and registration in 12.04 the goal is to move to GMenuModel and marking the window with its menus by 14.04, so this information will become ...
6
Blender can make a 3D Game with Python: http://www.blender.org/features-gallery/features/
Is posible to make a simple hello world game there, its fully integrated with Sound, Physics simulation, GLSL, plugins for a lot of things (Networking and Web plugin included), good and professional workflow.
3D Platformer: http://www.youtube.com/watch?v=BGqyvX4P6Pg
...
6
Because Java bytecode is portable, there isn't much difference between writing a Java app for Windows and writing one for Ubuntu. You can use Swing or SWT for your GUI.
You can also write native-looking apps in Java with JGIR. JGIR will let you use Gtk3 to build your application.
6
Those three commands are intended as three levels of "officialness" to your release.
share
share does 2 main things:
Packages your software with a version suffix like -public1
Uploads that package to a PPA
So it's good for quickly getting code to testers. Ideally you'd use a separate PPA from your normal releases.
release
release does the same thing ...
5
share - This command lets you share your current developmental snapshot of your product. You should be using this command if you have added minor features or fixed bugs in your application.
release - This command allows you to create a new release of your application. You should be using this command if you have added major features to indicate that it has ...
5
Getting started quickly, so to say
The easiest thing to do is to base your first template on an existing one, and modify it to your needs. After running the following command, you'll have an ubuntu-application-qt template based on the ubuntu-application original template. You'll find it on /home/$USER/quickly-templates, ready to modify to your heart's ...
5
Just like on any operating system you will need to choose a programming language that can use OpenGL for graphics. Then just develop the game.
Since a lot of applications on Ubuntu are open source you can find one in the software center that is free and use the following command:
sudo apt-get source gameName
That will give you an idea of how games that ...
5
Here's an example of making a Checkbox type Quicklist menu item:
# Create toggle-able menu item for urgency
urgent_menu_item = Dbusmenu.Menuitem.new ()
# Set the tab's name as the menu item's name
urgent_menu_item.property_set (Dbusmenu.MENUITEM_PROP_LABEL, _('Urgent'))
# Make the menu item toggle-able
...
5
Check out the Python example in the Unity developer documentation, and try hello-unity (only compatible with Ubuntu 12.04). These are good places to start.
Here's some bit of Python code that will make your app's icon wiggle in the launcher. It's for Ubuntu 12.04, but looking at the API documentation, it should also work for 11.10.
from gi.repository ...
5
I've found a solution: use the locale Python module instead of gettext
import locale
from locale import gettext as _
locale.bindtextdomain('qreator', '/opt/extras.ubuntu.com/qreator/share/locale/')
locale.textdomain('qreator')
Thanks to Juha Sahakangas on the #gtk+ IRC channel for providing the explanation:
For this particular case the locale module ...
4
You can also try to have a look at the help for the add command. You can do either of these:
invoke the quickly help add command
invoke the quickly tutorial command and browse to the add command reference
From the outupt of quickly help add
For instance 'quickly add dialog dialog-name' will create:
A subclass of Gtk.Dialog called DialogNameDialog in ...
4
You can move content area (GtkVBox) from GtkDialog to another GtkContainer, and then append to GtkNotebook - using gtk.Widget.reparent() method.
about = Gtk.AboutDialog()
about.set_program_name ("Application")
about.set_copyright ("Author")
box = Gtk.VBox ()
about.vbox.reparent (box)
notebook.append_page (box, Gtk.Label("About"))
about.destroy ()
With ...
4
Have you checked out PyGame? it is a great library for making games. There is lots of games already made that you can read the code and learn a thing or two. I am currenlty devoting my free time in learning to make a platform game just for the sake of learning. I will post my learnings and reply later with some actual work
Please do check out ...
4
Both PyQt4 and PySide have very similar mappings to the Qt API. There are, however, some differences, my opinions on which are described below:
Maintenance
They are both well maintained. The PySide produces a lot more regular releases at the moment: I think it's more closely linked to Qt than PyQt4 and as a newer project has a more active community at ...
3
Panda3D is a nice cross platform game library for Python and C++. It's developed and maintained by a group at Carnegie Mellon, and it has been used in a few commercial titles. It adds simpler abstractions over OpenGL, OpenAL, and Bullet, and there are a number of getting started examples available, including a 2D asteroids game.
http://www.panda3d.org/
...
3
Here's how you can get the downloads folder for any user in Python:
import glib
downloads_dir = glib.get_user_special_dir(glib.USER_DIRECTORY_DOWNLOAD)
Documentation:
get_user_special_dir() function
Special dir constants
3
You can do this easily from NetworkManager's pygi bindings:
from gi.repository import NetworkManager, NMClient
nmc = NMClient.Client.new()
devs = nmc.get_devices()
for dev in devs:
if dev.get_device_type() == NetworkManager.DeviceType.WIFI:
for ap in dev.get_access_points():
print ap.get_ssid()
Or from DBus directly, see
...
3
As far as accessing the platform directly, you should check out Seed.
You might also take a look at UserWebKit, the Python3 library that provides the key functionality used by the Novacut and Dmedia UI (it's built atop UserCouch and Microfiber, BTW).
After a lot of thought, I decided it was more interesting to not access the platform directly from ...
3
No. You can install 32-bit software on an x64 bit machine but you can not install x64 based software on a 32-bit machine.
http://www.techsupportalert.com/content/32-bit-and-64-bit-explained.htm
This rule applies to all Operating Systems.
3
Quickly is building the package just fine, it's simply that you haven't specified the package descriptions (the short one and the long one) for your app.
Try the following:
Uncomment the description and long_description lines in setup.py
Add the description for your app
Re-run the quickly package command
That should sort it out.
3
I'm not sure is it correct, but I'm using something like this:
checkbox:
def check_item_activated_callback (menuitem, a, b):
if menuitem.property_get_int (Dbusmenu.MENUITEM_PROP_TOGGLE_STATE) == Dbusmenu.MENUITEM_TOGGLE_STATE_CHECKED:
menuitem.property_set_int (Dbusmenu.MENUITEM_PROP_TOGGLE_STATE, Dbusmenu.MENUITEM_TOGGLE_STATE_UNCHECKED)
...
3
You can use the xapian DB directly:
import xapian
db=xapian.Database("/var/cache/software-center/xapian")
for m in db.postlist(""):
appname = db.get_document(m.docid).get_data()
Or the internal software-center API:
import sys
sys.path.insert(0, "/usr/share/software-center/")
import softwarecenter.db.database
db = ...
2
You can't test a lens without installing it. If you don't want to do that on your system you can always use a VM.
You can use DFeet to watch what's going on over DBus, but it does require a fairly good understanding of what should be going on over DBus to make sense of it.
2
What version of Ubuntu are you on? At this point, you actually shouldn't be able to use PyGI with any of the old static pygobject stuff. If this was working, it was pretty much by accident. On Precise anyway, if the order of the imports is reversed, you get an exception explaining the issue:
>>> import gst
>>> from gi.repository import ...
2
While I'm sure there's a fancier python solution, the down and dirty version is to use gksudo. gksudo does the same thing sudo does, except it creates that dialog for authentication you mentioned instead of asking on the command line.
See https://help.ubuntu.com/community/RootSudo#Graphical_sudo
2
The issue is a problem with the Ambiance theme. There is a highlight, but the background color for the prelight is darker. If thunderbird is showing a light highlight and inverting the colors of the icons, then it is because it's using custom widgets in XUL (which isn't Gtk+), which aren't following the GTK+ or icon themes, for everything.
2
Ok, what your code does is, it lets the second window get destroyed. After that its gone.
You can either keep the window from being destroyed (and hide it instead) by adding these two lines at the end of your init method:
secondwindow = self.builder2.get_object('window1')
secondwindow.connect('delete-event', lambda w, e: w.hide() or True)
which replaces ...
2
Correct, the pygame template was removed in Ubuntu 12.04, in this commit.
IIRC the rationale was that the pygame template was using desktopcouch as a dependency, which is deprecated. My understanding is that it was easier to remove the template rather than reworking it to get rid of desktopcouch, as someone mentioned that pygame would be better implemented ...
2
Use the package python-apt , there are docs in /usr/share/doc/python-apt
For example to get a list of all installed packages use
import apt
cache = apt.Cache()
installed_packages = [p for p in cache if p.is_installed]
As the Software Centre is written in Python you may want to have a look at its source code as well.
Only top voted, non community-wiki answers of a minimum length are eligible