×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    190

    Exclamation PACKAGE File (Pkg): IF/ELSE Condition

    Take a look into the following package file:

    ----------------------------------------
    Code:
    ; Application Content

    ;Language - standard language definitions
    &EN

    ; standard SIS file header
    #{"Content Name"},(0x0F2B609E), 1, 0, 0, TYPE=SISUPGRADE

    ;Supports Series 60 v 2.x
    (0x101F6F88), 0, 0, 0, {"Series60ProductID"}

    ;The dependency:
    (0x0F2B609E), 1, 0, 0, {"App Name"}

    ; Files to copy

    "C:\Symbian\7.0s\Series60_v20_CW\Epoc32\winscw\c\system\Apps\MYAPP\File.amr"-

    IF exists("C:\system\apps\MYAPP\MYAPP.app")
    "C:\system\apps\MYAPP\File.amr"

    ELSEIF exists("C:\system\apps\MYAPP\MYAPP.app")
    "E:\system\apps\MYAPP\File.amr"

    ELSE
    "appnotfound.txt"-"", FILETEXT, TEXTEXIT

    ENDIF
    ----------------------------------------

    I made this package file to detect the drive on which the application is installed and then install the content on same drive.

    But i am facing a problem while making SIS from this pkg file. Some error returned when i run makesis:

    ----------------------------------------
    Processing MYAPPContent.pkg...
    MYAPPContent.pkg(19) : Expected quoted string read IF
    MYAPPContent.pkg(19) : error: unexpected text
    ----------------------------------------

    I might be doing something wrong. Kindly suggest.

  2. #2
    Regular Contributor
    Join Date
    Jun 2006
    Posts
    230

    Re: PACKAGE File (Pkg): IF/ELSE Condition

    Hi,

    As far as my knowledge is concern, u don't have to take the condition in pkg file. Infact pkg file is made by system only.so keep it as it is.

    Symbee

  3. #3
    Registered User
    Join Date
    Jul 2005
    Posts
    190

    Re: PACKAGE File (Pkg): IF/ELSE Condition

    For your information dear, it is not the system which makes the package file.

    Package file is created by the developer according to their needs.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,748

    Re: PACKAGE File (Pkg): IF/ELSE Condition

    It might worth a try to check if !:\ is automatically treated as the original installation drive (without re-asking the user) for SISUPGRADE packages.

  5. #5
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: PACKAGE File (Pkg): IF/ELSE Condition

    You can't split the package body

    "C:\Symbian\7.0s\Series60_v20_CW\Epoc32\winscw\c\system\Apps\MYAPP\File.amr"-

    between the if statement, you will need to duplicate in each place inside of the if condition

  6. #6
    Registered User
    Join Date
    Jul 2005
    Posts
    190

    Exclamation Re: PACKAGE File (Pkg): IF/ELSE Condition

    Quote Originally Posted by Paul.Todd
    You can't split the package body

    "C:\Symbian\7.0s\Series60_v20_CW\Epoc32\winscw\c\system\Apps\MYAPP\File.amr"-

    between the if statement, you will need to duplicate in each place inside of the if condition
    Yes you are right Paul.Todd, BUT in that case the size of SIS will be increased by two times.

    Suppose if i have only one file 'A' of size 100KB, and i use the following condition:
    ---------------------------
    IF condition
    "C:\dir\A"-"C:\target"
    ELSIF condition
    "C:\dir\A"-"E:\target"
    ---------------------------

    Then the SIS file size becomes 200KB as it includes the same file 'A' twice.

    Any idea or suggestion to overcome this issue..!

  7. #7
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: PACKAGE File (Pkg): IF/ELSE Condition

    Either ship two sis files or as hu says, check to see if "!" can be used to allow the user to specify where the file is to be installed, then have you application check each drive for the file

  8. #8
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    131

    Re: PACKAGE File (Pkg): IF/ELSE Condition

    IF NOT exists("!:\RSevenDB.db")
    "$(EPOCROOT)epoc32\winscw\c\RSevenDB.db" -"!:\RSevenDB.db"
    ENDIF

    i've tried using the code above, but somehow the db file is still replaced everytime i install the sisx, why is this so? anyway to NOT replace the db file bcos i wan to keep my tracking in db permenant whenever there is a new release of the sisx

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,748

    Re: PACKAGE File (Pkg): IF/ELSE Condition

    I am not sure if EXISTS keyword can deal with !, and it can behave strangely besides that too.
    You can try installing the database to an other file, and rename it in runtime if the "main" database does not exist. However if your database contains constant initial data (or it is simply empty), you should rarther consider simply creating it on the device on first use.

  10. #10
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    131

    Re: PACKAGE File (Pkg): IF/ELSE Condition

    thanks, i've managed to do what i want with this:
    "" -"!:\RSevenDB.db", FN
    instead,

    and using a file session to check for existance in code and create using code the db file

Similar Threads

  1. Playing AMR file is solved, Here is the solution.
    By khurshed79 in forum Symbian Media (Closed)
    Replies: 8
    Last Post: 2007-12-19, 06:11
  2. pkg file format
    By kingkiko in forum Symbian
    Replies: 1
    Last Post: 2006-04-27, 17:07
  3. Tips on using NDS 1.1
    By mitts in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2006-01-18, 16:07
  4. pkg file?
    By nimbus12345 in forum Symbian
    Replies: 3
    Last Post: 2004-02-29, 14:44
  5. Package file for updating an application
    By pappago in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-07-23, 12:24

Posting Permissions

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