×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Eindhoven, the Netherlands
    Posts
    187

    Access to image files on simulator?

    Hi,

    I've recently installed the new Nokia Qt SDK for windows, with the Simulator environment, however i can't seem to access my image files, and can't seem to find the C: and E: drive locations for the simulator...

    Currently i use this on the Phone:
    Code:
    QString GetDrive()
    {
            TParsePtrC appparser(CEikonEnv::Static()->EikAppUi()->Application()->AppFullName());
            TPtrC drive = appparser.Drive();
            return QString::fromUtf16(drive.Ptr(),drive.Length());
    }
    
    
    //Elswhere i load the images:
    #define UIDIR "/private/EA82CEF3/ui/"
        svgClock.load(GetDrive() + QString(UIDIR "clock.svg"));
    And on the N97 emulator i do:
    Code:
    QString GetDrive()
    {
            return QString("C:");
    }
    I have svg files in a 'ui' subdirectory of my application, put there using the DEPLOYMENT option
    in the .pro file.
    Code:
        UiFiles.sources += \
            images/clock.svg \
            images/compass.svg
        UiFiles.path = ./ui
        DEPLOYMENT += UiFiles
    Does anyone know where i can find them, and how i can access them from the Simulator environment?

  2. #2
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Access to image files on simulator?

    Hi,
    deploy in SIS via Pro like this:
    Code:
    symbian: { 
        TARGET.UID3 = 0x2002CAC7
        TARGET.CAPABILITY = "NetworkServices"
        RESOURCES+=symbian.qrc
        HEADERS += s60fon/CPhoneReceiver.h \
        s60fon/MPhoneReceiver.h \
        s60fon/PhoneStateTank.h
        SOURCES += s60fon/CPhoneReceiver.cpp \
        s60fon/PhoneStateTank.cpp    
        LIBS += -lcone \
    		-leikcore \
    		-lefsrv \
    		-lavkon \
    		-lmediaclientaudio \
    		-lmediaclientaudiostream \
    		-lcentralrepository \
    		-lws32 \
    		-letel3rdparty
    	myFiles.sources = rsc\music\*.wav
    	DEPLOYMENT += myFiles
    	moreFiles.pkg_postrules = "\"$(EPOCROOT)epoc32\\data\\z\\resource\\apps\\QtBallZ_icons.mbm\" -\"!:\\resource\\apps\\QtBallZ_icons.mbm\""
    	DEPLOYMENT += moreFiles
    	MMP_RULES +=	"START BITMAP QtBallZ_icons.mbm" \
    					"HEADER" \
    					"SOURCEPATH .\gfx" \
    					"SOURCE c24,1 midicon.bmp midicon_mask.bmp smlicon.bmp smlicon_mask.bmp bigicon.bmp bigicon_mask.bmp" \
    					"TARGETPATH \resource\apps" \
    					"END"
    }
    Access then like this:
    Code:
    TSample CWavLoader::LoadL( const TFileName& aFileName )
      {
      TFileName nameAndPath;
      
      // Get application's private path
      // This is e.g. '\Private\20001978\'
      CEikonEnv::Static()->FsSession().PrivatePath( nameAndPath );
      
      nameAndPath.Append(aFileName);
      ...
    Or, even, better use a Qt resource!

    P.S. I will be at eth0 probably. Find me there!
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  3. #3
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Eindhoven, the Netherlands
    Posts
    187

    Re: Access to image files on simulator?

    Ok, so yet another method to find where the files should be... and i suppose i could give it a try, and look at Qt Resources as well.

    But my real question is not, how to package the files properly for symbian, or how to access them from symbian, on symbian all is well, on the phone my application works as expected.
    Somehow though, the method i use for the phone, and the emulator, doesn't work for the simulator.
    Worse still, i can't even locate the simulator's C: and E: drive at all.... where are they? If i don't know where to look, i can't determine if the files are in the right location...
    They should be somewhere on my host filesystem right? How do I access them from my host?

    I want to add more files to the simulated environment later (not part of the app, but input data to test the app), and may want to look at log files I write from my app. I really need a way to access the simulated device filesystem for that.

  4. #4
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Access to image files on simulator?

    I dunno, does the simulator even have "drives"? It's different from the emulator (which does).

  5. #5
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Access to image files on simulator?

    Quote Originally Posted by danhicksbyron View Post
    I dunno, does the simulator even have "drives"? It's different from the emulator (which does).
    Hi,
    if you want to use it on the simulator, I recommend to use resource files.

    Keep in mind: the SImulator does not support native code. SIS files are to be considered native...
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  6. #6
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Eindhoven, the Netherlands
    Posts
    187

    Re: Access to image files on simulator?

    Hi,

    I understand the differences between the phone build, an emulator build, and to some extend the simulator build... i know i can't run native sis files on anything but the phone.

    I just want to know where I should put files if i want my app to read it asif accessing the C: or E: drives.
    I got lots of tracks, maps, and routes on my phone. With the emulator i could simply copy them over to the proper directory in the SDK tree on the host (Windows XP), so that the application can see them in a file browser, and load them. I want to test with different drives, with drives missing, etc... and I want to be able to save settings, and other data to the filesystem, and then check with an editor on the host if all is well.
    Using resources is _no_ solution for any of that.

    After playing with the simulator for some time, i disovered more issues... and am wondering if the simulator is actually used by anyone here...
    For instance, my dialogs don't appear when my app is running fullscreen (it seems asif they do get focus, since i can't get the main screen to work after that)... this works fine on the phone, and emulator, but not on the simulator. Also when changing rotation while a dialog is active, it usually ends up hiding, thus showing the main screen again, and i can't get to it anymore. Also to get the dialog to be full screen, i have to do a showFullScreen on them too... for the phone and emulator that wasn't necessary.... and last but not least, when i popup a standard info message, it also seems to get hidden behind the main window. Also, all the default font sizes are way too small... I ended up putting my stylesheet full of font statements to correct for that.
    Now perhaps I'm not using Qt entirely correct throughout my app , and some of this behavior may be partially due to my own errors. But the sheer inconsistency i find very disturbing...

    For now, i moved back to Carbide & Emulator, until i find the simulator is more consistent with the behavior on the phone, or there's more information available on how to use the simulator properly.
    Perhaps someone can point me to a place where i can submit bugs for these issues?

    I understand that if you don't have an answer, you can't give it to me. But so far my question, which i thought was a simple one, is still unanswered...


    Regards,
    Mark.

  7. #7
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Access to image files on simulator?

    Yeah, my question was whether the simulator even TRIES to emulate the phone drives, or whether you just access the PC file system. Due to all the problems folks have encountered, and the fact that the project I'm working on is near completion, I've not wanted to try the simulator (or the rest of the Qt SDK) to find out.

  8. #8
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Access to image files on simulator?

    Quote Originally Posted by danhicksbyron View Post
    Yeah, my question was whether the simulator even TRIES to emulate the phone drives, or whether you just access the PC file system. Due to all the problems folks have encountered, and the fact that the project I'm working on is near completion, I've not wanted to try the simulator (or the rest of the Qt SDK) to find out.
    No it does NOT.

    The simulator is just a skin for a normal Qt app running on a Windows system AFAIK.
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

Similar Threads

  1. can i access the internet from simulator
    By lokesh_kumar_s in forum Symbian
    Replies: 5
    Last Post: 2010-02-11, 11:04
  2. Bluetooth Simulator to Access Point ?
    By sukojo in forum Bluetooth Technology
    Replies: 0
    Last Post: 2003-11-14, 19:05
  3. Storing Audio/ image files as byte arrays in flat files(eg. bin files)
    By anantharaj1999 in forum Mobile Java General
    Replies: 0
    Last Post: 2003-06-09, 11:57
  4. 7250 image files access
    By catale in forum Mobile Java General
    Replies: 2
    Last Post: 2003-03-24, 08:36

Posting Permissions

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