PDA

View Full Version : [WINDOWS] Plugin or script to update Third-Party SVN builds?


rimmi2002
2009-03-21, 18:51
Is there an script or plugin that can automatically update my XBMC with the new revs so I don't have to keep downloading the latest building and reinstalling them, Thanks.

mpw222
2009-03-21, 20:48
I wrote a powershell script that does this for the jester builds. It needs to be run outside xbmc (it will close xbmc if running), and it requires .net 2 and powershell. I just have eventghost launch it. PM me if you're interested.

febox-pootz
2009-03-21, 22:50
i'm interested too... can you send me please? thanks man

Livin
2009-03-22, 00:37
mpw,
maybe you can post it and someone might be able to convert it to an XBMC script?

kay.one
2009-03-22, 03:05
could you please post the script on pastbin or even here so we can all use it,

mpw222
2009-03-22, 03:13
OK, here it is. I borrowed a wget function from a PowerShell repository, which is why it is written much better than the rest of the script. I'm definitely a scripting novice, so I encourage anyone to improve this or convert it to something that can be launched from inside xbmc.

What it does:
1. Downloads the html listing of jester's builds.
2. If a newer version is found (based on build number), the installer is downloaded. On the first run, it will always download the newest build.
3. The existing imdb scraper is preserved.
4. If xbmc is running, it gets closed.
5. New build installs silently.
6. Previous imdb scraper restored.
7. Build number written to ver.txt in xbmc directory.
8. XBMC starts in fullscreen.

How to run it:
1. Vista and XP only: Download Powershell 2 CTP3 (PowerShell 1.0 might work).
2. XP only: Download .NET 3.5 (2.0 might work)
3. Open a PowerShell prompt. In Vista/7, you'll need to run as an admin.
4. Run "set-executionpolicy remotesigned"
5. From here on, it can be run with powershell.exe <path>\update-xbmc.ps1 by an administrator.

Notes
1. Tested on XP, Vista and 7, x86 and x64. Running from a remote on Vista or 7 pretty much requires turning off UAC.

################################################## #################################
# Script: Update-XBMC.ps1 #
# Purpose: Update script for Jester Windows XBMC SVN builds. #
# Author: mpw222, get-webfile function by Joel Bennett (http://poshcode.org/417) #
################################################## #################################

# Paramaters
param(
[switch]$force, # Forces installation of newest build
[switch]$norestart, # Does not restart xbmc
[switch]$check, # Performs version check only
[switch]$help # Prints usage
)


# User Defined
$xbmcurl="http://ocs.nl/xbmc/"


# Usage
if ($help) {
"Update-XBMC.ps1 - An update script for Jester Windows XBMC SVN builds.`n"
"Switches:"
"-force Forces installation of newest build"
"-norestart Does not restart xbmc"
"-check Performs version check only"
"-help Prints usage"
exit 0
}


# Functions

################################################## #
# Function: Get-WebFile #
# Purpose: wget for PowerShell #
# Author: Joel Bennett http://poshcode.org/417 #
################################################## #

function Get-WebFile {
param(
$url = (Read-Host "The URL to download"),
$fileName = $null,
[switch]$Passthru,
[switch]$quiet
)

$req = [System.Net.HttpWebRequest]::Create($url);
$res = $req.GetResponse();

if($fileName -and !(Split-Path $fileName)) {
$fileName = Join-Path (Get-Location -PSProvider "FileSystem") $fileName
}
elseif((!$Passthru -and ($fileName -eq $null)) -or (($fileName -ne $null) -and (Test-Path -PathType "Container" $fileName)))
{
[string]$fileName = ([regex]'(?i)filename=(.*)$').Match( $res.Headers["Content-Disposition"] ).Groups[1].Value
$fileName = $fileName.trim("\/""'")
if(!$fileName) {
$fileName = $res.ResponseUri.Segments[-1]
$fileName = $fileName.trim("\/")
if(!$fileName) {
$fileName = Read-Host "Please provide a file name"
}
$fileName = $fileName.trim("\/")
if(!([IO.FileInfo]$fileName).Extension) {
$fileName = $fileName + "." + $res.ContentType.Split(";")[0].Split("/")[1]
}
}
$fileName = Join-Path (Get-Location -PSProvider "FileSystem") $fileName
}
if($Passthru) {
$encoding = [System.Text.Encoding]::GetEncoding( $res.CharacterSet )
[string]$output = ""
}

if($res.StatusCode -eq 200) {
[int]$goal = $res.ContentLength
$reader = $res.GetResponseStream()
if($fileName) {
$writer = new-object System.IO.FileStream $fileName, "Create"
}
[byte[]]$buffer = new-object byte[] 4096
[int]$total = [int]$count = 0
do
{
$count = $reader.Read($buffer, 0, $buffer.Length);
if($fileName) {
$writer.Write($buffer, 0, $count);
}
if($Passthru){
$output += $encoding.GetString($buffer,0,$count)
} elseif(!$quiet) {
$total += $count
if($goal -gt 0) {
Write-Progress "Downloading $url" "Saving $total of $goal" -id 0 -percentComplete (($total/$goal)*100)
} else {
Write-Progress "Downloading $url" "Saving $total bytes..." -id 0
}
}
} while ($count -gt 0)

$reader.Close()
if($fileName) {
$writer.Flush()
$writer.Close()
}
if($Passthru){
$output
}
}
$res.Close();
}


################################################## #####
# Function: Get-PFx86 #
# Purpose: Returns the 32-bit Program Files directory #
################################################## #####

function Get-PFx86 {
if ($env:processor_architecture -match "x86") {
$pf=$env:programfiles
} else {
$pf=${env:ProgramFiles(x86)}
}
return $pf
}


########
# MAIN #
########

$lockfile=join-path $env:temp (($myinvocation.mycommand).tostring() + ".lock")

if (!$force) {
if ((test-path $lockfile) -eq $true) {
$lockage=((get-date) - ((dir $lockfile).lastwritetime)).hours
if ($lockage -lt 1) {
"Lock file detected, script closing"
exit 1
}
}
}

"lock" > $lockfile

if ((get-host).name -match "ConsoleHost") {"`n`n`n`n"}

$pf=Get-PFx86
$versionfile=Join-Path (Get-PFx86) "XBMC\ver.txt"

if (test-path $versionfile) {
$currentversion=get-content $versionfile
"XBMC SVN-$currentversion currently installed."
} else {
$currentversion="0"
"XBMC not installed or no version file."
}

$htmlfile=join-path $env:temp "xbmc.html"
Get-WebFile $xbmcurl $htmlfile
$link=get-content $htmlfile | select-string "XBMCSetup-Rev\d+-jester.exe" | sort-object -descending | select-object -first 1
$newversion = ($link.tostring() -replace ".*href=`"XBMCSetup-Rev","") -replace "-jester`.exe.*",""
"XBMC SVN-$newversion available online."

if ($newversion -le $currentversion) {
"Latest version already installed."
if ($force) {
"Force switch detected, installing anyway."
} else {
"Script closing."
remove-item $htmlfile
Remove-Item $lockfile
exit 0
}
}

if ($check) {
"Check switch enabled, script closing."
Remove-Item $lockfile
exit 0
}

$installerfile= ($link.tostring() -replace ".*XBMC","XBMC") -replace "`.exe.*","`.exe"
$installerlink=$xbmcurl + $installerfile
$installerpath=join-path $env:temp $installerfile
"Downloading XBMC SVN-$newversion."
Get-WebFile $installerlink $installerpath

$imdbfile=join-path $pf "XBMC\system\scrapers\video\imdb.xml"

if (test-path $imdbfile) {$imdbxml=get-content $imdbfile}

Get-Process | ? {$_.ProcessName -match "xbmc"} | Stop-Process
"Installing XBMC SVN-$newversion."
Start-Process $installerpath -wait -ArgumentList "/S"
"Installation complete, removing installer."
remove-item $installerpath
$newversion > $versionfile

if ($xbmcxml) {$imdbxml > $imdbfile}

if (!$norestart) {Start-Process (join-path $pf "XBMC\xbmc.exe") -ArgumentList "-fs"}

remove-item $htmlfile
remove-item $lockfile
exit 0

kricker
2009-03-22, 07:21
If someone gets this working stable in a XBMC plugin like BigBellyBilly's XBMC T3CH updater script, I'll setup a ftp/http site for Ikons and myself to post our builds. Jester to if he likes, but it looks like he already has a good system in place for himself.

I was told once a long time ago by BigBellyBilly that he'd welcome someone to modify his script for such an endeavor.

kay.one
2009-03-24, 21:05
if you could upload your files to a simple html page, that could be parsed easily or even with an rrs feed i could modify this script to pick up any of the builds based on a parameter.

kricker
2009-03-24, 21:53
PM me with directions on how you need it structured and we can start testing.

xexe
2009-03-24, 22:33
Something worth considering in this excellent project is that each build exe should identify more than the vanilla build number.

Jesters format of:

XBMCSetup-Rev17788-jester-ext.exe

Is a good model to build upon. The main thing would be that if someone wanted say "the new Ikons with smoothvideo and HD tagging" if such a thing existed the filename contained that info.

kricker
2009-03-24, 22:50
Something worth considering in this excellent project is that each build exe should identify more than the vanilla build number.

Jesters format of:

XBMCSetup-Rev17788-jester-ext.exe

Is a good model to build upon. The main thing would be that if someone wanted say "the new Ikons with smoothvideo and HD tagging" if such a thing existed the filename contained that info.That's IF the build contains anything other than a straight SVN build. When that does happen I think we have always identified them as such.

xexe
2009-03-25, 00:30
Thats sounds absolutely true to me... however what hasn't historically been universally identified is the builder which is also very important to ensure that a build problem with one builder is identifiable as such.

I would suggest something simple like (example only):

XBMCSetup-Rev17788-kricker-trunk.exe

which could signify

1. XBMCSetup - Obviously that it is an XBMC setup file
2. Rev17788 - the build number
3. kricker - the builder
4. trunk - some word to signify that it is a "vanilla" build. In general i always find it better to explicitly say something than rely on an implicit implication i.e. the absense of a word shouldnt mean something

These are only ideas for consideration, the details as always should be up for debate and ideas :)

kay.one
2009-03-25, 08:01
instead of putting everything in the file name we could create a "list.xml" that contains the download url for the build and all the attributes of that build as the elements.

also on a different topic, i was thinking of moving this script to a windows application or form that could run on the background with a GUI to make it simpler for users to install and configure. powershell might not be the most user friendly way, I am in no way a powershell programmer but i write windows services and background applications for living so i could easily start that effort.

xexe
2009-03-25, 11:48
I had thought about a list.xml type solution. The problem I see with it is that people that grab the files directly will have problems identifying what they are after the fact. Perhaps this isnt really a problem in reality if everyone uses the plugin.

The main thing the downloading tool needs to accommodate is the diverse user inputs people control XBMC with. What we do not want is every single user having to manually alter their setup to run it. In a perfect world it should be runable from within XBMC.

The other thing it has to cater for is not grabbing every SVN. What we dont want is a tool that runs all the time and grabs every single release. Multiply this by the XBMC user base and it gets silly traffic wise especially since no one wants to upgrade this often.

Perhaps we can take this logic further and have community "SVN Stables". These could be releases tagged as working really well. Then if there is a problem in SVN we could provide a means for users that have ticked "only use stable svns" to not end up with a broken version. This helps users stay up to date without having to follow TRAC so closely and reduces bandwidth usage etc

kricker
2009-03-25, 16:52
Perhaps we can take this logic further and have community "SVN Stables". These could be releases tagged as working really well. Then if there is a problem in SVN we could provide a means for users that have ticked "only use stable svns" to not end up with a broken version. This helps users stay up to date without having to follow TRAC so closely and reduces bandwidth usage etcIs someone going to beta test our SVN builds? I doubt that. I don't even always have time to run the build after I make it.

The main thing the downloading tool needs to accommodate is the diverse user inputs people control XBMC with. What we do not want is every single user having to manually alter their setup to run it. In a perfect world it should be runable from within XBMC.

The biggest thing is, the installer needs to be able to roll back if something is wrong with the new version. Have you all looked at BBB's T3CH upgrader script? We pretty much need something just like it but working on win32.

If in place upgrade is wanted, then there will need to be some sort of application or batch that is run to do it. After all you can't do an in place upgrade if XBMC is currently running.

xexe
2009-03-25, 19:09
I am not suggesting beta testing anything... simply that the abilty to tag a SVN as good be added. This way users can have SVN versions but not necessarily the latest to the second. It also allows as you have pointed out, stopping people upgrading when one is known to be broke.

Most SVN users care not a jot about beta testing and simply want never features (shiny kit syndrome). Thats just life unfortunately.

The main thing is that if the devs are working on a tricky bug there could be many builds that are broke in a row. Once you have an auto install client you need the ability hold users from grabbing this broke version.

kricker
2009-03-25, 20:43
I am not suggesting beta testing anything... simply that the abilty to tag a SVN as good be added. This way users can have SVN versions but not necessarily the latest to the second. It also allows as you have pointed out, stopping people upgrading when one is known to be broke.

Most SVN users care not a jot about beta testing and simply want never features (shiny kit syndrome). Thats just life unfortunately.

The main thing is that if the devs are working on a tricky bug there could be many builds that are broke in a row. Once you have an auto install client you need the ability hold users from grabbing this broke version.Only thing is, the 3rd party builds are not from devs. We just build. We don't know they are broke until they are already built and someone uses it and finds out that they are broke. How would we know ahead of time?

xexe
2009-03-25, 20:47
obviously precognition couldn't be designed in :P but there nothing to stop the community reporting problem. Once they know the function exists im sure community spirit will help out (even the devs might say... hold it at xxxx build while we deal with this)

That way all the users that hadn't updated yet would be saved from a broken install or core feature.

kay.one
2009-03-25, 21:08
I was thinking of a way that this application would allow users to rate builds. that way we could even flag a build as bad if alot of users are rolling back to a previous build.

kricker
2009-03-25, 21:21
I was thinking of a way that this application would allow users to rate builds. that way we could even flag a build as bad if alot of users are rolling back to a previous build.That would be nice.

xexe
2009-03-25, 21:27
nice idea. go one further and give each instance a unique id (anonymous) and dont rely on human feedback which will be patchy at best

that way you can say things like xxx users on yy build. zzz user have donwgraded to this build etc

ties nicely into the "svn stable" idea we have been discussin

kay.one
2009-03-25, 23:14
for these ratings to be tracked we need some server side support, anywhere we could host a webservice?

if the hostirng service is ASP.net i could write the server side as well.

febox-pootz
2009-03-26, 03:16
but thats only needed to automagically "skip" bad builds... only a way to install an older version (instead of the last one) does the job man, if you see that isnt working, just install another one... not a very big deal, IMHO

but ok, everything "auto" would be so much nicer :nod:

kay.one
2009-03-26, 03:19
yeah i guess that could be phase 2. but for now, i need a list of build to parse. it could be an xml file, rss or even a simple html page.

can someone get that up and running?

kricker
2009-03-26, 03:44
yeah i guess that could be phase 2. but for now, i need a list of build to parse. it could be an xml file, rss or even a simple html page.

can someone get that up and running?I put up a build for you to test. Did you not get the PM? Let me know what else I have to do for you. I am not a web dev junkie so you'll have to hold my hand the first time thru.

kay.one
2009-03-26, 22:48
i put to gether a sample xml that could be hosted somewhere, the update script could download this xml to figure out which build to download based on user settings.

<?xml version = "1.0" encoding = "utf-8"?>
<!-- Blank XML template -->
<XBMC>
<Build>
<Rev></Rev>
<Compiler></Compiler>
<Url></Url>
<CompileDate></CompileDate>
</Build>
</XBMC>


one thing i can figure out by myself and need you guy's help is what are the build options as previously mentioned, for example external player, intel fix..... i need all the different attributes so i can build it into the program.

kricker
2009-03-26, 23:19
one thing i can figure out by myself and need you guy's help is what are the build options as previously mentioned, for example external player, intel fix..... i need all the different attributes so i can build it into the program.Those are all separate branches or patches built/applied as requested or at the builders preference. They are not permanent choices, as the patches and separate branches eventually get merged into the main SVN so they appear in the vanilla builds. Is it possible to just have one "section" of alternative builds a user can choose from? If a user needs a specific build they should know what they are looking for in this "special" section.

kay.one
2009-03-26, 23:38
what do you guys think about only doing the general build for now? if they change all the time i don't think there is going to be a way to fully automate the update.

lets say a user chosee branch 'A'. that branch gets merged into the main 2 weeks latter, that user won't get anymore updates since there wont be updated 'A' Builds!

what do you think?

kricker
2009-03-26, 23:51
what do you guys think about only doing the general build for now? if they change all the time i don't think there is going to be a way to fully automate the update.

lets say a user chosee branch 'A'. that branch gets merged into the main 2 weeks latter, that user won't get anymore updates since there wont be updated 'A' Builds!

what do you think?I agree. It's a bit too tricky to try having it for all the various branches/patched version that can appear. At least for now.

kay.one
2009-03-27, 03:50
any other ideas about that xml file. any other info that we would want to know about a build?


and also, Kricker could you make your installer take parameters for every choice a user makes during the installations flow, (components, destination, settings folder).

i have found this documentation on
http://nsis.sourceforge.net/Docs/Chapter4.html#4.8.1.36


if this is not something that you could do easily we have to depend on the default settings.

kricker
2009-03-27, 18:46
any other ideas about that xml file. any other info that we would want to know about a build?


and also, Kricker could you make your installer take parameters for every choice a user makes during the installations flow, (components, destination, settings folder).

i have found this documentation on
http://nsis.sourceforge.net/Docs/Chapter4.html#4.8.1.36


if this is not something that you could do easily we have to depend on the default settings.I'll look into this. I'm a bit busy with work at the moment so it might take a few days. I'm starting to think unzipping files from a zipped build folder and file copying like BBB's script would be easier.

kay.one
2009-03-27, 22:39
I'm starting to think unzipping files from a zipped build folder and file copying like BBB's script would be easier.

I'm starting to think the same.

kay.one
2009-03-31, 09:33
Hi guys, just to provide an update,

I'm almost done. have most major pieces functional.

how the app works right now is you start it, it'll run on the background. check the server on scheduled basis to see if there is a new build available. if that is the case it'll download and install the new build.

one question i have is what options would you prefer for scheduling. right now all i have in mind is everyday at a set time. and of course you could always initiate a check update manually.

xexe
2009-03-31, 10:31
Definitely don't have the default downloading daily as I dont think we can scale without funding. e.g. 1000 users updating daily is very roughly 1.5TB per month.

How about a slightly different tack. Download a new build if XX builds newer than the current installed one or YY days older. Keeping the install latest option to be run manually and setting the default XX to say 100 and YY to 1 week means that during times of high change you arent dishing out thousands of copies and during times of low change you still are getting one new a week.

Adding a 3rd option "install a community SVN stables" means we could force everyone up to update or downgrade in times of problems.

People could tweak their install preferences but setting the default to 1 a day will quickly require massive amounts of bandwidth.

kay.one
2009-04-07, 11:53
Looking for some testers. anyone interested?

xexe
2009-04-07, 12:11
happy to test

febox-pootz
2009-04-07, 19:47
me too

CrashX
2009-04-07, 21:06
How about this :

We have an app that that would download the latest source and compile and update your local build with it .. Offcourse this means that you have setup vc2008 express on your machine ..

kay.one
2009-04-07, 21:09
How about this :

We have an app that that would download the latest source and compile and update your local build with it ..

I haven't looked at it, but i think you need alot installed to be able to compile and most people don't want all those on their computer,

besides that there are at least a few compiled build available each day!

CrashX
2009-04-07, 21:10
Are you downloading full packages ?

Another option is to generate patches from the official build that we can run on our machines ..

xexe
2009-04-07, 21:31
How about this :

We have an app that that would download the latest source and compile and update your local build with it .. Offcourse this means that you have setup vc2008 express on your machine ..

oh god know i dont want a compile environment on my "spent ages making it slick" HTPC.

kricker
2009-04-07, 21:34
Lord no. On my dual xeon, a compile still takes some time. Not what I would consider a quick update.

CrashX
2009-04-07, 21:45
Kricker:

how about generating patches off offical builds ?

david81
2009-04-07, 21:58
It's a complex thought, but I love the idea of "patches".

All the data we need is available.

Current SVN installed - check
Newest SVN revision available - check
List of changes in between - check

Along the lines of an earlier thought, instead of using an installer, could we just pull from a "Build ####" folder the files that have changed since the currently installed build?

kricker
2009-04-07, 22:04
As far as I know, when things are changed in SVN, the app has to be re-compiled. That is going to take time. It's not as simple as just swapping out a couple files. Sure there may be times when you actually could just swap out some files, but I am not going to spend my time trying to figure out when it is like that.

You all might want to try it out first.

david81
2009-04-07, 22:09
I see your point. I was hoping there was some way to pick out the changed files automatically based on info from TRAC. Seems silly to download the entire installer if just the main program or a few xmls have changed. Saves downloading time and a heck of a lot of bandwidth.

kricker
2009-04-07, 22:20
I see your point. I was hoping there was some way to pick out the changed files automatically based on info from TRAC. Seems silly to download the entire installer if just the main program or a few xmls have changed. Saves downloading time and a heck of a lot of bandwidth.The main program is a compile of the files changed on trac. The server the updates are currently on has unlimited bandwidth...or so I am told.

CrashX
2009-04-07, 22:30
We currently generate the installer using a utility called makensis. Their is a plugin which should be installed by default as part of makensis called vpatch. We can use this plugin to generate the patches itself.

david81
2009-04-07, 22:31
The main program is a compile of the files changed on trac. The server the updates are currently on has unlimited bandwidth...or so I am told.

The installer is currently 32+ MB, while xbmc.exe is only 8 MB.

If it were me, I'd rather just download and replace xbmc.exe if that is the only change, no install needed. Same applies to any other changes such as xml changes or default skin changes.

Why download all the unchanged stuff if we don't have to?

kay.one
2009-04-07, 22:34
I'm downloading the compiled builds from kricker's website.

david81
2009-04-07, 22:36
We currently generate the installer using a utility called makensis. Their is a plugin which should be installed by default as part of makensis called vpatch. We can use this plugin to generate the patches itself.

Would this require an upgrade from only the most recent previous build? What if I chose to skip a few builds before updating?

kricker
2009-04-07, 22:37
The installer is currently 32+ MB, while xbmc.exe is only 8 MB.

If it were me, I'd rather just download and replace xbmc.exe if that is the only change, no install needed. Same applies to any other changes such as xml changes or default skin changes.

Why download all the unchanged stuff if we don't have to?If someone can figure out how to package just the "changes" I'm sure things can be altered for that. Feel free to figure it out.

Right now the updater grabs a zipped up build folder and extracts the files to your XBMC folder. It does not overwrite anything in the userdata folder. It doesn't grab the installer file due to complexities of trying to pass switches to the installer so it is all done automatically.

demlak
2009-04-07, 22:38
whatabout "rsync"? itīs perfect for updating just changed files.. well.. the builds must still be compiled on the server..

david81
2009-04-07, 22:39
I'm no TRAC expert, so please forgive me if I'm way off base.

Does TRAC support some sort of function that, if given two revision numbers it can tell you the files that are different?

kay.one
2009-04-07, 22:44
at this time we can't really have partial transfers without over complicating things,

I came up with a simple way to do this a few years back but we would need a windows hosting server to do it.

if someone has access to asp.net hosting i would be more than happy to put some time into it.

kricker
2009-04-07, 22:46
If someone can help setup a server side SVN project and compile and be able to package up the changed items, step up and let us know. I'm all for only downloading what's needed, but right now we are doing the best we know how.

CrashX
2009-04-07, 22:58
Would this require an upgrade from only the most recent previous build? What if I chose to skip a few builds before updating?

Depends on what you used the base as .. We can setup it up to use base as Official build ..

kay.one
2009-04-07, 23:02
Would this require an upgrade from only the most recent previous build? What if I chose to skip a few builds before updating?

rightnow it wouldn't matter if you skip a build., even if you don't even have xbmc it'll install a fresh copy for you.

kay.one
2009-04-07, 23:09
just a question, is it really an issue to download a 30mb file every few days?

i mean most of us use xbmc for movies and tv shows which are you know, downloaded!

no?

david81
2009-04-07, 23:23
It's not really an issue for me, more of the principle of the thing. I'm more than grateful for the constantly updated builds that are available currently and upgrade more than my wife would prefer :)

I guess I'm just of the mind of "If there is a "better" way, why not take it?"

It seems that reducing load on the server would be a good thing, so the less time I spend downloading, the more bandwidth is available for the next person.

Just thinking out loud here.

Suppose this "Updater" program reads your currently installed SVN revision.
It then goes to wherever the new builds are kept and finds the most recent build posted.
It takes those two revision numbers and heads off to TRAC and parses the list of changed files that TRAC spits out.
Then it comes back to the build staging area and downloads the neccesary files.

Does this make sense?

If I'm barking up the wrong tree, I'll go away and leave this to the experts.

kay.one
2009-04-07, 23:30
It's not really an issue for me, more of the principle of the thing. I'm more than grateful for the constantly updated builds that are available currently and upgrade more than my wife would prefer :)

I guess I'm just of the mind of "If there is a "better" way, why not take it?"

It seems that reducing load on the server would be a good thing, so the less time I spend downloading, the more bandwidth is available for the next person.

Just thinking out loud here.

Suppose this "Updater" program reads your currently installed SVN revision.
It then goes to wherever the new builds are kept and finds the most recent build posted.
It takes those two revision numbers and heads off to TRAC and parses the list of changed files that TRAC spits out.
Then it comes back to the build staging area and downloads the neccesary files.

Does this make sense?

If I'm barking up the wrong tree, I'll go away and leave this to the experts.


that would work, but it would require A LOT of effort.

this is how i had it in mind, you would have an xml file on the server, this file contains list of all the files that make up xbmc with md5 signiture for each file, the client would download this xml file, compare each local file's md5 signature with the signature on the server copy, then it would download and replace each file that doesn't match.

but the main question is, how many people are going to use this app? is traffic really gonna be an issue? and at the end of the day is it worth the effort?

kricker
2009-04-07, 23:33
Just a note: It takes less than a minute on basic cable to download and install the new builds as they are. The host is really fast.

david81
2009-04-07, 23:35
that would work, but it would require A LOT of effort.

this is how i had it in mind, you would have an xml file on the server, this file contains list of all the files that make up xbmc with md5 signiture for each file, the client would download this xml file, compare each local file's md5 signature with the signature on the server copy, then it would download and replace each file that doesn't match.

but the main question is, how many people are going to use this app? is traffic really gonna be an issue? and at the end of the day is it worth the effort?

See, this is why you are a programmer and I'm not. I never would have thought of the md5 signatures. That makes a lot more sense and is a good bit simpler.

Would it also take into account any new files that exist in the updated SVN build? (I assume yes?)

CrashX
2009-04-07, 23:38
To Avoid load on the server, we can just provide a link to download from multiple sites ( ie mirrors ) instead of the server ...

kricker
2009-04-07, 23:47
To Avoid load on the server, we can just provide a link to download from multiple sites ( ie mirrors ) instead of the server ...True, although this works similar to how the BBB script works for XBOX T3CH builds, and I never heard of any issues with that. We will be tracking the server load, and if it gets crazy we will make adjustments.

kay.one
2009-04-08, 08:51
Created a new thread for public release

http://xbmc.org/forum/showthread.php?t=48517