PDA

View Full Version : [PATCH] Win32/SDL: Use user profile dir instead of mapping q:


WiSo
2008-02-25, 23:17
http://sourceforge.net/tracker/index.php?func=detail&aid=1901681&group_id=87054&atid=581840
From the readme:
Hi,

attached the patch to put the userdata into \Documents and
Settings\user\Application Data\XBMC\.
I borrowed the code from the _APPLE definitions and it starts fine. I
wonder what is with the rest of the directories in the userdata folder
because only guisettings and keymap is created/copied. Did I miss there
something?

Patched against revision: 11782
Patched files: Application.cpp, Util.cpp, Util.h, IoSupport.cpp

Note: GetModuleFileName gives the right path information even when running
the debugger. No need to hard code the path for debugging.

Please drop me a line if we need more of the userdata copied to the profile or not.

Gamester17
2008-02-26, 12:44
[I]I wonder what is with the rest of the directories in the userdata folder because only guisettings and keymap is created/copied.

Did I miss there something?Yes there are some more files and subfolders that also need to be copied if they exist:

Addition files (note that the partymode* files are created automaticly when needed/used):
favourites.xml
LCD.xml
PartyMode.xsp
PartyMode-Video.xsp
RssFeeds.xml

Additional subfolders:
PictureIcon
visualisations
...there is also the thumbnails cache folder and database folder which I currently do not remember what they are named.

Then there is also profiles which I am not exacly sure how they are handled nor how they should best be handled under Windows.

l.capriotti
2008-02-26, 17:24
I am looking forward to a similar patch on the linux port, i.e. have every user files saved under $HOME/.xbmc and have a clean debian-ised port.
Cheers

Luigi

WiSo
2008-02-26, 18:13
I dunno where to post if here or at SF ;)
So from SF:

As I understand it from the source Linux just remaps the q: drive
internally and drives it then from XBMC_HOME/userdata. I copied the
behavior from the MacPort which uses the USER_HOME/Library... path. So if I
don't missed any place the MacPort also only copies the keymap.xml.
guisettings and profile will be created if it doesn't exist. The other
items are also read via the q: remapping which Mac and Windows does
additional to the extra path.
I guess only the data which is changed by xbmc are copied to the extra
directory, or am I wrong?

matt_cyr
2008-03-13, 20:33
Hey guys, just a quick note.
when running the latest win32 build i noticed in the logs xbmc is looking for favorites.xml in the wrong path.
ERROR: Unable to load C:\Documents and Settings\<user>\Application Data\favourites.xml
It's missing the XBMC directory in there...

matt_cyr
2008-03-13, 20:36
edit:
Also seems to do the same for sources.xml and thumbnails folder

WiSo
2008-03-14, 02:09
just try to remove the app_data\xbmc folder and maybe also the profile.xml file in the xbmc root dir.
There're already some more fixes regarding the profile in the svn. I assume the next build will fix this.

GeminiServer
2008-03-25, 20:31
Hi,
had some time over easter and i completely paged out the fixed driver letters p, q, t, z from the xbmc src. This will effect that XBMC_PC now do not need any fixed drives.
I also add. detection of local hdd and odd drives.. instead the fixed c, d, e, f and g. Playing from ODD are currently not supported.. may be soon ;)

The commit of these huge files to svn will be done @ this weekend.. need time to review all changes again...

p.s.: The XBMC Win32 user profile handling is like XBMC for XBOX. All is in UserData.... To wide them to user provided folders will be more easy now..

Gamester17
2008-03-25, 20:45
Hi,
had some time over easter and i completely paged out the fixed driver letters p, q, t, z. XBMC_PC now don't need any fixed drive..

Also i add. detection of local hdd and odd drives.. instead the fixed c, d, e, f and g. Playing from ODD are currently not supported.. but soon ;)

The commit of these huge files to svn will be done @ this weekend.. need time to review all changes again...Is that against the DirectX Win32 XBMC (XBMC SVN trunk) or against the SDL Win32 XBMC (XBMC SVN linuxport branch)?

...reason I ask is I thought that WiSo and CharlyDoes had commited all of that for SDL Win32 XBMC (XBMC SVN linuxport branch), haven't they? ???

XBMC SVN trunk (DirectX version of XBMC, builds from the XBMC trunk, same as XBMC for Xbox):
https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/XBMC

XBMC SVN linuxport branch (SDL/OpenGL version of XBMC, builds from the XBMC linuxport branch, same as XBMC for Linux, and XBMC for Mac OS X):
https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC/

WIKI ARTICLE - HOW-TO compile XBMC for Windows from source code:
http://xbmc.org/wiki/?title=HOW-TO_compile_XBMC_for_Windows_from_source_code

GeminiServer
2008-03-25, 20:56
My changes are always against the XBMC SVN trunk..

Don't played with the linux branch ;)..

Gamester17
2008-03-25, 21:58
oki, ...you still might want to look at how WiSo did it in the linuxport branch though before you commit (as I understand they use a similar method for Linux, Mac OS X, and Win32 there, so maybe that method could be re-used for the trunk as well?)

WiSo
2008-03-26, 11:20
...reason I ask is I thought that WiSo and CharlyDoes had commited all of that for SDL Win32 XBMC (XBMC SVN linuxport branch), haven't they? ???
[/url]

Jep we have. Anyhow maybe Gemini has some time to review it ;)

jmarshall
2008-03-26, 11:28
GeminiServer:

If it's a huge commit that touches many files, perhaps you could post a unified diff so that we may review it - the SF mails often get truncated on the larger commits.

Cheers,
Jonathan

spiff
2008-03-26, 12:45
also geminiser, you should really consider focusing your work on the win32 sdl version. it is the "future" as far as win32 goes :)