automatic updates do not work at the University Clinics Freiburg but svn checkouts do.
Don’t ask me why, we just have a crazy ass firewall/proxy combo.
Do you have a repository we could checkout instead of manually downloading updates?
The code of Brainstorm is on a SVN server, but the brainsorm3_…zip package you download from the website contain more things than what is on the SVN.
The SVN checkout would not do a complete update of the Brainstorm.
I would prefer that you use an automated script to download and unzip automatically the zip file from the website.
On windows systems, this can be easy to do with batch files. Using Windows calls instead of Matlab/Java ones for doing the same thing should go around the proxy limitations.
Try copying the following code and saving in a text file “bst_update.bat”. Then double-click on the file, it should download (or update) the latest version in the same folder:
@ECHO OFF
ECHO.
SETLOCAL
ECHO Downloading updates...
RMDIR /S /Q brainstorm3
powershell -Command "(New-Object Net.WebClient).DownloadFile('http://neuroimage.usc.edu/brainstorm3_register/getupdate.php?c=UbsM09', 'brainstorm3_update.zip')"
ECHO Deleting previous install...
SET OutFolder=%CD%
SET ZipFile=%CD%\brainstorm3_update.zip
ECHO Unzipping...
set vbs="%temp%\_.vbs"
if exist %vbs% del /f /q %vbs%
>%vbs% echo Set fso = CreateObject("Scripting.FileSystemObject")
>>%vbs% echo Set objShell = CreateObject("Shell.Application")
>>%vbs% echo Set objSource = objShell.NameSpace("%ZipFile%").Items()
>>%vbs% echo objShell.NameSpace("%OutFolder%").CopyHere(objSource)
>>%vbs% echo Set fso = Nothing
>>%vbs% echo Set objShell = Nothing
cscript //nologo %vbs%
if exist %vbs% del /f /q %vbs%
ECHO Deleting downloaded file...
DEL brainstorm3_update.zip
ECHO Done.
exit /b
It’s a lot easier on a MacOS/Linux/Unix platform because you have directly all the tools available in the command line.
The update script can be 4 lines long:
rm -rf brainstorm3
use “wget” to download the file into brainstorm_update.zip
unzip brainstorm_update.zip
rmdir brainstorm_update.zip
Then you add this as a cron job every week or every month and you have your automatic updater.
Any thoughts on how to best avoid deleting the anatomical template folder? (Filled with all the templates you have on the download page).
For now I just keep a copy of the extra templates to a backup folder and copy them back after updating.
If you just delete them, you would have new options when you right-click on a subject > Use template.
You would get menus like “Download: ICBM152”. If you click on it, it would download it automatically and save it in your $HOME/.brainstorm/defaults/anatomy.
You should not have anything to keep in the folder brainstorm3 between two versions.
[QUOTE=Francois;7395]If you just delete them, you would have new options when you right-click on a subject > Use template.
You would get menus like “Download: ICBM152”. If you click on it, it would download it automatically and save it in your $HOME/.brainstorm/defaults/anatomy.
You should not have anything to keep in the folder brainstorm3 between two versions.[/QUOTE]
Except if you are behind a stupid proxy that matlab can’t handle (astonishingly the matlab installer can…)
It’s not Matlab that cannot handle the proxy, it’s my downloader developed in java. When I coded this, I didn’t pay too much attention to the proxy limitations.
I will improve this at some point, but it’s not on top of the list.
Right now, you can download the .zip files from the Download page and copy them directly to the folder $HOME/.brainstorm/defaults/anatomy.
Or you write a more complex update script that moves the “brainstorm3/defaults” folder before the update, so that it is not deleted, then move it back to the new brainstorm3.
This is actually what my update script is doing here at McGill.
I thought of moving the folder too but it occurred to me that by downloading all templates I could just skip the moving part.
Ofcourse, users might add other templates or you might publish new ones so I will have to do as you say!
Thanks!
I’m trying to improve the robustness of the download interface, to detect existing proxies.
I’m having a hard time testing any solution, because I cannot find a configuration that blocks the requests coming from Brainstorm.
Could help me doing some debugging?
Can you just tell me what is displayed if you type the following in your Matlab command window (after updating brainstorm, with brainstorm running).
> gui_brainstorm(‘GetProxy’)
Can you try again again downloading something (anatomy template or Brainstorm update)?
Does it work any better?
I work in a hospital with lots of firewalls, yet I haven’t had problems using the automated updating in Brainstorm. Can you first take a look at this thread and see if it is related to your problem:
I am on sickness leave right now but forwarded your post to marcel beers (our brainstorm evangelist in Freiburg).
He should also be very keen for a solution.
Thanks for the tip!
I can’t test it right now but I think it won’t help.
The reason is that when on my laptop, updating works fine on eduroam WiFi but stops working once inside the clinics Ethernet.
As bridging the 2 networks is a capital crime desktops do not have WiFi.
This is the Matlab output that I get on my computer (using the proxy of the University Hospital Freiburg). It would be great to have a solution for this proxy issues!
Marcel
gui_brainstorm(‘GetProxy’)
proxy hostname : DIRECT
No Proxy
Yes, it is one of those that cannot update brainstorm. I tested it for a different PC in a different sub-network and the output is the same. It seems like it does not recognize that there is a proxy at all. Both computers are windows 7 PCs.
Maybe we should mention that we are behind a proxy with authentication?
In Linux I use the cmd:
export http_proxy = http://uname:pwd@address:port
to give cmdline internet access.
We also have a automatic configuration script address we can use in windows.
Automatic proxy detection in firefox also works.
Hello,
I added the support for proxy connections in Brainstorm. Now you should be able to use the automatic download tools (for updating Brainstorm, installing OpenMEEG and MEM, downloading new anatomical templates…)
I couldn’t find a way to get the system proxies, so I use the Matlab proxy definition.
You have to set up correctly the proxy configuration in the Matlab preferences (Edit preferences > Web > Use proxy).
Please, let me know if it works.
Francois