PortableApps.com wins big in the 2009 Community Choice Awards and hits 100 million app downloads!

XBMC Media Center Portable 9.04 Development Test 2

Submitted by radarman36 on June 26, 2009 - 11:36am

Application: XBMC Media Center
Category: Music & Video
Description: XBMC Portable is an award winning media center application for Linux, Mac OS X, Windows and XBox. The ultimate hub for all your media, XBMC is easy to use, looks slick, and has a large helpful community. This portable version is made with a NSIS launcher, on a simplified version of the one used by Portableapps.com, but with admin rights verification =). Don't worry, this software is made with the Portableapps.com format. It doesn't leave any data on AppData dir, it is set for this.

Download XBMC Media Center Portable 9.04 Development Test 2 [78.6MB download / 132MB installed]
(MD5: 37beab7c4146b8993ee1aac3e4d39fb4)

Release Notes:

- Minor update : improved launcher is out -> Download


Development Test 2 (2009-07-04):
- Added support of the Pa.com's platform by the XBMC's media library. (Special thanks to NeoRame =))

Development Test 1 (2009-06-26): Initial release


( categories: )

OK

It works fine for me. You should try to get the app to auto-detect the PApps.com structure's Documents (Music, Pictures & Video)

Eiñ??? A siñature????

i love this app ;-) can i

i love this app Eye-wink can i update xbmc (*hint* new version is out) via interface or have i to wait until xou update the portable version???

Hell was full, so I came back!!!
Sorry for my lousy English!!!

Sadly it doesnt do television

Sadly it doesnt do television =_=

and on first start it hangs

and on first start it hangs up but on second start it works well

Hell was full, so I came back!!!
Sorry for my lousy English!!!

You can do it manually, but....

You can do it manually, simply copy the app files, (after installing it and setting the mode where data is stored with app) into the folder App\XBMC.

But the portable version'll have updated also the appinfo.ini and the launcher.

It's your own choice.

But, a little question, where did you find your new version ? I've looked on the official website, but the version I found was the same as I packaged.

on my first test i used the

on my first test i used the update inside of xbmc and they clled me that exists a new version after downlad he told me that im now on the latest version.....

Hell was full, so I came back!!!
Sorry for my lousy English!!!

Stuck with NSIS Code

For Espanaks :

Your idea is very nice guy, and I've followed it. after looking on their forums in order to know how to modify media source.

We have to only modify a XML file. I've found how to do with NSIS, but, when I'd create a XML value named (path where the music is on the PA.com Platform), I can't.

The problem is that I've to put the root directory\Documents\Music.
But what variable on NSIS set this root directory ?

what is your problem u dont

what is your problem u dont know how u can change the xml or wich path u must add in the xml ?????

u can use diffent ways for path (relative pathes) execdir/../../blabla or installdir/../bli/bla/blub.....

show me your srting that must be changed in the xml... ah and can you set relative pathes for the xml????

Hell was full, so I came back!!!
Sorry for my lousy English!!!

The path on the xml file =)

My problem is the path on the XML File; all the default variables i've seen with NSIS doesn't work with the result I'd like.

Here is my .nsi code (the XML creation is at the top of the file) :

; PortableApps.com & Vince'
; NSIS with Registry.nsh in Include and Registry.dll, FindProcDLL.dll, KillProcDLL.dll, and NSISXML.dll in Plugins

; **************************************************************************
; === Define constants ===
; **************************************************************************
!define VER 		"9.04.1.20672"	; version of launcher
!define APPNAME 	"XBMC Media Center"	; complete name of program
!define APP 		"XBMC"	; short name of program without space and accent  this one is used for the final executable an in the directory structure
!define APPEXE 		"XBMC.exe"	; main exe name
!define APPDIR 		"App\XBMC"	; main exe relative path
!define APPSWITCH 	"-fs -p"	; some default Parameters

;--- Define RegKeys ---
!define REGISTRY
	!define REGKEY1 "HKEY_USERS\S-1-5-21-3602194969-3787152428-3218906141-1000\SOFTWARE\XBMC"

; ---Define Dirs, ---
	!define LOCALDIR1 "$APPDATA\Roaming\XBMC"
	!define PORTABLEDIR1 "$EXEDIR\Data\XBMC"
	!define DEFAULTPORTABLEDIR1 "$EXEDIR\App\DefaultData\XBMC"

; ---Define Files ---
	!define LOCALFILE1 "$WINDIR\XBMC.ini"
	!define PORTABLEFILE1 "$EXEDIR\Data\XBMC.ini"
	!define DEFAULTPORTABLEFILE1 "$EXEDIR\App\DefaultData\XBMC.ini"

	
; **************************************************************************
; === Best Compression ===
; **************************************************************************
SetCompressor /SOLID lzma
SetCompressorDictSize 32

; **************************************************************************
; === Includes ===
; **************************************************************************
!include "PortableApp.nsh" 

; **************************************************************************
; === Set basic information ===
; **************************************************************************
Name "${APPNAME} Portable"
OutFile "..\..\${APP}Portable.exe"
Icon "${APP}.ico"

; **************************************************************************
; === MultiLang ===
; **************************************************************************
Var LNG
Function MultiLang
StrCpy $LNG "English"
System::Call 'kernel32::GetUserDefaultLangID() i .r0'
StrCmp $0 "1033" 0 +2
StrCpy $LNG "English"
StrCmp $0 "1036" 0 +2
StrCpy $LNG "Francais"
ReadINIStr $0 "$EXEDIR\${APP}Portable.ini" "${APP}Portable" "UserDefaultLang"
StrCmp $0 "false" +3
WriteINIStr "$EXEDIR\${APP}Portable.ini" "${APP}Portable" "UserDefaultLang" "true"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\MyProg" "Language" "$LNG"
FunctionEnd

; **************************************************************************
; === Other Actions ===
; **************************************************************************
Function Init

FunctionEnd

Function Close

FunctionEnd


; **************************************************************************
; ==== Running ====
; **************************************************************************
Section "Main"
	Call CreateSourceFile
	Call CheckStart

	Call BackupLocalKeys
	Call RestorePortableKeys

	Call BackupLocalDirs
	Call RestorePortableDirs

	Call BackupLocalFiles
	Call RestorePortableFiles
	
	Call Init
	Call MultiLang

		Call SplashLogo
		Call Launch

	Call Restore

SectionEnd

Function Restore

	Call Close

	Call BackupPortableFiles
	Call RestoreLocalFiles

	Call BackupPortableDirs
	Call RestoreLocalDirs

	Call BackupPortableKeys
	Call RestoreLocalKeys

FunctionEnd

;***************************************************************************
; ========= Setting XBMC media source on Portableapps.com doc's========
;***************************************************************************
Function CreateSourceFile
	nsisXML::create
	nsisXML::createProcessingInstruction "xml" 'version="1.0" encoding="UTF-8" standalone="yes"'
	nsisXML::appendChild
	nsisXML::createElement "music"	; create main document element node
	nsisXML::appendChild
	StrCpy $1 $2			; lets move to this node and create its childs:
	nsisXML::createElement "default"
	nsisXML::setText "Musics on the PortableApps.com Platform"
	nsisXML::appendChild
	nsisXML::createElement "source"
	nsisXML::createElement "name"
	nsisXML::setText "Music"
	nsisXML::createElement "path"
	nsisXML::setText ""
	nsisXML::appendChild
	nsisXML::save "$EXEDIR\Data\XBMC\sources\Sources.xml"
	CopyFiles /SILENT /FILESONLY $EXEDIR\Data\XBMC\sources\sources.xml $EXEDIR\App\XBMC\usersources
FunctionEnd

; **************************************************************************
; === Run Application ===
; **************************************************************************
Function Launch
SetOutPath "$EXEDIR\${APPDIR}"
${GetParameters} $0
ExecWait `"$EXEDIR\${APPDIR}\${APPEXE}"${APPSWITCH} $0`
WriteINIStr "$EXEDIR\Data\${APP}Portable.ini" "${APP}Portable" "GoodExit" "true"
FunctionEnd

; **************************************************************************
; ==== Actions on Registry Keys =====
; **************************************************************************
Function BackupLocalKeys
	${registry::DeleteKey} "${REGKEY1}-BackupBy${APP}Portable" $R0
	${registry::MoveKey} "${REGKEY1}" "${REGKEY1}-BackupBy${APP}Portable" $R0
Sleep 50
FunctionEnd

Function RestorePortableKeys
IfFileExists "$EXEDIR\Data\${APP}.reg" +4
IfFileExists "$EXEDIR\App\DefaultData\${APP}.reg" 0 +5
CreateDirectory "$EXEDIR\Data"
CopyFiles  /SILENT "$EXEDIR\App\DefaultData\${APP}.reg" "$EXEDIR\Data"
${registry::RestoreKey} "$EXEDIR\Data\${APP}.reg" $R0
Sleep 200
FunctionEnd

Function BackupPortableKeys
Delete "$EXEDIR\Data\${APP}.reg"
CreateDirectory "$EXEDIR\Data"
	${registry::SaveKey} "${REGKEY1}" "$EXEDIR\Data\${APP}.reg" "/A=1" $R0
Sleep 100
FunctionEnd

Function RestoreLocalKeys
	${registry::DeleteKey} "${REGKEY1}" $R0
	${registry::MoveKey} "${REGKEY1}-BackupBy${APP}Portable" "${REGKEY1}" $R0
Sleep 50
${registry::Unload}
FunctionEnd

; **************************************************************************
; ==== Actions on Folders =====
; **************************************************************************
Function BackupLocalDirs
	RMDir "/r" "${LOCALDIR1}-BackupBy${APP}Portable"
	Rename "${LOCALDIR1}" "${LOCALDIR1}-BackupBy${APP}Portable"
FunctionEnd

Function RestorePortableDirs
	IfFileExists "${PORTABLEDIR1}\*.*" +4
	IfFileExists "${DEFAULTPORTABLEDIR1}\*.*" 0 +5
	CreateDirectory "${PORTABLEDIR1}"
	CopyFiles /SILENT "${DEFAULTPORTABLEDIR1}\*.*" "${PORTABLEDIR1}"
	CreateDirectory "${LOCALDIR1}"
	CopyFiles /SILENT "${PORTABLEDIR1}\*.*" "${LOCALDIR1}"
FunctionEnd

Function BackupPortableDirs
	RMDir "/r" "${PORTABLEDIR1}"
	CreateDirectory "${PORTABLEDIR1}"
	CopyFiles /SILENT "${LOCALDIR1}\*.*" "${PORTABLEDIR1}"
FunctionEnd

Function RestoreLocalDirs
	RMDir "/r" "${LOCALDIR1}"
	Rename "${LOCALDIR1}-BackupBy${APP}Portable" "${LOCALDIR1}"
FunctionEnd

; **************************************************************************
; ====Actions on Files =====
; **************************************************************************
Function BackupLocalFiles
	Delete "${LOCALFILE1}.BackupBy${APP}Portable"
	Rename "${LOCALFILE1}" "${LOCALFILE1}.BackupBy${APP}Portable"
FunctionEnd

Function RestorePortableFiles
	IfFileExists "${PORTABLEFILE1}" +4
	IfFileExists "${DEFAULTPORTABLEFILE1}" 0 +4
	CreateDirectory "$EXEDIR\Data"
	CopyFiles /SILENT "${DEFAULTPORTABLEFILE1}" "${PORTABLEFILE1}"
	Rename  "${PORTABLEFILE1}" "${LOCALFILE1}"
FunctionEnd

Function BackupPortableFiles
CreateDirectory "$EXEDIR\Data"
	Rename "${LOCALFILE1}" "${PORTABLEFILE1}"
FunctionEnd

Function RestoreLocalFiles
	Delete "${LOCALFILE1}"
	Rename "${LOCALFILE1}.BackupBy${APP}Portable" "${LOCALFILE1}"
FunctionEnd

can you send me the plugin

can you send me the plugin and nsh for the xml stuff??

btw they us another problem, xbmc dont support ralative pathes and when u use xbmc portable and change the device letter , xbmc cant find any of the added movies...

*EDIT*
ok i have found out how you can set relative pathes path for the music folder for example must be:

special:\\home\..\..\..\..\Documents\Music\

*EDIT 2*

why you dont install /implented not a preformed xml in you installer?? so you dont need the create xml stuff

Hell was full, so I came back!!!
Sorry for my lousy English!!!

nsisXML

The plugin is nsisXML, you can download it here.

I have'nt understood you method guy;
I've uploaded the source of my launcher here(Source.zip).
Try to do something plz I'm really stuck =)

NB: the xml file for xbmc is into the App folder\XBMC\userdata\sources.xml

what i mean is let this

what i mean is let this nsisxml shit. you dont need it u must only change the source.xml use this one:

http://www.mediafire.com/?045ldyqndij

Hell was full, so I came back!!!
Sorry for my lousy English!!!

Wonderful !

Wow, it's wonderful guy =)

Thanks you very much for the tip =p

I'll package this new version and upload it now... Thanks again dude