diff -Naur gambas3-3.7.1.orig/app/src/gambas3/.src/Packager/Package.module gambas3-3.7.1/app/src/gambas3/.src/Packager/Package.module
--- gambas3-3.7.1.orig/app/src/gambas3/.src/Packager/Package.module	2015-03-29 12:49:45.000000000 +0000
+++ gambas3-3.7.1/app/src/gambas3/.src/Packager/Package.module	2015-05-27 14:15:59.010037136 +0000
@@ -496,8 +496,8 @@
   Else
     Print #hFile, Project.Name
   Endif
-  Print #hFile, "Exec="; sExec '/usr/bin/"; $sName & ".gambas"
-  Print #hFile, "Icon="; sIcon '/usr/share/pixmaps/" & sIcon
+  Print #hFile, "Exec="; sExec '/usr/local/bin/"; $sName & ".gambas"
+  Print #hFile, "Icon="; sIcon '/usr/local/share/pixmaps/" & sIcon
   Print #hFile, "Terminal="; IIf(IsConsoleProject(), "true", "false")
   Print #hFile, "Type=Application"
   Print #hFile, "StartupNotify=true"
@@ -676,7 +676,7 @@
   If Project.Type = Project.TYPE_NORMAL Then
     AddLog(("Creating desktop file..."))
     hFile = Open sPackagePath &/ "debian/" & sPackageName & ".desktop" For Create
-    PrintDesktopFile(hFile, "/usr/bin/" & $sName, "/usr/share/pixmaps/" & sIcon)
+    PrintDesktopFile(hFile, "/usr/local/bin/" & $sName, "/usr/local/share/pixmaps/" & sIcon)
     Close #hFile
   Endif 
   
@@ -709,8 +709,8 @@
     hFile = Open sPackagePath &/ "debian/menu" For Create 
     Print #hFile, "?package("; sPackageName; "):needs=\""; IIf(IsConsoleProject(), "text", "X11"); "\" section=\""; Project.Menus[sSys]; "\"\\"
     Print #hFile, "title=\""; IIf(Project.Title, Project.Title, Project.Name); "\"\\" 
-    Print #hFile, "command=\"/usr/bin/"; sPackageName; "\"\\"
-    Print #hFile, "icon=\"/usr/share/pixmaps/"; sIcon; "\""
+    Print #hFile, "command=\"/usr/local/bin/"; sPackageName; "\"\\"
+    Print #hFile, "icon=\"/usr/local/share/pixmaps/"; sIcon; "\""
     Close #hFile
   Endif 
   
@@ -807,7 +807,7 @@
   'debian/rules
   hFile = Open sPackagePath &/ "debian/rules" For Create
   Output To #hFile
-  Print "#!/usr/bin/make -f"
+  Print "#!/usr/local/bin/make -f"
   Print "build: build-stamp"
   Print "build-stamp:"
   Print "\tdh_testdir"
@@ -833,9 +833,9 @@
   Print "\tdh_prep"
   Print "\tdh_installdirs" 
   If Project.Type = Project.TYPE_COMPONENT Then 
-      Print "\tcp src" &/ $sName & "/.component  $(CURDIR)/debian/" & sPackageName & "/usr/lib/gambas" & System.Version & "/" & Shell$($sName) & ".component"
-      Print "\tcp src" &/ $sName & "/.info  $(CURDIR)/debian/" & sPackageName & "/usr/share/gambas" & System.Version & "/info/" & Shell$($sName) & ".info " ""
-      Print "\tcp src" &/ $sName & "/.list  $(CURDIR)/debian/" & sPackageName & "/usr/share/gambas" & System.Version & "/info/" & Shell$($sName) & ".list"
+      Print "\tcp src" &/ $sName & "/.component  $(CURDIR)/debian/" & sPackageName & "/usr/local/lib/gambas" & System.Version & "/" & Shell$($sName) & ".component"
+      Print "\tcp src" &/ $sName & "/.info  $(CURDIR)/debian/" & sPackageName & "/usr/local/share/gambas" & System.Version & "/info/" & Shell$($sName) & ".info " ""
+      Print "\tcp src" &/ $sName & "/.list  $(CURDIR)/debian/" & sPackageName & "/usr/local/share/gambas" & System.Version & "/info/" & Shell$($sName) & ".list"
   Endif 
   Print "\ttouch install-stamp"
   Print 
@@ -946,7 +946,7 @@
   ' debian/rules
   hFile = Open sPackagePath &/ "debian/rules" For Create
   Output To #hFile
-  Print "#!/usr/bin/make -f"
+  Print "#!/usr/local/bin/make -f"
   Print
   Print "build build-arch build-indep:"
   Print
@@ -1693,13 +1693,13 @@
 
   If Project.Type = Project.TYPE_COMPONENT Then 
   
-    For Each sCmd In ["/usr", "/usr/lib", "/usr/lib/gambas" & System.Version, "/usr/share", "/usr/share/gambas" & System.Version, "/usr/share/gambas" & System.Version & "/info", "/install"]
+    For Each sCmd In ["/usr", "/usr/lib", "/usr/lib/gambas", "/usr/local/lib/gambas" & System.Version, "/usr/share", "/usr/share/gambas", "/usr/local/share/gambas" & System.Version, "/usr/local/share/gambas" & System.Version & "/info", "/install"]
       Try Mkdir sBuildDir &/ sCmd
     Next
 
   Else
 
-    For Each sCmd In ["/usr", "/usr/bin", "/usr/share", "/usr/share/applications", "/usr/share/pixmaps", "/install"]
+    For Each sCmd In ["/usr", "/usr/bin", "/usr/local/bin", "/usr/local/share", "/usr/local/share/applications", "/usr/local/share/pixmaps", "/install"]
       Try Mkdir sBuildDir &/ sCmd
     Next
   
@@ -1711,16 +1711,16 @@
   
     ' 2. Copy the library, the information files and the controls
   
-    Copy Project.GetExecPath() To sBuildDir &/ "/usr/lib/gambas" & System.Version &/ $sName & ".gambas"
-    Copy Project.Dir &/ ".component" To sBuildDir &/ "/usr/lib/gambas" & System.Version &/ $sName & ".component"
-    Copy Project.Dir &/ ".info" To sBuildDir &/ "/usr/share/gambas" & System.Version &/ "info/" & $sName & ".info"
-    Copy Project.Dir &/ ".list" To sBuildDir &/ "/usr/share/gambas" & System.Version &/ "info/" & $sName & ".list"
+    Copy Project.GetExecPath() To sBuildDir &/ "/usr/local/lib/gambas" & System.Version &/ $sName & ".gambas"
+    Copy Project.Dir &/ ".component" To sBuildDir &/ "/usr/local/lib/gambas" & System.Version &/ $sName & ".component"
+    Copy Project.Dir &/ ".info" To sBuildDir &/ "/usr/local/share/gambas" & System.Version &/ "info/" & $sName & ".info"
+    Copy Project.Dir &/ ".list" To sBuildDir &/ "/usr/local/share/gambas" & System.Version &/ "info/" & $sName & ".list"
   
     If Exist(Project.Dir &/ ".hidden/control") Then 
-      Try Mkdir sBuildDir &/ "/usr/share/gambas" & System.Version & "/control"
-      Try Mkdir sBuildDir &/ "/usr/share/gambas" & System.Version & "/control/" & $sName
+      Try Mkdir sBuildDir &/ "/usr/local/share/gambas" & System.Version & "/control"
+      Try Mkdir sBuildDir &/ "/usr/local/share/gambas" & System.Version & "/control/" & $sName
       For Each sFile In Dir(Project.Dir &/ ".hidden/control", "*.png") 
-        Copy Project.Dir &/ ".hidden/control" &/ sFile To sBuildDir &/ "/usr/share/gambas" & System.Version & "/control/" & $sName &/ sFile
+        Copy Project.Dir &/ ".hidden/control" &/ sFile To sBuildDir &/ "/usr/local/share/gambas" & System.Version & "/control/" & $sName &/ sFile
       Next
     Endif
   
@@ -1728,14 +1728,14 @@
 
     ' 2. Copy the executable
   
-    'COPY Project.Dir &/ Project.Name & ".gambas" TO sBuildDir &/ "/usr/bin" &/ Project.Name
+    'COPY Project.Dir &/ Project.Name & ".gambas" TO sBuildDir &/ "/usr/local/bin" &/ Project.Name
     
     If Project.Type = Project.TYPE_NORMAL Then
-      Copy Project.GetExecPath() To sBuildDir &/ "/usr/bin" &/ $sName
-      Chmod sBuildDir &/ "/usr/bin" &/ $sName To "..x..x..x"
+      Copy Project.GetExecPath() To sBuildDir &/ "/usr/local/bin" &/ $sName
+      Chmod sBuildDir &/ "/usr/local/bin" &/ $sName To "..x..x..x"
     Else ' TYPE_LIBRARY
-      Copy Project.GetExecPath() To sBuildDir &/ "/usr/bin" &/ $sName & ".gambas"
-      Chmod sBuildDir &/ "/usr/bin" &/ $sName & ".gambas" To "..x..x..x"
+      Copy Project.GetExecPath() To sBuildDir &/ "/usr/local/bin" &/ $sName & ".gambas"
+      Chmod sBuildDir &/ "/usr/local/bin" &/ $sName & ".gambas" To "..x..x..x"
     Endif
       
     If Project.Type = Project.TYPE_NORMAL Then
@@ -1748,15 +1748,15 @@
       '   hIcon = Image.Load("img/gambas.png")
       ' ENDIF
     
-      Project.StretchIcon(Project.Dir &/ Project.Icon, 48).Save(sBuildDir &/ "/usr/share/pixmaps" &/ Project.Name & ".png")
+      Project.StretchIcon(Project.Dir &/ Project.Icon, 48).Save(sBuildDir &/ "/usr/local/share/pixmaps" &/ Project.Name & ".png")
     
       ' 4. Make the desktop file
       
       sIcon = Shell$($sName) & ".png"
     
-      hFile = Open sBuildDir &/ "/usr/share/applications/" & sPackageName & ".desktop" For Create
+      hFile = Open sBuildDir &/ "/usr/local/share/applications/" & sPackageName & ".desktop" For Create
     
-      PrintDesktopFile(hFile, "/usr/bin/" & $sName, "/usr/share/pixmaps/" & $sName & ".png")
+      PrintDesktopFile(hFile, "/usr/local/bin/" & $sName, "/usr/local/share/pixmaps/" & $sName & ".png")
     
       Close #hFile
       
@@ -2024,7 +2024,7 @@
     Project.StretchIcon(Project.Dir &/ Project.Icon, 48).Save(sBuildDir &/ Project.Name & ".png")
 
     hFile = Open sBuildDir &/ $sPackageName & ".desktop" For Create
-    PrintDesktopFile(hFile, "/usr/bin/" & $sName, "/usr/share/pixmaps/" & $sName & ".png")
+    PrintDesktopFile(hFile, "/usr/local/bin/" & $sName, "/usr/local/share/pixmaps/" & $sName & ".png")
     Close #hFile
     
   Endif 
@@ -2076,40 +2076,40 @@
     
       Case Project.TYPE_COMPONENT
         
-        Print #hFile, "  install -d ${pkgdir}/usr/lib/gambas" & System.Version
-        Print #hFile, "  install -d ${pkgdir}/usr/share/gambas" & System.Version &/ "info"
-        Print #hFile, "  install -m755 " & $sName & ".gambas ${pkgdir}/usr/lib/gambas" & System.Version
-        Print #hFile, "  install .component ${pkgdir}/usr/lib/gambas" & System.Version &/ $sName & ".component"
-        Print #hFile, "  chmod a-x ${pkgdir}/usr/lib/gambas" & System.Version &/ $sName & ".component" 
-        Print #hFile, "  install .info ${pkgdir}/usr/share/gambas" & System.Version &/ "info" &/ $sName & ".info"
-        Print #hFile, "  chmod a-x ${pkgdir}/usr/share/gambas" & System.Version &/ "info" &/ $sName & ".info" 
-        Print #hFile, "  install .list ${pkgdir}/usr/share/gambas" & System.Version &/ "info" &/ $sName & ".list"
-        Print #hFile, "  chmod a-x ${pkgdir}/usr/share/gambas" & System.Version &/ "info" &/ $sName & ".list" 
+        Print #hFile, "  install -d ${pkgdir}/usr/local/lib/gambas" & System.Version
+        Print #hFile, "  install -d ${pkgdir}/usr/local/share/gambas" & System.Version &/ "info"
+        Print #hFile, "  install -m755 " & $sName & ".gambas ${pkgdir}/usr/local/lib/gambas" & System.Version
+        Print #hFile, "  install .component ${pkgdir}/usr/local/lib/gambas" & System.Version &/ $sName & ".component"
+        Print #hFile, "  chmod a-x ${pkgdir}/usr/local/lib/gambas" & System.Version &/ $sName & ".component" 
+        Print #hFile, "  install .info ${pkgdir}/usr/local/share/gambas" & System.Version &/ "info" &/ $sName & ".info"
+        Print #hFile, "  chmod a-x ${pkgdir}/usr/local/share/gambas" & System.Version &/ "info" &/ $sName & ".info" 
+        Print #hFile, "  install .list ${pkgdir}/usr/local/share/gambas" & System.Version &/ "info" &/ $sName & ".list"
+        Print #hFile, "  chmod a-x ${pkgdir}/usr/local/share/gambas" & System.Version &/ "info" &/ $sName & ".list" 
         Print #hFile, "  if test -d control; then"
-        Print #hFile, "    install -d ${pkgdir}/usr/share/gambas" & System.Version &/ "control" &/ $sName
-        Print #hFile, "    install .hidden/control/*.png ${pkgdir}/usr/share/gambas" & System.Version &/ "control" &/ $sName
-        Print #hFile, "    chmod a-x ${pkgdir}/usr/share/gambas" & System.Version &/ "control" &/ $sName &/ "*.png"
+        Print #hFile, "    install -d ${pkgdir}/usr/local/share/gambas" & System.Version &/ "control" &/ $sName
+        Print #hFile, "    install .hidden/control/*.png ${pkgdir}/usr/local/share/gambas" & System.Version &/ "control" &/ $sName
+        Print #hFile, "    chmod a-x ${pkgdir}/usr/local/share/gambas" & System.Version &/ "control" &/ $sName &/ "*.png"
         Print #hFile, "  fi"
         
       Case Project.TYPE_LIBRARY
         
-        Print #hFile, "  install -d ${pkgdir}/usr/bin"
-        Print #hFile, "  install -m755 " & $sName & ".gambas ${pkgdir}/usr/bin" &/ $sName & ".gambas"
+        Print #hFile, "  install -d ${pkgdir}/usr/local/bin"
+        Print #hFile, "  install -m755 " & $sName & ".gambas ${pkgdir}/usr/local/bin" &/ $sName & ".gambas"
 
       Case Project.TYPE_NORMAL
   
-        Print #hFile, "  install -d ${pkgdir}/usr/bin"
-        Print #hFile, "  install -m755 " & $sName & ".gambas ${pkgdir}/usr/bin" &/ $sName
+        Print #hFile, "  install -d ${pkgdir}/usr/local/bin"
+        Print #hFile, "  install -m755 " & $sName & ".gambas ${pkgdir}/usr/local/bin" &/ $sName
         Print #hFile, "  install -D .." &/ Project.Name & ".png \\"
-        Print #hFile, "    ${pkgdir}/usr/share/pixmaps" &/ Project.Name & ".png"
+        Print #hFile, "    ${pkgdir}/usr/local/share/pixmaps" &/ Project.Name & ".png"
         Print #hFile, "  install -D .." &/ $sPackageName & ".desktop \\"
-        Print #hFile, "    ${pkgdir}/usr/share/applications" &/ $sPackageName & ".desktop"
+        Print #hFile, "    ${pkgdir}/usr/local/share/applications" &/ $sPackageName & ".desktop"
 
     End Select
 
     Print #hFile, GetExtraFilesDir(sSys, "  install -d ${pkgdir}&1");
     Print #hFile, GetExtraFiles(sSys, "  install -p ${srcdir}/${_realname}/.hidden/&1 ${pkgdir}&2/&1", "  cp -R --preserve=timestamp ${srcdir}/${_realname}/.hidden/&1 ${pkgdir}&2/&1");
-    Print #hFile, "  install -Dm644 ${srcdir}/license.txt ${pkgdir}/usr/share/licenses" &/ $sPackageName &/ "license.txt"
+    Print #hFile, "  install -Dm644 ${srcdir}/license.txt ${pkgdir}/usr/local/share/licenses" &/ $sPackageName &/ "license.txt"
     Print #hFile, "}"
     
   Close #hFile
@@ -2213,40 +2213,40 @@
   '   
   '     Case Project.TYPE_COMPONENT
   '       
-  '       Print #hFile, "  install -d ${pkgdir}/usr/lib/gambas" & System.Version
-  '       Print #hFile, "  install -d ${pkgdir}/usr/share/gambas" & System.Version &/ "info"
-  '       Print #hFile, "  install -m755 " & $sName & ".gambas ${pkgdir}/usr/lib/gambas" & System.Version
-  '       Print #hFile, "  install .component ${pkgdir}/usr/lib/gambas" & System.Version &/ $sName & ".component"
-  '       Print #hFile, "  chmod a-x ${pkgdir}/usr/lib/gambas" & System.Version &/ $sName & ".component" 
-  '       Print #hFile, "  install .info ${pkgdir}/usr/share/gambas" & System.Version &/ "info" &/ $sName & ".info"
-  '       Print #hFile, "  chmod a-x ${pkgdir}/usr/share/gambas" & System.Version &/ "info" &/ $sName & ".info" 
-  '       Print #hFile, "  install .list ${pkgdir}/usr/share/gambas" & System.Version &/ "info" &/ $sName & ".list"
-  '       Print #hFile, "  chmod a-x ${pkgdir}/usr/share/gambas" & System.Version &/ "info" &/ $sName & ".list" 
+  '       Print #hFile, "  install -d ${pkgdir}/usr/local/lib/gambas" & System.Version
+  '       Print #hFile, "  install -d ${pkgdir}/usr/local/share/gambas" & System.Version &/ "info"
+  '       Print #hFile, "  install -m755 " & $sName & ".gambas ${pkgdir}/usr/local/lib/gambas" & System.Version
+  '       Print #hFile, "  install .component ${pkgdir}/usr/local/lib/gambas" & System.Version &/ $sName & ".component"
+  '       Print #hFile, "  chmod a-x ${pkgdir}/usr/local/lib/gambas" & System.Version &/ $sName & ".component" 
+  '       Print #hFile, "  install .info ${pkgdir}/usr/local/share/gambas" & System.Version &/ "info" &/ $sName & ".info"
+  '       Print #hFile, "  chmod a-x ${pkgdir}/usr/local/share/gambas" & System.Version &/ "info" &/ $sName & ".info" 
+  '       Print #hFile, "  install .list ${pkgdir}/usr/local/share/gambas" & System.Version &/ "info" &/ $sName & ".list"
+  '       Print #hFile, "  chmod a-x ${pkgdir}/usr/local/share/gambas" & System.Version &/ "info" &/ $sName & ".list" 
   '       Print #hFile, "  if test -d control; then"
-  '       Print #hFile, "    install -d ${pkgdir}/usr/share/gambas" & System.Version &/ "control" &/ $sName
-  '       Print #hFile, "    install .hidden/control/*.png ${pkgdir}/usr/share/gambas" & System.Version &/ "control" &/ $sName
-  '       Print #hFile, "    chmod a-x ${pkgdir}/usr/share/gambas" & System.Version &/ "control" &/ $sName &/ "*.png"
+  '       Print #hFile, "    install -d ${pkgdir}/usr/local/share/gambas" & System.Version &/ "control" &/ $sName
+  '       Print #hFile, "    install .hidden/control/*.png ${pkgdir}/usr/local/share/gambas" & System.Version &/ "control" &/ $sName
+  '       Print #hFile, "    chmod a-x ${pkgdir}/usr/local/share/gambas" & System.Version &/ "control" &/ $sName &/ "*.png"
   '       Print #hFile, "  fi"
   '       
   '     Case Project.TYPE_LIBRARY
   '       
-  '       Print #hFile, "  install -d ${pkgdir}/usr/bin"
-  '       Print #hFile, "  install -m755 " & $sName & ".gambas ${pkgdir}/usr/bin" &/ $sName & ".gambas"
+  '       Print #hFile, "  install -d ${pkgdir}/usr/local/bin"
+  '       Print #hFile, "  install -m755 " & $sName & ".gambas ${pkgdir}/usr/local/bin" &/ $sName & ".gambas"
   ' 
   '     Case Project.TYPE_NORMAL
   ' 
-  '       Print #hFile, "  install -d ${pkgdir}/usr/bin"
-  '       Print #hFile, "  install -m755 " & $sName & ".gambas ${pkgdir}/usr/bin" &/ $sName
+  '       Print #hFile, "  install -d ${pkgdir}/usr/local/bin"
+  '       Print #hFile, "  install -m755 " & $sName & ".gambas ${pkgdir}/usr/local/bin" &/ $sName
   '       Print #hFile, "  install -D .." &/ Project.Name & ".png \\"
-  '       Print #hFile, "    ${pkgdir}/usr/share/pixmaps" &/ Project.Name & ".png"
+  '       Print #hFile, "    ${pkgdir}/usr/local/share/pixmaps" &/ Project.Name & ".png"
   '       Print #hFile, "  install -D .." &/ $sPackageName & ".desktop \\"
-  '       Print #hFile, "    ${pkgdir}/usr/share/applications" &/ $sPackageName & ".desktop"
+  '       Print #hFile, "    ${pkgdir}/usr/local/share/applications" &/ $sPackageName & ".desktop"
   ' 
   '   End Select
   ' 
   '   Print #hFile, GetExtraFilesDir(sSys, "  install -d ${pkgdir}&1\n");
   '   Print #hFile, GetExtraFiles(sSys, "  install -p ${srcdir}/${_realname}/.hidden/&1 ${pkgdir}&2/&1", "  cp -R --preserve=timestamp ${srcdir}/${_realname}/.hidden/&1 ${pkgdir}&2/&1");
-  '   Print #hFile, "  install -Dm644 ${srcdir}/license.txt ${pkgdir}/usr/share/licenses" &/ $sPackageName &/ "license.txt"
+  '   Print #hFile, "  install -Dm644 ${srcdir}/license.txt ${pkgdir}/usr/local/share/licenses" &/ $sPackageName &/ "license.txt"
   '   Print #hFile, "}"
   '   
   ' Close #hFile
diff -Naur gambas3-3.7.1.orig/app/src/gambas3/.src/Welcome/FSystemInfo.class gambas3-3.7.1/app/src/gambas3/.src/Welcome/FSystemInfo.class
--- gambas3-3.7.1.orig/app/src/gambas3/.src/Welcome/FSystemInfo.class	2015-03-29 12:49:44.000000000 +0000
+++ gambas3-3.7.1/app/src/gambas3/.src/Welcome/FSystemInfo.class	2015-05-27 14:12:39.963367901 +0000
@@ -135,18 +135,18 @@
     If Not Error Then aText.Add("Memory=" & sTemp)
   Endif
   If System.Family = "Cygwin" Then
-     aSearchPath = ["/bin", "/lib", "/usr/lib"]
+     aSearchPath = ["/bin", "/lib", "/usr/lib", "/usr/local/lib"]
      cSearch = ["Qt4": "cygQtCore*.dll", "GTK+": "cyggtk-x11-2*.dll", "GTK+3": "cyggtk-3-*.dll", "SDL": "cygSDL-*.dll", "GStreamer": "cyggstreamer-*.dll", "Poppler": "cygpoppler-*.dll", "Curl": "cygcurl-*.dll", "OpenGL": "cygGL-*.dll", 
       "Cairo": "cygcairo-[0-9]*.dll", "DBus": "cygdbus-[0-9]*.dll"]
   Else 
-     aSearchPath = ["/lib", "/usr/lib"]
+     aSearchPath = ["/lib", "/usr/lib", "/usr/local/lib"]
      cSearch = ["Qt4": "libQtCore.so.*.*.*", "GTK+": "libgtk-x11-2*.so.*.*.*", "GTK+3": "libgtk-3*.so.*.*.*", "SDL": "libSDL-1.*.so.*.*.*", "GStreamer": "libgstreamer-*.so.*.*.*", "Poppler": "libpoppler.so.*.*.*", "Curl": "libcurl.so.*.*.*", 
      "OpenGL": "libGL.so.*.*.*", "Cairo": "libcairo.so.*.*.*", "DBus": "libdbus-[0-9].so.*.*.*"]
   EndIf
   cFile = New Collection
   
   aText.Add("[Libraries]")
-  'For Each sDir In ["/bin", "/lib", "/usr/lib"]
+  'For Each sDir In ["/bin", "/lib", "/usr/lib", "/usr/local/lib"]
   For Each sDir In aSearchPath
     For Each sFile In RDir(sDir, "", gb.File, False).Sort(gb.IgnoreCase)
       sFile = File.Name(sFile)
diff -Naur gambas3-3.7.1.orig/comp/src/gb.desktop/.hidden/xdg-utils-1.0.2/scripts/xdg-desktop-menu gambas3-3.7.1/comp/src/gb.desktop/.hidden/xdg-utils-1.0.2/scripts/xdg-desktop-menu
--- gambas3-3.7.1.orig/comp/src/gb.desktop/.hidden/xdg-utils-1.0.2/scripts/xdg-desktop-menu	2015-03-29 12:50:11.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.desktop/.hidden/xdg-utils-1.0.2/scripts/xdg-desktop-menu	2015-05-27 14:07:49.763364501 +0000
@@ -739,7 +739,7 @@
     xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
 
     xdg_system_dirs="$XDG_CONFIG_DIRS"
-    [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/etc/xdg
+    [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/etc/xdg
     xdg_global_dir=
     for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do
         if [ -w $x/$xdg_dir_name ] ; then
@@ -787,7 +787,7 @@
         return
     fi
 
-    if [ $action = "install" -a -f "/etc/xdg/menus/gnome-applications.menu" ] ; then
+    if [ $action = "install" -a -f "/usr/local/etc/xdg/menus/gnome-applications.menu" ] ; then
         # Work around for Debian Gnome
         gnome_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/gnome-applications-merged^'`
         if [ ! -e "$gnome_xdg_dir" ] ; then
@@ -805,7 +805,7 @@
             eval 'ln -s "applications-merged" "$mandrake_xdg_dir"'$xdg_redirect_output
         fi
     fi
-    if [ $action = "install" -a x"$mode" = x"user" -a -d "/etc/xdg/menus/kde-applications-merged" ] ; then
+    if [ $action = "install" -a x"$mode" = x"user" -a -d "/usr/local/etc/xdg/menus/kde-applications-merged" ] ; then
         # Work around for Fedora Core 5 + patched KDE
         kde_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/kde-applications-merged^'`
         if [ ! -e "$kde_xdg_dir" ] ; then
@@ -814,7 +814,7 @@
             eval 'ln -s "applications-merged" "$kde_xdg_dir"'$xdg_redirect_output
         fi
     fi        
-    if [ $action = "install" -a x"$mode" = x"system" -a -d "/etc/xdg/menus/kde-applications-merged" -a ! -d "/etc/xdg/menus/applications-merged" ] ; then
+    if [ $action = "install" -a x"$mode" = x"system" -a -d "/usr/local/etc/xdg/menus/kde-applications-merged" -a ! -d "/usr/local/etc/xdg/menus/applications-merged" ] ; then
         # Work around for Kubuntu 6.06
         kde_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/kde-applications-merged^'`
         DEBUG 1 "Kubuntu Workaround: Link '$xdg_dir' to 'kde-applications-merged'"
@@ -1179,11 +1179,11 @@
 done
 
 kde_user_dir="$HOME/.kde/share/applnk"
-kde_global_dir="/usr/share/applnk"
+kde_global_dir="/usr/local/share/applnk"
 [ -w $kde_global_dir ] || kde_global_dir=
 
 gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir="/usr/share/gnome/apps"
+gnome_global_dir="/usr/local/share/gnome/apps"
 [ -w $gnome_global_dir ] || gnome_global_dir=
 
 [ -f /etc/mandriva-release ] && need_mandriva_fix=true
diff -Naur gambas3-3.7.1.orig/comp/src/gb.desktop/.hidden/xdg-utils-1.0.2/scripts/xdg-mime gambas3-3.7.1/comp/src/gb.desktop/.hidden/xdg-utils-1.0.2/scripts/xdg-mime
--- gambas3-3.7.1.orig/comp/src/gb.desktop/.hidden/xdg-utils-1.0.2/scripts/xdg-mime	2015-03-29 12:50:11.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.desktop/.hidden/xdg-utils-1.0.2/scripts/xdg-mime	2015-05-27 13:31:02.526673406 +0000
@@ -859,7 +859,7 @@
 # TODO: Gnome legacy support
 # See http://forums.fedoraforum.org/showthread.php?t=26875
 gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir=/usr/share/gnome/apps
+gnome_global_dir=/usr/local/share/gnome/apps
 [ -w $gnome_global_dir ] || gnome_global_dir=
 DEBUG 3 "gnome_user_dir: $gnome_user_dir"
 DEBUG 3 "gnome_global_dir: $gnome_global_dir"
diff -Naur gambas3-3.7.1.orig/comp/src/gb.desktop/.hidden/xdg-utils-1.0.3.pre/xdg-desktop-menu gambas3-3.7.1/comp/src/gb.desktop/.hidden/xdg-utils-1.0.3.pre/xdg-desktop-menu
--- gambas3-3.7.1.orig/comp/src/gb.desktop/.hidden/xdg-utils-1.0.3.pre/xdg-desktop-menu	2015-03-29 12:50:11.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.desktop/.hidden/xdg-utils-1.0.3.pre/xdg-desktop-menu	2015-05-27 14:09:25.033362959 +0000
@@ -706,7 +706,7 @@
     xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
 
     xdg_system_dirs="$XDG_CONFIG_DIRS"
-    [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/etc/xdg
+    [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/etc/xdg
     xdg_global_dir=
     for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do
         if [ -w $x/$xdg_dir_name ] ; then
@@ -754,7 +754,7 @@
         return
     fi
 
-    if [ $action = "install" -a -f "/etc/xdg/menus/gnome-applications.menu" ] ; then
+    if [ $action = "install" -a -f "/usr/local/etc/xdg/menus/gnome-applications.menu" ] ; then
         # Work around for Debian Gnome
         gnome_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/gnome-applications-merged^'`
         if [ ! -e "$gnome_xdg_dir" ] ; then
@@ -772,7 +772,7 @@
             eval 'ln -s "applications-merged" "$mandrake_xdg_dir"'$xdg_redirect_output
         fi
     fi
-    if [ $action = "install" -a x"$mode" = x"user" -a -d "/etc/xdg/menus/kde-applications-merged" ] ; then
+    if [ $action = "install" -a x"$mode" = x"user" -a -d "/usr/local/etc/xdg/menus/kde-applications-merged" ] ; then
         # Work around for Fedora Core 5 + patched KDE
         kde_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/kde-applications-merged^'`
         if [ ! -e "$kde_xdg_dir" ] ; then
@@ -781,7 +781,7 @@
             eval 'ln -s "applications-merged" "$kde_xdg_dir"'$xdg_redirect_output
         fi
     fi
-    if [ $action = "install" -a x"$mode" = x"system" -a -d "/etc/xdg/menus/kde-applications-merged" -a ! -d "/etc/xdg/menus/applications-merged" ] ; then
+    if [ $action = "install" -a x"$mode" = x"system" -a -d "/usr/local/etc/xdg/menus/kde-applications-merged" -a ! -d "/usr/local/etc/xdg/menus/applications-merged" ] ; then
         # Work around for Kubuntu 6.06
         kde_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/kde-applications-merged^'`
         DEBUG 1 "Kubuntu Workaround: Link '$xdg_dir' to 'kde-applications-merged'"
@@ -1150,7 +1150,7 @@
 [ -w $kde_global_dir ] || kde_global_dir=
 
 gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir="/usr/share/gnome/apps"
+gnome_global_dir="/usr/local/share/gnome/apps"
 [ -w $gnome_global_dir ] || gnome_global_dir=
 
 DEBUG 3 "Install locations for *.desktop files:"
diff -Naur gambas3-3.7.1.orig/comp/src/gb.desktop/.hidden/xdg-utils-1.0.3.pre/xdg-mime gambas3-3.7.1/comp/src/gb.desktop/.hidden/xdg-utils-1.0.3.pre/xdg-mime
--- gambas3-3.7.1.orig/comp/src/gb.desktop/.hidden/xdg-utils-1.0.3.pre/xdg-mime	2015-03-29 12:50:11.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.desktop/.hidden/xdg-utils-1.0.3.pre/xdg-mime	2015-05-27 13:32:32.696674009 +0000
@@ -981,7 +981,7 @@
 # TODO: Gnome legacy support
 # See http://forums.fedoraforum.org/showthread.php?t=26875
 gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir=/usr/share/gnome/apps
+gnome_global_dir=/usr/local/share/gnome/apps
 [ -w $gnome_global_dir ] || gnome_global_dir=
 DEBUG 3 "gnome_user_dir: $gnome_user_dir"
 DEBUG 3 "gnome_global_dir: $gnome_global_dir"
diff -Naur gambas3-3.7.1.orig/comp/src/gb.desktop/.hidden/xdg-utils-1.0.3.pre/xdg-settings gambas3-3.7.1/comp/src/gb.desktop/.hidden/xdg-utils-1.0.3.pre/xdg-settings
--- gambas3-3.7.1.orig/comp/src/gb.desktop/.hidden/xdg-utils-1.0.3.pre/xdg-settings	2015-03-29 12:50:11.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.desktop/.hidden/xdg-utils-1.0.3.pre/xdg-settings	2015-05-27 14:08:27.866696722 +0000
@@ -653,7 +653,7 @@
 
 get_browser_xfce()
 {
-    search="${XDG_CONFIG_HOME:-$HOME/.config}:${XDG_CONFIG_DIRS:-/etc/xdg}"
+    search="${XDG_CONFIG_HOME:-$HOME/.config}:${XDG_CONFIG_DIRS:-/usr/local/etc/xdg}"
     IFS=:
     for dir in $search; do
         unset IFS
diff -Naur gambas3-3.7.1.orig/comp/src/gb.desktop/.src/DesktopFile.class gambas3-3.7.1/comp/src/gb.desktop/.src/DesktopFile.class
--- gambas3-3.7.1.orig/comp/src/gb.desktop/.src/DesktopFile.class	2015-03-29 12:50:11.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.desktop/.src/DesktopFile.class	2015-05-27 13:33:29.993341311 +0000
@@ -403,11 +403,11 @@
   
   hImage = $cIconCache[sKey]
   If Not hImage Then
-    sPath = Subst("/usr/share/icons/hicolor/&1x&1/apps/&2.png", CStr(Size), $sIcon)
+    sPath = Subst("/usr/local/share/icons/hicolor/&1x&1/apps/&2.png", CStr(Size), $sIcon)
     If Exist(sPath) Then Try hImage = Image.Load(sPath)
   Endif
   If Not hImage Then
-    sPath = Subst("/usr/share/pixmaps/&1.png", $sIcon)
+    sPath = Subst("/usr/local/share/pixmaps/&1.png", $sIcon)
     If Exist(sPath) Then Try hImage = Image.Load(sPath).Stretch(Size, Size)
   Endif
   If Not hImage Then
diff -Naur gambas3-3.7.1.orig/comp/src/gb.desktop/.src/DesktopMime.class gambas3-3.7.1/comp/src/gb.desktop/.src/DesktopMime.class
--- gambas3-3.7.1.orig/comp/src/gb.desktop/.src/DesktopMime.class	2015-03-29 12:50:11.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.desktop/.src/DesktopMime.class	2015-05-27 13:34:03.523340844 +0000
@@ -46,7 +46,7 @@
   sMime = Replace(sMime, "/", "-")
   hImage = $cIconCache[sKey]
   
-  For Each sDir In [Desktop.DataDir &/ "icons", "/usr/share/icons"]
+  For Each sDir In [Desktop.DataDir &/ "icons", "/usr/local/share/icons"]
     For Each sSize In [CStr(Size), "128", "64", "32"]      
       sPath = Subst(sDir &/ "hicolor/&1x&1/mimetypes/&2.png", sSize, sMime)
       If Exist(sPath) Then 
@@ -58,7 +58,7 @@
   Next
   
   If Not hImage Then
-    sPath = Subst("/usr/share/pixmaps/&1.png", sMime)
+    sPath = Subst("/usr/local/share/pixmaps/&1.png", sMime)
     If Exist(sPath) Then Try hImage = Image.Load(sPath)
   Endif
 
diff -Naur gambas3-3.7.1.orig/comp/src/gb.desktop/.src/Main.module gambas3-3.7.1/comp/src/gb.desktop/.src/Main.module
--- gambas3-3.7.1.orig/comp/src/gb.desktop/.src/Main.module	2015-03-29 12:50:11.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.desktop/.src/Main.module	2015-05-27 14:10:03.203366132 +0000
@@ -126,7 +126,7 @@
   If Not sXdgConfigHome Then sXdgConfigHome = User.Home & "/.config" ' Sinon val. par défaut
   
   sXdgConfigDirs = Application.Env["XDG_CONFIG_DIRS"] ' $XDG_CONFIG_DIRS définie ?
-  If Not sXdgConfigDirs Then sXdgConfigDirs = "/etc/xdg" ' Sinon val. par défaut
+  If Not sXdgConfigDirs Then sXdgConfigDirs = "/usr/local/etc/xdg" ' Sinon val. par défaut
   
   sFileConfig = SearchPathConfig(sXdgConfigHome, sXdgConfigDirs)
   If sFileConfig Then
diff -Naur gambas3-3.7.1.orig/comp/src/gb.desktop/xdg-utils/xdg-desktop-menu gambas3-3.7.1/comp/src/gb.desktop/xdg-utils/xdg-desktop-menu
--- gambas3-3.7.1.orig/comp/src/gb.desktop/xdg-utils/xdg-desktop-menu	2015-03-29 12:50:11.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.desktop/xdg-utils/xdg-desktop-menu	2015-05-27 14:06:29.923363979 +0000
@@ -709,7 +709,7 @@
     xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
 
     xdg_system_dirs="$XDG_CONFIG_DIRS"
-    [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/etc/xdg
+    [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/etc/xdg
     xdg_global_dir=
     for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do
         if [ -w $x/$xdg_dir_name ] ; then
@@ -757,7 +757,7 @@
         return
     fi
 
-    if [ $action = "install" -a -f "/etc/xdg/menus/gnome-applications.menu" ] ; then
+    if [ $action = "install" -a -f "/usr/local/etc/xdg/menus/gnome-applications.menu" ] ; then
         # Work around for Debian Gnome
         gnome_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/gnome-applications-merged^'`
         if [ ! -e "$gnome_xdg_dir" ] ; then
@@ -775,7 +775,7 @@
             eval 'ln -s "applications-merged" "$mandrake_xdg_dir"'$xdg_redirect_output
         fi
     fi
-    if [ $action = "install" -a x"$mode" = x"user" -a -d "/etc/xdg/menus/kde-applications-merged" ] ; then
+    if [ $action = "install" -a x"$mode" = x"user" -a -d "/usr/local/etc/xdg/menus/kde-applications-merged" ] ; then
         # Work around for Fedora Core 5 + patched KDE
         kde_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/kde-applications-merged^'`
         if [ ! -e "$kde_xdg_dir" ] ; then
@@ -784,7 +784,7 @@
             eval 'ln -s "applications-merged" "$kde_xdg_dir"'$xdg_redirect_output
         fi
     fi
-    if [ $action = "install" -a x"$mode" = x"system" -a -d "/etc/xdg/menus/kde-applications-merged" -a ! -d "/etc/xdg/menus/applications-merged" ] ; then
+    if [ $action = "install" -a x"$mode" = x"system" -a -d "/usr/local/etc/xdg/menus/kde-applications-merged" -a ! -d "/usr/local/etc/xdg/menus/applications-merged" ] ; then
         # Work around for Kubuntu 6.06
         kde_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/kde-applications-merged^'`
         DEBUG 1 "Kubuntu Workaround: Link '$xdg_dir' to 'kde-applications-merged'"
@@ -1153,7 +1153,7 @@
 [ -w $kde_global_dir ] || kde_global_dir=
 
 gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir="/usr/share/gnome/apps"
+gnome_global_dir="/usr/local/share/gnome/apps"
 [ -w $gnome_global_dir ] || gnome_global_dir=
 
 DEBUG 3 "Install locations for *.desktop files:"
diff -Naur gambas3-3.7.1.orig/comp/src/gb.desktop/xdg-utils/xdg-mime gambas3-3.7.1/comp/src/gb.desktop/xdg-utils/xdg-mime
--- gambas3-3.7.1.orig/comp/src/gb.desktop/xdg-utils/xdg-mime	2015-03-29 12:50:11.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.desktop/xdg-utils/xdg-mime	2015-05-27 13:29:51.996672183 +0000
@@ -985,7 +985,7 @@
 # TODO: Gnome legacy support
 # See http://forums.fedoraforum.org/showthread.php?t=26875
 gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir=/usr/share/gnome/apps
+gnome_global_dir=/usr/local/share/gnome/apps
 [ -w $gnome_global_dir ] || gnome_global_dir=
 DEBUG 3 "gnome_user_dir: $gnome_user_dir"
 DEBUG 3 "gnome_global_dir: $gnome_global_dir"
diff -Naur gambas3-3.7.1.orig/comp/src/gb.desktop/xdg-utils/xdg-settings gambas3-3.7.1/comp/src/gb.desktop/xdg-utils/xdg-settings
--- gambas3-3.7.1.orig/comp/src/gb.desktop/xdg-utils/xdg-settings	2015-03-29 12:50:11.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.desktop/xdg-utils/xdg-settings	2015-05-27 14:05:16.186695566 +0000
@@ -656,7 +656,7 @@
 
 get_browser_xfce()
 {
-    search="${XDG_CONFIG_HOME:-$HOME/.config}:${XDG_CONFIG_DIRS:-/etc/xdg}"
+    search="${XDG_CONFIG_HOME:-$HOME/.config}:${XDG_CONFIG_DIRS:-/usr/local/etc/xdg}"
     IFS=:
     for dir in $search; do
         unset IFS
diff -Naur gambas3-3.7.1.orig/comp/src/gb.form/.src/Stock.class gambas3-3.7.1/comp/src/gb.form/.src/Stock.class
--- gambas3-3.7.1.orig/comp/src/gb.form/.src/Stock.class	2015-03-29 12:50:10.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.form/.src/Stock.class	2015-05-27 14:04:48.993362603 +0000
@@ -169,11 +169,11 @@
       
       If sTheme Then 
         sTheme = Trim(sTheme)
-        GetAllThemePath("gnome", ["~/.icons", "/usr/share/icons"], sTheme)
+        GetAllThemePath("gnome", ["~/.icons", "/usr/local/share/icons"], sTheme)
       Endif
       
-      AddPath("gnome", "/usr/share/icons/gnome")
-      AddPath("gnome", "/usr/share/icons/hicolor")
+      AddPath("gnome", "/usr/local/share/icons/gnome")
+      AddPath("gnome", "/usr/local/share/icons/hicolor")
       'AddPath("gnome", "/usr/X11R6/share/icons/hicolor")
       
     Case "mate"
@@ -182,12 +182,12 @@
       
       If sTheme Then 
         sTheme = Trim(sTheme)
-        GetAllThemePath("gnome", ["~/.icons", "/usr/share/icons"], sTheme)
+        GetAllThemePath("gnome", ["~/.icons", "/usr/local/share/icons"], sTheme)
       Endif
       
-      AddPath("gnome", "/usr/share/icons/mate")
-      AddPath("gnome", "/usr/share/icons/gnome")
-      AddPath("gnome", "/usr/share/icons/hicolor")
+      AddPath("gnome", "/usr/local/share/icons/mate")
+      AddPath("gnome", "/usr/local/share/icons/gnome")
+      AddPath("gnome", "/usr/local/share/icons/hicolor")
       'AddPath("gnome", "/usr/X11R6/share/icons/hicolor")
       
     Case "kde"
@@ -275,7 +275,7 @@
           AddPath("kde4", sPath &/ "oxygen") ' default theme hardcoded in KDE sources
         Next
         
-        AddPath("kde4", "/usr/share/icons/hicolor")
+        AddPath("kde4", "/usr/local/share/icons/hicolor")
         
       Endif
       
@@ -287,30 +287,30 @@
         If aFind Then sTheme = Trim(aFind[1])
       Endif
       
-      If sTheme Then GetAllThemePath("gnome", ["~/.icons", "/usr/share/icons"], sTheme)
+      If sTheme Then GetAllThemePath("gnome", ["~/.icons", "/usr/local/share/icons"], sTheme)
       'GetAllThemePath("gnome", "/usr/X11R6/share/icons", sTheme)
       
-      AddPath("gnome", "/usr/share/icons/gnome")
+      AddPath("gnome", "/usr/local/share/icons/gnome")
     
     Case "lxde"
       
       If Not sTheme Then
         aFind = FindInConfigFile("~/.config/lxsession/LXDE/desktop.conf", "sNet/IconThemeName=*")
-        If Not aFind Then aFind = FindInConfigFile("/etc/xdg/lxsession/LXDE/desktop.conf", "sNet/IconThemeName=*")
+        If Not aFind Then aFind = FindInConfigFile("/usr/local/etc/xdg/lxsession/LXDE/desktop.conf", "sNet/IconThemeName=*")
         If Not aFind Then aFind = FindInConfigFile("~/.config/lxde/config", "sNet/IconThemeName=*")
-        If Not aFind Then aFind = FindInConfigFile("/usr/share/lxde/config", "sNet/IconThemeName=*")
+        If Not aFind Then aFind = FindInConfigFile("/usr/local/share/lxde/config", "sNet/IconThemeName=*")
         If aFind Then sTheme = Trim(aFind[0])
       Endif
       
-      If sTheme Then GetAllThemePath("gnome", ["~/.icons", "/usr/share/icons"], sTheme)
+      If sTheme Then GetAllThemePath("gnome", ["~/.icons", "/usr/local/share/icons"], sTheme)
     
-      AddPath("gnome", "/usr/share/icons/gnome")
+      AddPath("gnome", "/usr/local/share/icons/gnome")
       
     'Case "gambas"
     Case Else
       
       If sDesktop <> "gambas" Then
-        GetAllThemePath("gnome", ["~/.icons", "/usr/share/icons"], Application.Theme)
+        GetAllThemePath("gnome", ["~/.icons", "/usr/local/share/icons"], Application.Theme)
       Endif
       
   End Select 
@@ -695,8 +695,8 @@
     Next
   Endif
   
-  For Each sDir In Dir("/usr/share/icons", "*", gb.Directory)
-    sPath = "/usr/share/icons" &/ sDir
+  For Each sDir In Dir("/usr/local/share/icons", "*", gb.Directory)
+    sPath = "/usr/local/share/icons" &/ sDir
     GoSub ADD_THEME
   Next
   
diff -Naur gambas3-3.7.1.orig/comp/src/gb.net.pop3/.src/SSLClient.class gambas3-3.7.1/comp/src/gb.net.pop3/.src/SSLClient.class
--- gambas3-3.7.1.orig/comp/src/gb.net.pop3/.src/SSLClient.class	2015-03-29 12:50:11.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.net.pop3/.src/SSLClient.class	2015-05-27 14:00:45.876692674 +0000
@@ -41,8 +41,8 @@
 Private Sub GetOpenSSLPath() As String
 
   If Not OpenSSLPath Then
-    If Exist("/usr/bin/openssl") Then
-      OpenSSLPath = "/usr/bin/openssl"
+    If Exist("/usr/local/bin/openssl") Then
+      OpenSSLPath = "/usr/local/bin/openssl"
     Else If Exist("/bin/openssl") Then
       OpenSSLPath = "/bin/openssl"
     Else
diff -Naur gambas3-3.7.1.orig/comp/src/gb.net.smtp/.src/SmtpSession.class gambas3-3.7.1/comp/src/gb.net.smtp/.src/SmtpSession.class
--- gambas3-3.7.1.orig/comp/src/gb.net.smtp/.src/SmtpSession.class	2015-03-29 12:50:11.000000000 +0000
+++ gambas3-3.7.1/comp/src/gb.net.smtp/.src/SmtpSession.class	2015-05-27 14:01:21.723361326 +0000
@@ -19,8 +19,8 @@
 Static Public Sub GetOpenSSLPath() As String
 
   If Not $sOpenSSLPath Then
-    If Exist("/usr/bin/openssl") Then
-      $sOpenSSLPath = "/usr/bin/openssl"
+    If Exist("/usr/local/bin/openssl") Then
+      $sOpenSSLPath = "/usr/local/bin/openssl"
     Else If Exist("/bin/openssl") Then
       $sOpenSSLPath = "/bin/openssl"
     Else
diff -Naur gambas3-3.7.1.orig/gb.dbus/src/gb.dbus/.src/MMain.module gambas3-3.7.1/gb.dbus/src/gb.dbus/.src/MMain.module
--- gambas3-3.7.1.orig/gb.dbus/src/gb.dbus/.src/MMain.module	2015-03-29 12:49:59.000000000 +0000
+++ gambas3-3.7.1/gb.dbus/src/gb.dbus/.src/MMain.module	2015-05-27 13:55:50.050023967 +0000
@@ -49,7 +49,7 @@
   
   Dim o As Object
   Dim s As String
-  'Dim cInts As Collection = ["image_path": "/usr/share/icons/gnome/48x48/actions/add.png"]
+  'Dim cInts As Collection = ["image_path": "/usr/local/share/icons/gnome/48x48/actions/add.png"]
   
   'DBus["org.freedesktop.Notifications"]["/org/freedesktop/Notifications"].Notify("MyApp", 0, "", "PoissonTChat", "Fabien: Chu la ! <a href=\"http://gambaslinux.forumactif.net\">ici</a>", ["test"], cInts, 1000)
 
diff -Naur gambas3-3.7.1.orig/gb.qt4/src/main.cpp gambas3-3.7.1/gb.qt4/src/main.cpp
--- gambas3-3.7.1.orig/gb.qt4/src/main.cpp	2015-03-29 12:50:16.000000000 +0000
+++ gambas3-3.7.1/gb.qt4/src/main.cpp	2015-05-27 13:26:43.893336288 +0000
@@ -730,8 +730,8 @@
 static bool try_to_load_translation(QString &locale)
 {
 	return (!_translator->load(QString("qt_") + locale, QString(getenv("QTDIR")) + "/translations")
-		  && !_translator->load(QString("qt_") + locale, QString("/usr/lib/qt4/translations"))
-		  && !_translator->load(QString("qt_") + locale, QString("/usr/share/qt4/translations")));
+		  && !_translator->load(QString("qt_") + locale, QString("/usr/local/lib/qt4/translations"))
+		  && !_translator->load(QString("qt_") + locale, QString("/usr/local/share/qt4/translations")));
 }
 
 static void init_lang(char *lang, bool rtl)
diff -Naur gambas3-3.7.1.orig/main/gbx/gbx_archive.c gambas3-3.7.1/main/gbx/gbx_archive.c
--- gambas3-3.7.1.orig/main/gbx/gbx_archive.c	2015-03-29 12:50:04.000000000 +0000
+++ gambas3-3.7.1/main/gbx/gbx_archive.c	2015-05-27 13:58:47.910024444 +0000
@@ -245,6 +245,7 @@
 		else
 		{
 			path = exist_library(PROJECT_path, arch->name);
+			if (!path) path = exist_library("/usr/local/bin", arch->name);
 			if (!path) path = exist_library("/usr/bin", arch->name);
 			if (!path) path = exist_library("/bin", arch->name);
 		}
diff -Naur gambas3-3.7.1.orig/main/gbx/gbx_c_process.c gambas3-3.7.1/main/gbx/gbx_c_process.c
--- gambas3-3.7.1.orig/main/gbx/gbx_c_process.c	2015-03-29 12:50:04.000000000 +0000
+++ gambas3-3.7.1/main/gbx/gbx_c_process.c	2015-05-27 13:57:38.950024555 +0000
@@ -450,7 +450,7 @@
 
 	search = getenv("PATH");
 	if (!search || !*search)
-		search = "/usr/bin:/bin";
+		search = "/usr/local/bin:/usr/bin:/bin";
 
 	search = STRING_new_zero(search);
 
diff -Naur gambas3-3.7.1.orig/main/share/gb_component.h gambas3-3.7.1/main/share/gb_component.h
--- gambas3-3.7.1.orig/main/share/gb_component.h	2015-03-29 12:50:05.000000000 +0000
+++ gambas3-3.7.1/main/share/gb_component.h	2015-05-27 13:59:39.606690688 +0000
@@ -61,9 +61,9 @@
 
 #define ARCH_PATTERN   "%s/%s.gambas"
 
-#define GAMBAS_LINK_PATH  "/usr/bin/gbx" GAMBAS_VERSION_STRING
+#define GAMBAS_LINK_PATH  "/usr/local/bin/gbx" GAMBAS_VERSION_STRING
 
 #define GAMBAS_LIB_PATH "lib/gambas" GAMBAS_VERSION_STRING
-#define GAMBAS_LIB64_PATH "lib64/gambas" GAMBAS_VERSION_STRING
+#define GAMBAS_LIB64_PATH "lib/gambas" GAMBAS_VERSION_STRING
 
 #endif
