×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    56

    Create text file before installation start

    Hi,

    i have a project with pkg file as follows

    #{"TestApp"},(0x12345sdd),1,0,0

    ;Localised Vendor name
    %{"Vendor-EN"}

    ;Unique Vendor name
    :"Vendor"

    ;Supports Series 60 v 3.0
    [0x101F7961], 0, 0, 0, {"Series60ProductID"}

    ;Files to install
    ;You should change the source paths to match that of your environment
    ;<source> <destination>

    "..\data\test.txt"-"C:\test.txt"

    "$(EPOCROOT)Epoc32\data\z\resource\apps\TestApp_0x12345sdd.rsc" -"C:\resource\apps\TestApp_0x12345sdd.rsc"
    "$(EPOCROOT)Epoc32\data\z\private\10003a3f\apps\TestApp_0x12345sdd_reg.rsc" -"C:\private\10003a3f\import\apps\TestApp_0x12345sdd_reg.rsc"
    "$(EPOCROOT)Epoc32\data\z\resource\apps\TestApp_0x12345sdd.mif" -"C:\resource\apps\TestApp_0x12345sdd.mif"
    "C:\Symbian\Carbide\workspace\TestApp\data\[12345sdd].rSC"-"C:\private\101f875a\import\[12345sdd].rSC"


    @"SampleUI.sis", (0x143d67fe)

    "$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\TestApp_0x12345sdd.exe"-"!:\sys\bin\TestApp_0x12345sdd.exe"


    i m using existence of "C:\\test.txt" file to show some warning text during installation of SampleUI.sis

    but when installaion of SampleUI.sis starts test.txt file does not created at that time, How can i create it before start installation of SampleUI.sis file.

    How can i use RW and RI for creating text file ?


    Regards
    MasterMindSolutions

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: Create text file before installation start

    I think below mentioned description will help you out:

    To show ur file in dialog box use FT, the you can use TC, TA according to your requirment.

    FT-> text file that is displayed in a dialog box during installation. The dialog's type is determined by the text-options specified (documented below). Text files are not installed on the target device, so the target location is empty. An example FILETEXT line is:


    TEXTCONTINUE
    TC
    It is recommended that the UI displays a dialog containing a Continue button. On exiting the dialog, installation continues regardless of the dialog's return value.

    TEXTABORT
    TA
    It is recommended that the UI displays a dialog containing Yes/No buttons. The software installer continues with the installation if the dialog returns true (user pressed Yes). It will abort the installation if the dialog returns false (user pressed No).

    TEXTEXIT
    TE
    Same as TEXTABORT



    "text\textfilec.txt"-"", FT, TC
    Regards,
    Shafali

  3. #3
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    56

    Re: Create text file before installation start

    Thanks for reply, this will show a dialog to user but i will do not show any dialog to user, just check txt file before start of installation.

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: Create text file before installation start

    Quote Originally Posted by mastermindcoders View Post
    Thanks for reply, this will show a dialog to user but i will do not show any dialog to user, just check txt file before start of installation.
    Not possible before you explicitly put that file in your device or by installing application(.pkg file will supply it for you if there is any such entry).
    Nokia Developer Wiki Moderation team

  5. #5
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    56

    Re: Create text file before installation start

    Thks for reply, if i want to place a new file based on some file check that if old file exists than place new file,how can i do that or can i execute a line of code at the end of pkg installation.

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: Create text file before installation start

    Quote Originally Posted by mastermindcoders View Post
    Thks for reply, if i want to place a new file based on some file check that if old file exists than place new file,how can i do that or can i execute a line of code at the end of pkg installation.
    There is an if exists clause used in .pkg file. Check this for an example: http://wiki.forum.nokia.com/index.ph...l_Installation.
    Nokia Developer Wiki Moderation team

  7. #7
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    56

    Re: Create text file before installation start

    i have already used exists() but at that time file is not created that i have to check, how can i create it first, is it possible.

  8. #8
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: Create text file before installation start

    Embedded sis file is executed first, prior to your other entries in the .pkg file. So you may not check the existence of your test.txt at the time of SampleUi.sis execution. You can create another .sis file which will install test.txt but it will be overkill and you cannot be sure of the order of execution of embedded sis files within one .pkg file.
    Nokia Developer Wiki Moderation team

  9. #9
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    56

    Re: Create text file before installation start

    can u send me a sample code of this.

  10. #10
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: Create text file before installation start

    Quote Originally Posted by mastermindcoders View Post
    can u send me a sample code of this.
    There is no such sample code! I meant to say that you can create one sis file which has a single entry for supplying a test.ext file. Embedd that .sis file alongwith your main .pkg file entries:

    Code:
    @SupplyTestFile.sis
    @SampleUi.sis
    
    "$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\TestApp_0x12345sdd.exe"-"!:\sys\bin\TestApp_0x12345sdd.exe"
    ...
    ...
    But this does not sound a good idea to me. I'm not sure if there is any better approach. Read my previous post again.
    Nokia Developer Wiki Moderation team

  11. #11
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    56

    Re: Create text file before installation start

    i have already did in this way but when SampleUI.sis start installation file not found but file is already created there.

  12. #12
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: Create text file before installation start

    Quote Originally Posted by mastermindcoders View Post
    i have already did in this way but when SampleUI.sis start installation file not found but file is already created there.
    Show your different .pkg files. Wrapping the contents with Code tags is welcome.
    Nokia Developer Wiki Moderation team

  13. #13
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    56

    Re: Create text file before installation start

    /////////////////TestApp.sis//////////////////////////////

    #{"TestApp"},(0x12345sdd),1,0,0

    ;Localised Vendor name
    %{"Vendor-EN"}

    ;Unique Vendor name
    :"Vendor"

    ;Supports Series 60 v 3.0
    [0x101F7961], 0, 0, 0, {"Series60ProductID"}

    ;Files to install
    ;You should change the source paths to match that of your environment
    ;<source> <destination>


    @"SupplyTestFile.sis", (0x1002Ad77F)


    "$(EPOCROOT)Epoc32\data\z\resource\apps\TestApp_0x12345sdd.rsc" -"C:\resource\apps\TestApp_0x12345sdd.rsc"
    "$(EPOCROOT)Epoc32\data\z\private\10003a3f\apps\TestApp_0x12345sdd_reg.rsc" -"C:\private\10003a3f\import\apps\TestApp_0x12345sdd_reg.rsc"
    "$(EPOCROOT)Epoc32\data\z\resource\apps\TestApp_0x12345sdd.mif" -"C:\resource\apps\TestApp_0x12345sdd.mif"
    "C:\Symbian\Carbide\workspace\TestApp\data\[12345sdd].rSC"-"C:\private\101f875a\import\[12345sdd].rSC"


    @"SampleUI.sis", (0x13ad343d)

    "$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\TestApp_0x12345sdd.exe"-"!:\sys\bin\TestApp_0x12345sdd.exe"

    /////////////////TestApp.sis//////////////////////////////


    /////////////////SupplyTestFile.sis//////////////////////////////

    // In code i m creating new text file at C:\\test.txt

    #{"SupplyTestFile"},(0x1002Ad77F),1,0,0

    ;Localised Vendor name
    %{"Vendor-EN"}

    ;Unique Vendor name
    :"Vendor"

    "$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\SupplyTestFile_0x1002Ad77F.exe"-"!:\sys\bin\SupplyTestFile._0x1002Ad77F.exe",FR,RI


    /////////////////SupplyTestFile.sis//////////////////////////////







    /////////////////SampleUI.sis//////////////////////////////


    ; SampleUI.pkg
    ; This is an auto-generated PKG file by Carbide.
    ; This file uses variables specific to Carbide builds that will not work
    ; on command-line builds. If you want to use this generated PKG file from the
    ; command-line tools you will need to modify the variables with the appropriate
    ; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
    ; Also, the resource file entries should be changed to match the language
    ; used in the build. For example, if building for LANGUAGE_01, change the file
    ; extensions .rsc to .r01.
    ;
    ;Language - standard language definitions
    &EN

    ; standard SIS file header
    #{"SampleUI"},(0x13ad343d),1,0,0

    ;Localised Vendor name
    %{"Vendor-EN"}

    ;Unique Vendor name
    :"Vendor"

    ;Supports Series 60 v 3.0
    [0x101F7961], 0, 0, 0, {"Series60ProductID"}

    ;Files to install
    ;You should change the source paths to match that of your environment
    ;<source> <destination>

    "$(EPOCROOT)Epoc32\data\z\resource\apps\SampleUI.r01" -"!:\resource\apps\SampleUI.r01"
    "$(EPOCROOT)Epoc32\data\z\private\10003a3f\apps\SampleUI_reg.r01" -"!:\private\10003a3f\import\apps\SampleUI_reg.r01"
    "$(EPOCROOT)epoc32\data\z\resource\apps\SampleUI_aif.mif" -"!:\resource\apps\SampleUI_aif.mif"
    "$(EPOCROOT)epoc32\data\z\resource\apps\SampleUI.mbm" -"!:\resource\apps\SampleUI.mbm"
    "$(EPOCROOT)Epoc32\data\z\resource\[13ad343d].rSC"-"c:\private\101f875a\import\[13ad343d].rSC"


    IF exists("C:\test.txt")

    ;showing text here for confirmation
    "oneiconfilenote.txt"-"" , FILETEXT, TEXTCONTINUE

    "..\data\Icon.mif"-"!:\resource\apps\OneIcon.mif"

    ELSE

    ;showing text here for confirmation
    "alliconfilenote.txt"-"" , FILETEXT, TEXTCONTINUE

    "..\data\AllIcons.mif"-"!:\resource\apps\AllIcons.mif"

    ENDIF

    "$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\SampleUI.exe" -"!:\sys\bin\SampleUI.exe"

    /////////////////SampleUI.sis//////////////////////////////

  14. #14
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: Create text file before installation start

    How about just supllying the file in question?

    Code:
    /////////////////SupplyTestFile.sis////////////////////////////// 
    
    // In code i m creating new text file at C:\\test.txt 
    
    #{"SupplyTestFile"},(0x1002Ad77F),1,0,0
    
    ;Localised Vendor name
    %{"Vendor-EN"}
    
    ;Unique Vendor name
    :"Vendor"
    
    "..\data\test.txt"-"C:\test.txt"
    See, I used Code tags and it looks better, doesn't it?
    Nokia Developer Wiki Moderation team

  15. #15
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    56

    Re: Create text file before installation start

    i have also try this code that u suggested but fails

Similar Threads

  1. Problem with GCCE build in Carbide.vs
    By raffaelbechara in forum Symbian
    Replies: 6
    Last Post: 2008-10-20, 16:06
  2. Contacts fields order??
    By timatima in forum Symbian
    Replies: 1
    Last Post: 2007-06-08, 13:51
  3. How to create a text file and save it in the INBOX?
    By bakhtiarkamal in forum Symbian User Interface
    Replies: 5
    Last Post: 2006-11-09, 05:49
  4. Tips on using NDS 1.1
    By mitts in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2006-01-18, 16:07
  5. Create MBM file from BMP file.
    By BugBuster in forum Symbian
    Replies: 5
    Last Post: 2003-09-04, 03:25

Posting Permissions

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