FJ Software Foren-Übersicht  
 Homepage   •  Suchen   •  FAQ   •  Mitgliederliste   •  Registrieren   •  Login
 MyPhoneExplorer and Thunderbird under Linux Nächstes Thema anzeigen
Vorheriges Thema anzeigen
Neues Thema eröffnenNeue Antwort erstellen
Autor Nachricht
matthias



Anmeldedatum: 08.11.2008
Beiträge: 107

BeitragVerfasst am: Sa Sep 22, 2018 22:09 Antworten mit ZitatNach oben

Unfortunately, the sync stopped working for me.it always says that the folders cannot be listed and in the logfile appears the following:

Code:
 Error in StartFritzboxSearch: 429 ActiveX component can't create object


Does anybody experience the same and probably know a workaround?

btw: I'm on Manjaro (Arch) with wine 3.15
Benutzer-Profile anzeigenPrivate Nachricht senden
matthias



Anmeldedatum: 08.11.2008
Beiträge: 107

BeitragVerfasst am: Sa Okt 06, 2018 16:53 Antworten mit ZitatNach oben

Does anybody know how to find out what could be the problem?
Benutzer-Profile anzeigenPrivate Nachricht senden
Pastim



Anmeldedatum: 17.06.2011
Beiträge: 64

BeitragVerfasst am: Di Okt 16, 2018 16:45 Antworten mit ZitatNach oben

TreeNode hat Folgendes geschrieben:
It is a it of copy an paste. I hope the instructions are clear, if not ask.

As of Thunderbird 60- these instructions (from Sat May 13, 2017) don't seem to work any more. There isn't even a directory "myphoneexplorer@fjsoft.at " under extensions.

mpe says it now can't see any of the thunderbird folders.
Benutzer-Profile anzeigenPrivate Nachricht senden
Pastim



Anmeldedatum: 17.06.2011
Beiträge: 64

BeitragVerfasst am: Di Okt 16, 2018 22:11 Antworten mit ZitatNach oben

Having found I couldn't get MPE to work with Thunderbird 60 in the way I used to, I have got it working again, on ubuntu 18.04, with MPE 1.8.11. I started with a fresh 32 bit wine directory (Windows 7).

I had been using the really neat method described by TreeNode on May 13 2017. However, I couldn't find a way to get it working with Thunderbird 60, so reverted to the old method. I'll briefly summarise what I needed to do.

0. Backup the whole linux Thunderbird directory - more than once depending on how paranoid you are, and then stop it (so no new changes get made).
1. Install Windows Thunderbird prior to version 60 (I used version 45) under wine
2. Start it, don't create an account.
3. Make sure the lightning extension is installed.
4. Open the Address book (is empty) and Calendar (also empty).
5. Close wine Thunderbird.
6. Fix the calendar access for the wine Thunderbird as follows:
◦ in the wine Thunderbird profile directory "cp prefs.js prefs.js.old" (i.e. take a backup)
◦ in the linux Thunderbird profile directory, use an editor to copy all lines in pref.js starting with "calendar."
◦ in the wine Thunderbird profile directory edit prefs.js and replace all "calendar." lines with the lines just copied
7. In the wine Thunderbird profile directory (where 'xxxxxxxx' is the profile directory id, 'me' is my home directory name, and 'abook-n.mab' is the current linux address book that I want to synchronise - I have several address books but only one to sync with my mobile):
◦ mv storage.sdb storage.sdb.old
◦ mv abook.mab abook.mab.old
◦ ln -is /home/me/.thunderbird/xxxxxxxx.default/storage.sdb storage.sdb
◦ ln -s /home/me/.thunderbird/xxxxxxxx.default/abook-n.mab abook.mab
8. Then in the calendar-data directory
◦ mv local.sqlite local.sqlite.old
◦ ln -is /home/me/.thunderbird/xxxxxxxx.default/calendar-data/local.sqlite local.sqlite
9. You have now got the wine Thunderbird to use the address book and calendar files created by the linux Thunderbird
10. Install MPE in the normal linux way, which I won't repeat.
11. Start MPE and get as far as getting it to install the MPE Thunderbird extension (to the wine Thunderbird).
12. Stop MPE for now.
13. Start the wine Thunderbird, and make sure the address book shows my linux addresses. Ditto the calendar. I had to stop and restart a few times, I'm not sure why, but eventually the wine Thunderbird was showing the addresses I want and the calendar I want.
14. Stop the wine Thunderbird.
15. Start MPE and finish setting up, making sure that it is set to ask first before making any changes to either the phone or Thunderbird data.
16. Pray.
17. Try a contact sync. If OK try calendar sync, and so on.

Treat yourself to something nice..., and say thanks to all at fjsoft for keeping this incredibly useful tool going. It's so long ago I can't now recall if I donated, but I may have to do it again just to be sure Smile
Benutzer-Profile anzeigenPrivate Nachricht senden
Pastim



Anmeldedatum: 17.06.2011
Beiträge: 64

BeitragVerfasst am: Di Okt 16, 2018 22:20 Antworten mit ZitatNach oben

And one more thing for linux Thunderbird 60 users - you need to install xul-ext-lightning to get lightning in linux Thunderbird - the old add-on extension doesn't work.
Benutzer-Profile anzeigenPrivate Nachricht senden
TreeNode



Anmeldedatum: 12.05.2017
Beiträge: 7

BeitragVerfasst am: Do Okt 25, 2018 12:34 Antworten mit ZitatNach oben

Hallo, I‘ve got it working again. This time is it a bit more difficult, because we have to modify the xpi file. Beside that it is simula to the last one. In order to make it simpler I wrote as script, that sets the link, regEntry, the bat File and creates the extensions.rdf file if they don’t exist.

0. install MyPhoneExplorer und Lightning in Thunderbird(xul-ext-lightning)
1. open the MyPhonEexplorer xpi File an copy the mpe.js file (I used xarchiver)
2. open the mpe.js and replace the RegRead and Run function with:
Code:

function RegRead(subkey,valuename)
{
var out = '';
var os = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS;
if (os=="Linux"||IO.getFile("/usr/bin","wine").exists()){
// um die Konstanten zu genierieren
Components.classes["@mozilla.org/net/osfileconstantsservice;1"].getService(Components.interfaces.nsIOSFileConstantsService).init();
// erzeuge ein tmp file mit dem inhalt #!/bin/bash \n\$1 \> \$2 um die rückgabe der bash in eine Datei zu schreiben
var copyFile = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("TmpD", Components.interfaces.nsIFile);
copyFile.append("copy.sh");
copyFile.createUnique(copyFile.nsIFile.NORMAL_FILE_TYPE, 0o700);
WriteFile(copyFile.path,"#!/bin/bash \n\$1 \> \$2");
var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
process.init(copyFile);
var tmpFile = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("TmpD", Components.interfaces.nsIFile);
tmpFile.append("Query.tmp");
tmpFile.createUnique(tmpFile.NORMAL_FILE_TYPE, 0o600);
var args = ["wine reg Query HKCU\\"+subkey +" /v "+valuename, tmpFile.path];
process.run(true, args, args.length);
try {
var out = ReadFile(tmpFile.path);
out=out[2];
out=out.split("REG_SZ ");
out=out[1];
tmpFile.remove(false);
copyFile.remove(false);
//prüft ob es ein Systempfad ist(zweite Stelle ":")
if(out.indexOf(":")==1){
out= 'dosdevices/'+out.substr(0,1).toLowerCase()+out.substr(1,out.length-1);
out = out.split('\\').join('/');//ersetzt alle \\ durch /
out=OS.Constants.Path.homeDir+'/.wine/'+out;
}
}
catch(ex) {
Components.utils.reportError('Error reading HKCU\\' + subkey + ' : ' + valuename + ' : ' + ex);
}
}
else{
try {
var wrk = Components.classes["@mozilla.org/windows-registry-key;1"].createInstance(Components.interfaces.nsIWindowsRegKey);
wrk.open(wrk.ROOT_KEY_CURRENT_USER,subkey,wrk.ACCESS_READ);
out = wrk.readStringValue(valuename);
wrk.close();
}
catch(ex) {
// Components.utils.reportError('Error reading HKCU\\' + subkey + ' : ' + valuename + ' : ' + ex);
}
}
//Components.utils.reportError(out);
return(out);
}


 
Run: function(args)
{
//var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);

args=[args];
var os = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS
var path = RegRead("Software\\MyPhoneExplorer", "PathToExe");
if (os=="Linux"||IO.getFile("/usr/bin","wine").exists()){
args=[path,args[0]];
path= "/usr/bin/wine";
}
if (path.length != 0) {
try
{
//file.initWithPath(path);
var file = new FileUtils.File(path);
process.init(file);
process.run(false, args, args.length);
return;
}
catch(ex)
{
Components.utils.reportError('Could not run ' + path);
return;
}
}
Components.utils.reportError("Could not find MyPhoneExplorer.exe");
},



3. put the modified file back into the xpi (also with xarchiver)
4. install the MyPhoneExplorer-Addon in thunderbird
5. make sure all links and regEntrys and Files are in place or run the script(store it as an executable file)
Code:

#!/bin/bash
#prüfe ob wine installiert
if [ -f /usr/bin/wine ]; then
   #erzeuge RegEintrag und bat-Datei für Thunderbird
   batfilePath="$HOME/.wine/drive_c/Program Files/Mozilla Thunderbird"
   key="HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\thunderbird.exe"
   data="C:\\Program Files\\Mozilla Thunderbird\\thunderbird.bat"
   wine reg add "$key" /v "" /t REG_SZ /d "$data"
   #erzeuge .bat
   if [ ! -d "$batfilePath" ]; then
      mkdir "$batfilePath"
   fi
   echo "start /unix /usr/bin/thunderbird %1 %2" > "$batfilePath/thunderbird.bat"
   chmod 777 "$batfilePath/thunderbird.bat"

   # erzeuge softlink
   target="$HOME/.thunderbird"
   #aus REG auslesen
   key="HKEY_USERS\.Default\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
   data="AppData"
   position=`wine reg query "$key" /v "$data"`
   index=`expr index "$position"  ':'`
   position="${position:($index-2):(${#position}-$index-1)}"
   if [ "$position" != "" ]; then
      position="${position,}"
      #resetze \ durch /
      position="${position//\\/\/}"

      position="$HOME/.wine/dosdevices/$position/Thunderbird"

      #prüfen ob datei schon existiert
      if [ ! -e "$position" ]; then
         ln -s "$target" "$position"
      fi
   fi
   unset batfilePath
   unset key
   unset data
   unset target
   unset position
   unset index

   #erzeuge extension.rdf

   if [[ $(grep '\[Profile[^0]\]' "$HOME/.thunderbird/profiles.ini") ]]
    then echo multi user funktioniert noch nicht, schreibe in thunderbird ordner
   else target=$(grep 'Path=' "$HOME/.thunderbird/profiles.ini" | sed 's/^Path=//' | sed 's/\r//' | sed 's/\n//')
   fi
   target="$HOME/.thunderbird/$target/extensions.rdf"
   if [ ! -e "$target" ]; then
     echo "<?xml version=\"1.0\"?>" > "$target"
     echo "<RDF:RDF xmlns:NS1=\"http://www.mozilla.org/2004/em-rdf#\"" >> "$target"
     echo "         xmlns:NC=\"http://home.netscape.com/NC-rdf#\"" >> "$target"
     echo "         xmlns:RDF=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">" >> "$target"
     echo "  <RDF:Seq RDF:about=\"urn:mozilla:item:root\">" >> "$target"
     echo "    <RDF:li RDF:resource=\"urn:mozilla:item:{e2fda1a4-762b-4020-b5ad-a41df1933103}\"/>" >> "$target"
     echo "    <RDF:li RDF:resource=\"urn:mozilla:item:myphoneexplorer@fjsoft.at\"/>" >> "$target"
     echo "  </RDF:Seq>" >> "$target"
     echo "  <RDF:Description RDF:about=\"urn:mozilla:item:{e2fda1a4-762b-4020-b5ad-a41df1933103}\"" >> "$target"
     echo "                   NS1:installLocation=\"app-profile\"" >> "$target"
     echo "                   NS1:version=\"6.2.2.1\"" >> "$target"
     echo "                   NS1:optionsURL=\"chrome://messenger/content/preferences/preferences.xul\"" >> "$target"
     echo "                   NS1:iconURL=\"chrome://calendar/skin/cal-icon32.png\"" >> "$target"
     echo "                   NS1:name=\"Lightning\"" >> "$target"
     echo "                   NS1:description=\"An integrated calendar for Thunderbird\"" >> "$target"
     echo "                   NS1:creator=\"Mozilla Calendar Project\"" >> "$target"
     echo "                   NS1:homepageURL=\"http://www.mozilla.org/projects/calendar/\">" >> "$target"
     echo "    <NS1:type NC:parseType=\"Integer\">2</NS1:type>" >> "$target"
     echo "    <NS1:targetApplication RDF:resource=\"rdf:#$GqnK52\"/>" >> "$target"
     echo "  </RDF:Description>" >> "$target"
     echo "  <RDF:Description RDF:about=\"urn:mozilla:item:myphoneexplorer@fjsoft.at\"" >> "$target"
     echo "                   NS1:installLocation=\"app-profile\"" >> "$target"
     echo "                   NS1:version=\"2.0.23\"" >> "$target"
     echo "                   NS1:name=\"MyPhoneExplorer\"" >> "$target"
     echo "                   NS1:description=\"MyPhoneExplorer Synchronisation\"" >> "$target"
     echo "                   NS1:creator=\"F.J. Wechselberger, N. Pueschel\"" >> "$target"
     echo "                   NS1:homepageURL=\"http://www.fjsoft.at/\">" >> "$target"
     echo "    <NS1:type NC:parseType=\"Integer\">2</NS1:type>" >> "$target"
     echo "    <NS1:targetApplication RDF:resource=\"rdf:#$GqnK52\"/>" >> "$target"
     echo "  </RDF:Description>" >> "$target"
     echo "</RDF:RDF>" >> "$target"

   else
     echo "existiert schon"
   fi
   unset target

fi


if the file extensions.rdf file already exists make sure that the versionnummers inside match the installed add-on-versions

6. ready to use


This time I used the reg function of wine. I think this is more elegant and I added a check for OS so the add-on shut still work an a windows.
@FJ Maybe this changes could find the way in the standard version, to make the wine support easier.
Benutzer-Profile anzeigenPrivate Nachricht senden
Pastim



Anmeldedatum: 17.06.2011
Beiträge: 64

BeitragVerfasst am: Do Okt 25, 2018 13:23 Antworten mit ZitatNach oben

Thanks. I'll have a think about trying this. My MPE is currently working well with the 2nd copy of Thunderbird, so I may leave it until I need to change something else. I've copied the instructions locally so I can find them if/when I need them.
Benutzer-Profile anzeigenPrivate Nachricht senden
matthias



Anmeldedatum: 08.11.2008
Beiträge: 107

BeitragVerfasst am: So Nov 11, 2018 13:30 Antworten mit ZitatNach oben

Thank you very much, @TreeNode!

In my case I installed MPE using a wineprefix (.wine_MPE) therefore I had to modify your functions.
Also I noticed that, when reading out the "PathToExe" value from the registry, it was returned with leading spaces, which made it necessary to add the trim()-function
@FJ it would be great if this could make it into the standard version! Maybe with a way to configure the wineprefix if someone installed it to a different location as I did...

Here are my versions of these functions:
there are two occurrences of "/path/to/wineprefix/" that you need to change to your prefix.

Code:

function RegRead(subkey,valuename)
{
   var out = '';
   var os = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS;
   if (os=="Linux"||IO.getFile("/usr/bin","wine").exists()){
      // um die Konstanten zu genierieren
      Components.classes["@mozilla.org/net/osfileconstantsservice;1"].getService(Components.interfaces.nsIOSFileConstantsService).init();
      // erzeuge ein tmp file mit dem inhalt #!/bin/bash \n\$1 \> \$2 um die rückgabe der bash in eine Datei zu schreiben
      var copyFile = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("TmpD", Components.interfaces.nsIFile);
      copyFile.append("copy.sh");
      copyFile.createUnique(copyFile.nsIFile.NORMAL_FILE_TYPE, 0o700);
      WriteFile(copyFile.path,"#!/bin/bash \n\$1 \> \$2");
      var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
      process.init(copyFile);
      var tmpFile = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("TmpD", Components.interfaces.nsIFile);
      tmpFile.append("Query.tmp");
      tmpFile.createUnique(tmpFile.NORMAL_FILE_TYPE, 0o600);

      //modification: use the env function to pass the wineprefix to wine
      var args = ["/usr/bin/env WINEPREFIX=/path/to/wineprefix/ wine reg Query HKCU\\"+subkey +" /v "+valuename, tmpFile.path];
      process.run(true, args, args.length);
      try {

         var out = ReadFile(tmpFile.path);
         out=out[2];
         out=out.split("REG_SZ ");
         out=out[1];
         //modification: trim the output to get rid of extra spaces
         out = out.trim();
         
         tmpFile.remove(false);
         copyFile.remove(false);
         //prüft ob es ein Systempfad ist(zweite Stelle ":")
         if(out.indexOf(":")==1){
            out= 'dosdevices/'+out.substr(0,1).toLowerCase()+out.substr(1,out.length-1);
            out = out.split('\\').join('/');//ersetzt alle \\ durch /
            out=OS.Constants.Path.homeDir+'/.wine_MPE/'+out;
         }
      }
      catch(ex) {
         Components.utils.reportError('Error reading HKCU\\' + subkey + ' : ' + valuename + ' : ' + ex);
      }
   }
   else{
      try {
         var wrk = Components.classes["@mozilla.org/windows-registry-key;1"].createInstance(Components.interfaces.nsIWindowsRegKey);
         wrk.open(wrk.ROOT_KEY_CURRENT_USER,subkey,wrk.ACCESS_READ);
         out = wrk.readStringValue(valuename);
         wrk.close();
      }
      catch(ex) {
         // Components.utils.reportError('Error reading HKCU\\' + subkey + ' : ' + valuename + ' : ' + ex);
      }
   }
   //Components.utils.reportError(out);
   return(out);
}



Run: function(args)
{
   //var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
   var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
   
   args=[args];
   var os = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS
   var path = RegRead("Software\\MyPhoneExplorer", "PathToExe");
   if (os=="Linux"||IO.getFile("/usr/bin","wine").exists()) {
      //modification: again use the env function to pass the wineprefix to wine
      args=["WINEPREFIX=/path/to/wineprefix/ /usr/bin/wine", path, args[0]];
      path= "/usr/bin/env";
   }
   if (path.length != 0) {
      try {
         //file.initWithPath(path);
         var file = new FileUtils.File(path);
         process.init(file);
         process.run(false, args, args.length);
         return;
      }
      catch(ex) {
         Components.utils.reportError('Could not run ' + path);
         return;
      }
   }
   Components.utils.reportError("Could not find MyPhoneExplorer.exe");
},
Benutzer-Profile anzeigenPrivate Nachricht senden
TreeNode



Anmeldedatum: 12.05.2017
Beiträge: 7

BeitragVerfasst am: Mi Nov 14, 2018 15:38 Antworten mit ZitatNach oben

Hallo matthias,
I think I‘ve got a solution for this problem.
Therefore I read the preferences of thunderbird.
If you’re using a WINEPREFIX go to thunderbird and open the Config Editor(To access the config editor, go to Edit > Preferences, select the Advanced panel, select the General tab, and click Config Editor.)
With a right-click, add a new String. The Name is ”myphoneexplorer.path_to_wine” and the value is the path to your wine-installation.
I think this should work.

Here the new version of the adjusted functions:
Code:
function RegRead(subkey,valuename)
{
   var out = '';

   var os = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS;

   if (os=="Linux"||IO.getFile("/usr/bin","wine").exists()){
      // um die Konstanten zu genierieren
      Components.classes["@mozilla.org/net/osfileconstantsservice;1"].getService(Components.interfaces.nsIOSFileConstantsService).init();
      //Ließt die Einstellung aus, falls wine an einem anderen Ort liegt, sollte man es dort in thunderbird eintragen
      var defaultWinePath =  OS.Constants.Path.homeDir+'/.wine';
      var   PathToWine = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch).getCharPref("myphoneexplorer.path_to_wine",defaultWinePath);

      // erzeuge ein tmp file mit dem inhalt #!/bin/bash \n\$1 \> \$2 um die rückgabe der bash in eine Datei zu schreiben
      var copyFile = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("TmpD", Components.interfaces.nsIFile);
      copyFile.append("copy.sh");
      copyFile.createUnique(copyFile.nsIFile.NORMAL_FILE_TYPE, 0o700);
      WriteFile(copyFile.path,"#!/bin/bash \n\$1 \> \$2");

      var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
      process.init(copyFile);
      var tmpFile = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("TmpD", Components.interfaces.nsIFile);
      tmpFile.append("Query.tmp");
      tmpFile.createUnique(tmpFile.NORMAL_FILE_TYPE, 0o600);
      //wegen Performanceeinbußen
      if(PathToWine==defaultWinePath){
         var args = ["wine reg Query HKCU\\"+subkey +" /v "+valuename, tmpFile.path];
      }else {
         var args = ["/usr/bin/env WINEPREFIX="+PathToWine+" wine reg Query HKCU\\"+subkey +" /v "+valuename, tmpFile.path];
      }
      process.run(true, args, args.length);
      try {
         out = ReadFile(tmpFile.path);
         out=out[2];
         out=out.split("REG_SZ    ");
         out=out[1];
         out=out.trim();
         //prüft ob es ein Systempfad ist(zweite Stelle ":")
         if(out.indexOf(":")==1){
            out=out.split('\ ').join('%'); //um mit Leerzeichen umzugehen
            if(PathToWine==defaultWinePath){
               args = ["winepath "+out, tmpFile.path];
            }else {
               args = ["/usr/bin/env WINEPREFIX="+PathToWine+" winepath "+out, tmpFile.path];
            }
            process.run(true, args, args.length);
            out=ReadFile(tmpFile.path);
            out=out[0].split('%').join(' ');
         }
         tmpFile.remove(false);
         copyFile.remove(false);
      }
      catch(ex) {
          Components.utils.reportError('Error reading HKCU\\' + subkey + ' : ' + valuename + ' : ' + ex);
      }
   }
   else{
      try {
         var wrk = Components.classes["@mozilla.org/windows-registry-key;1"].createInstance(Components.interfaces.nsIWindowsRegKey);
         wrk.open(wrk.ROOT_KEY_CURRENT_USER,subkey,wrk.ACCESS_READ);
         out = wrk.readStringValue(valuename);
         wrk.close();
      }
      catch(ex) {
      //    Components.utils.reportError('Error reading HKCU\\' + subkey + ' : ' + valuename + ' : ' + ex);
      }
   }
   //Components.utils.reportError(out);
   return(out);
}

Run: function(args)
{
   //var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
   var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);


   args=[args];
   var os = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS
   var path = RegRead("Software\\MyPhoneExplorer", "PathToExe");
   if (os=="Linux"||IO.getFile("/usr/bin","wine").exists()){

      var defaultWinePath =  OS.Constants.Path.homeDir+'/.wine';
      var   PathToWine = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch).getCharPref("myphoneexplorer.path_to_wine",defaultWinePath);
      //wegen Performanceeinbußen
      if(PathToWine==defaultWinePath){
         args=[path,args[0]];
         path= "/usr/bin/wine";
      }else {
         args=["WINEPREFIX="+PathToWINE+" /usr/bin/wine",path,args[0]];
         path= "/usr/bin/env";
      }

   }
   if (path.length != 0) {
      try
      {
         //file.initWithPath(path);
         var file = new FileUtils.File(path);
         process.init(file);
         process.run(false, args, args.length);
         return;
      }
      catch(ex)
      {
         Components.utils.reportError('Could not run ' + path);
         return;
      }
   }
   Components.utils.reportError("Could not find MyPhoneExplorer.exe");
},
Benutzer-Profile anzeigenPrivate Nachricht senden
Pastim



Anmeldedatum: 17.06.2011
Beiträge: 64

BeitragVerfasst am: Do Mai 09, 2019 22:26 Antworten mit ZitatNach oben

I recently had problems using the method of installing a windows version of thunderbird (I could not see my Home calendar). So I thought I should try the version linking direct to the linux thunderbird.

I cannot get Thunderbird to show in the MPE sync set-up. Is there any way to diagnose what I have done wrong? I have run the latest modified script.

I have to admit I'm still confused as to why I have to set up some entries in .wine when I am using a different wine prefix, so I may have done something wrong.

You might wonder why I use a separate prefix. I have had so many problems with wine applications that I find it much simpler to have a prefix for each application. That way I can wipe out one application without removing others as well.
Benutzer-Profile anzeigenPrivate Nachricht senden
Pastim



Anmeldedatum: 17.06.2011
Beiträge: 64

BeitragVerfasst am: Fr Mai 10, 2019 16:23 Antworten mit ZitatNach oben

Pastim hat Folgendes geschrieben:
I recently had problems using the method of installing a windows version of thunderbird (I could not see my Home calendar). So I thought I should try the version linking direct to the linux thunderbird.

I cannot get Thunderbird to show in the MPE sync set-up. Is there any way to diagnose what I have done wrong? I have run the latest modified script.

I have to admit I'm still confused as to why I have to set up some entries in .wine when I am using a different wine prefix, so I may have done something wrong.

You might wonder why I use a separate prefix. I have had so many problems with wine applications that I find it much simpler to have a prefix for each application. That way I can wipe out one application without removing others as well.

I have now sorted this out, but I got quite confused for many, many, hours.

Several things caused me to set things up incorrectly. First, the installation script is for running under .wine. Working out which bits needed changing to use my prefix, and which did not, took me a while. By trial and error I eventually discovered that the only thing that must be under .wine is the link to the Thunderbird profile (under Application Data/Thunderbird). All other changes can be under my own prefix. Why that one item must be under .wine I have no idea. Does anyone know?

I also think I used the wrong path in the thunderbird configuration editor. I started with it as ~/winmpe, but eventually used the full /home... syntax.

And then I didn't make the changes to mpe.js quite correctly. Stupid of me.

Anyway, it all works now, and only the one link has to be recreated if and when my .wine gets reset.

Thanks to all.
Benutzer-Profile anzeigenPrivate Nachricht senden
Pastim



Anmeldedatum: 17.06.2011
Beiträge: 64

BeitragVerfasst am: So Jun 09, 2019 11:50 Antworten mit ZitatNach oben

It's now failed again, getting 'Loading entries from Thunderbird failed'. Is this affecting anyone else? Thunderbird is on version 60.7, MPE add-on 2.0.24.

I was hoping it's a new mpe.js which just needs re-editting, but I've done that and it still fails.

Edit: I had almost given up, but rebooted the PC, and then it worked. Something must have kept running using the old mpe.js somehow. Anyway, all is now well, and I have turned off auto-update on the MPE extension. Very Happy
Benutzer-Profile anzeigenPrivate Nachricht senden
Beiträge der letzten Zeit anzeigen:      
Neues Thema eröffnenNeue Antwort erstellen


 Gehe zu:   



Nächstes Thema anzeigen
Vorheriges Thema anzeigen
Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.

Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme :: Alle Zeiten sind GMT + 1 Stunde
Deutsche Übersetzung von phpBB.de