~ubuntu-branches/ubuntu/utopic/mricron/utopic

« back to all changes in this revision

Viewing changes to debian/patches/debian_fslbet

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2011-04-14 15:51:33 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110414155133-sd2umdatjqjlkhzt
Tags: 0.20110413.1~dfsg.1-1
* New upstream version. FSL BET related patches are no obsolete
  and have been removed. Mricron now performs autodetection of FSL.
  Additionally it supports a system-wide configuration file at
  /etc/mricron/mricron.ini
* Patch for older lazarus versions no longer applies to the lazarus
  version in unstable. Moved this patch into backport patch series files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Make mricron works with Debian's FSL
2
 
Forwarded: not-needed
3
 
Author: Michael Hanke <michael.hanke@gmail.com>
4
 
--- a/bet.pas
5
 
+++ b/bet.pas
6
 
@@ -63,8 +63,11 @@
7
 
    AStringList := TStringList.Create;
8
 
    AProcess.CommandLine := lCmd;
9
 
    {$IFDEF UNIX}
10
 
-      AProcess.Environment.Add(gBGImg.FSLDIR);
11
 
-   AProcess.Environment.Add(gBGImg.FSLOUTPUTTYPE);
12
 
+      // On Debian FSLDIR is set outside mricron
13
 
+      //AProcess.Environment.Add(gBGImg.FSLDIR);
14
 
+   // and we must not set any environment variable to let the child process
15
 
+   // inherit the current environment settings
16
 
+   //AProcess.Environment.Add(gBGImg.FSLOUTPUTTYPE);
17
 
 
18
 
    //AProcess.Environment.Add('FSLDIR=/usr/local/fsl');
19
 
    //AProcess.Environment.Add('FSLOUTPUTTYPE=NIFTI_GZ');
20
 
@@ -84,18 +87,20 @@
21
 
   lCmd: string;
22
 
 begin
23
 
      result := false;
24
 
-     lCmd :=  extractfilepath(paramstr(0))+'bet';
25
 
-     {$IFNDEF Unix}
26
 
-     lCmd := lCmd+'.exe';
27
 
-     {$ENDIF}
28
 
-     if not PathExists (lCmd) then begin
29
 
-        lCmd := '/usr/local/fsl/bin/bet_8UI';
30
 
-        if not PathExists (lCmd) then begin
31
 
-           lCmd := '/usr/local/fsl/bin/bet';
32
 
-           if not PathExists (lCmd) then
33
 
-                 exit;
34
 
-        end;
35
 
-     end; //no bet in home folder...
36
 
+     // On Debian we guarantee that bet is globally available if installed at all
37
 
+     lCmd := 'bet';
38
 
+     //lCmd :=  extractfilepath(paramstr(0))+'bet';
39
 
+     //{$IFNDEF Unix}
40
 
+     //lCmd := lCmd+'.exe';
41
 
+     //{$ENDIF}
42
 
+     //if not PathExists (lCmd) then begin
43
 
+     //   lCmd := '/usr/local/fsl/bin/bet_8UI';
44
 
+     //   if not PathExists (lCmd) then begin
45
 
+     //      lCmd := '/usr/local/fsl/bin/bet';
46
 
+     //      if not PathExists (lCmd) then
47
 
+     //            exit;
48
 
+     //   end;
49
 
+     //end; //no bet in home folder...
50
 
   lCmd := lCmd+' "'+lInFile+'" "'+lOutFile +'" -f '+floattostr(lFrac);
51
 
   BETForm.Memo1.Lines.Add(lCmd);
52
 
   RunCmd(lCmd);