×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    94

    How to specify different exe and application name in the pro file

    I would like my QT application to be called “hello” but the exe name to be hello_20032457.exe.

    This is normal practice for Symbian. Exe file names must be unique otherwise you can get a potential problem when installing if a file with the same name already exists. To prevent this problem it is normal practice to append the uid to the exe name to make a name that is unique.

    The name of the application is specified by the app_file in the RESOURCE APP_REGISTRATION_INFO in the resource file. With a native Symbian app you can edit this file. The problem in QT is this resource file is automatically generated from the .pro file but there does not seem to be any way in the pro file to specify different application name and file names.

    This is what the documentation says
    http://doc.qt.nokia.com/4.6/qmake-va...#bld-inf-rules

    “Note: You should not use RSS_RULES variable to set the following RSS statements: app_file, localisable_resource_file, and localisable_resource_id.
    These statements are internally handled by qmake.”

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: How to specify different exe and application name in the pro file

    Even i do not know how to specify different exe and application name in the pro file, but alternatively you can use your custom .pkg file (just copy past template .pkg file, rename it, modify it and use it) to add one or more exe file to your application or rename existing exe files.

  3. #3
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: How to specify different exe and application name in the pro file

    In the other platforms supported by Qt it's possible to set the name of the application defining the variable "TARGET" into the project file.
    In case this var is not specified, qmake uses the name of the directory that contains the sources.

    TARGET = application_name

  4. #4
    Registered User
    Join Date
    Jan 2009
    Posts
    94

    Re: How to specify different exe and application name in the pro file

    Changing the pkg file does not help. That just changes the name of the package, this is the name that is displayed when the sis file is installed or un-installed.

    The TARGET entry in the pro file is the issue. This seems to set the name of the exe and the name of the application from the registration resource that is displayed on the phone. As this controls both names it seems impossible to have different application names and exe file names ?

    Also the same issue with the long and short application name, both in the registration resource file, there is no way to make them different. I could easily fix my issue by editing this resource file, but my changes are over written by QT?

  5. #5
    Regular Contributor
    Join Date
    Oct 2008
    Location
    Oslo, Norway
    Posts
    329

    Re: How to specify different exe and application name in the pro file

    Quote Originally Posted by jscurtis View Post
    Also the same issue with the long and short application name, both in the registration resource file, there is no way to make them different. I could easily fix my issue by editing this resource file, but my changes are over written by QT?
    True, there's no officially supported way of changing Symbian application caption strings (defined in .loc file) through a .pro file. See QTBUG-4850

    Above bug report links to some ideas how to work around the issue, but all of them require manual editing of qmake-generated files...

    Here's one hack more, using an extra makefile target and perl commands to modify the .loc file. It's not any more elegant than the rest, but at least it does things automatically.

    Code:
    TARGET = hello_20032457
    TARGET.NAME = HelloApp
    
    # ...
    
    symbian: {
        modify_caption.target = $${TARGET}.loc.~
        modify_caption.depends = $${TARGET}.loc
        modify_caption.commands = perl -i.~ -p -e \"s/$${TARGET}/$${TARGET.NAME}/g;\" $${TARGET}.loc
                         
        QMAKE_EXTRA_TARGETS += modify_caption
        PRE_TARGETDEPS += $${modify_caption.target}
        QMAKE_DISTCLEAN += $${modify_caption.target}
    }
    Last edited by treinio; 2010-06-22 at 12:13. Reason: Added modify_caption.depends

  6. #6
    Registered User
    Join Date
    Jan 2009
    Posts
    94

    Re: How to specify different exe and application name in the pro file

    Thanks Treinio, this is a very useful "hack"

Similar Threads

  1. Replies: 10
    Last Post: 2008-12-29, 14:50
  2. How to read application .exe file
    By dathom in forum Symbian
    Replies: 8
    Last Post: 2007-07-05, 22:45
  3. How to read application .exe file
    By dathom in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2007-07-05, 16:13
  4. Replies: 10
    Last Post: 2006-10-10, 11:48
  5. Replies: 0
    Last Post: 2005-04-18, 15:18

Posting Permissions

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