Results 1 to 10 of 17

Thread: Application icon for Linux

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by Andru View Post
    No, icons can't be inside the executable and shows somewhere in file browser/etc. You can show your icon only in menus/etc. For this you need to place your icon into /usr/share/pixmaps(with name equal to executable). Or if you can provide different sizes for icon then place them here: /usr/share/icons/hicolor/size/apps.
    That means the only way to supply a icon is to have some kind of installer, right?

  2. #2
    to have some kind of installer, right?
    Yes, and this "some kind of installer" is a "package"(most popular - deb and rpm). But different GNU/Linux distros use different type of packages.

  3. #3
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Although if you made a deb/rpm solution you'd cover roughly 80% of the linux market, I know a lot of people are now distributing tar.gz packages with a install.sh script which is nice since it build from source/.a and .o files upon installation and does all the dirty work - be it debian, redhat, the pacman system arch uses etc... All you'd need in the dep list are the fpc meta package and the appropriate dev libs. Although, you could include the *-dev .so files in your gz archive...

    The niceness of just doing a
    Code:
    tar xvf somepackage.tar.gz
    cd somepackage
    sudo ./install.sh
    In 50 less keystrokes thanks to tab in tty is so nice for the end user.... even the make $ make install route is nice
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  4. #4
    I see, but does that means that the package needs to include the source?
    This is a comercial project, also available for other platforms, so I don't want to release the source for now.
    Right now I've simply put the compiled executable along with the resource files in a tar.gz file, would there be any problem with this approach?

  5. #5
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Unless I am mistaken you could just include the .a and .o file and then just do the linking on the target - I recall some closed source codecs and etc worked that way...

    In your instance (executable in tar.gz) I guess you would just have to link it dynamically and hope for the best - just be warned that if any bugs arise with this setup, you cant ask for compiler messages and you may end up having a super fun time with clients... Or at least thats my experience with the last Ludum dare fiasco.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  6. #6
    I see, but does that means that the package needs to include the source?
    If you don't use libraries with GPL-like license(or LGPL with static linking) - then no need to include source code. For Linux rules of opening source code is the same as for other platforms

  7. #7
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537
    I do not use Linux so my suggestion could be hopelessly wrong.

    Could your executable not create the icon in the correct directory(ies) on first run? So the executable starts up, checks in the directory for the icon file, if it does not find it, creates/copies it and carries on.

    As part of your install process/instructions you could just execute the program once to create the icons.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •