Page 3 of 4
Re: FH running on Wine
Posted: 21 Feb 2014 14:00
by tatewise
I am not sure the best way forward, but a little explanation of how Plugins access Windows features might help.
The LUA Interpreter comes with various library modules to access Windows features.
One of these is the
luacom library, which accesses the COM subsytem, and is used by many of my Plugins.
Most of my Plugins use it to check latest version in the FH Plugin Store via HTTP Requests:
Code: Select all
http = luacom.CreateObject("winhttp.winhttprequest.5.1")
http:Open("GET","http://www.family-historian.co.uk/lnk/checkpluginversion.php?id=123",false)
http:Send()
strReturn = http.Responsebody
The AS Plugin uses it to Read the Registry via the Windows Script Host Shell Object:
Code: Select all
luaShell = luacom.CreateObject("WScript.Shell")
strValue = luaShell:RegRead("HKCU\\Software\\Ancestral Sources\\00\\Version")
Both
winhttp.winhttprequest.5.1 and
WScript.Shell can be found in the
HKEY_CLASSES_ROOT section of the Registry.
Since the former code works OK, it is difficult to explain why the latter does not.
I could perhaps compose a very small Plugin script to exercise some of these features that you could try running to see what works and what does not.
It might also be worth sending the above snippets of code to
Crossover support to see if they can explain why one works and the other does not.
Re: FH running on Wine
Posted: 21 Feb 2014 14:20
by Valkrider
Mike
If you wouldn't mind doing the checking plugin. I can then run it and send the results of that along with the code above to Codeweavers all in one go.
Re: FH running on Wine
Posted: 21 Feb 2014 15:20
by Jane
My guess would be WindowsScript (wScript) is a proprietary dll which is not included in the CodeWeavers stack.
Re: FH running on Wine
Posted: 21 Feb 2014 17:42
by tatewise
I am not sure what you mean Jane by a "
proprietary dll" as
Windows Script Host has been a standard Microsoft component since
Windows 98.
I have created a test plugin available from my
OneDrive aka
SkyDrive A Test Script
It uses luacom to perform three tasks:
- Get a Plugin Version & Id from the Plugin Store using "winhttp.winhttprequest.5.1"
- RegRead the AS Version from the Windows Registry using "WScript.Shell"
- Run a command prompt listing Environment Variables using "WScript.Shell"
Each task has a very obvious popup window output.
Let me know how it behaves.
Re: FH running on Wine
Posted: 21 Feb 2014 17:55
by Valkrider
Mike
Thanks very much for creating this.
Please find the 2 screenshots below of the result of running it.

- Screen Shot 2014-02-21 at 18.52.34.png (19.44 KiB) Viewed 11325 times

- Screen Shot 2014-02-21 at 18.52.45.png (23.67 KiB) Viewed 11325 times
The first one is OK but the second quite clearly has a problem.
Re: FH running on Wine
Posted: 21 Feb 2014 18:36
by tatewise
I have modified the Plugin via the same link, such that after first task errors are trapped and reported.
Good values are accompanied by a
Status: true.

- PluginStatus.png (11.87 KiB) Viewed 11320 times
Otherwise the error message should be shown with a
Status: false.

- PluginFalse.png (16.89 KiB) Viewed 11320 times
Re: FH running on Wine
Posted: 21 Feb 2014 18:50
by Valkrider
Mike
First pass of plugin same as before so I didn't screen shot it. Next 2 below

- Screen Shot 2014-02-21 at 19.49.04.png (23.79 KiB) Viewed 11320 times

- Screen Shot 2014-02-21 at 19.49.18.png (24 KiB) Viewed 11320 times
Re: FH running on Wine
Posted: 22 Feb 2014 12:49
by tatewise
I have been digging around
Crossover and
Windows Script Host, which appears to be the problem.
Crossover has some tips at
http://www.codeweavers.com/support/wiki ... orted_deps.
This suggests common dependencies such as
Core Fonts and
Internet Explorer 7 that can be installed into the
Bottle.
It would be interesting to know what all the available options are.
The
Core Fonts (or similar) might help with the hieroglyphic error messages.
http://en.wikipedia.org/wiki/Windows_Script_Host says
WSH is installed with
Internet Explorer 5 or later.
So try installing the latest version of
Internet Explorer into the
Bottle and see if my test Plugin works any better.
As a matter of interest, which type of
Windows Bottle did you use? (winxp, winvista, win7)
If you put both
FH and
AS in the same
Bottle does it fix the problem when they both change the same GEDCOM file?
Please try AS changing the GEDCOM to see what happens in FH.
Also try FH changing the GEDCOM to see what happens in AS.
Re: FH running on Wine
Posted: 22 Feb 2014 13:38
by Valkrider
Mike
We have moved forward a small amount.
I installed IE7 and Core Fonts. I still get exactly the same 3 dialog boxes with the same Chinese characters in the second one.
Bottle type is Win XP which is the default.
As a result I installed 32 bit AS.
The bit of good news:
Returning to FH from AS after an update no longer crashes FH and the change from AS is reflected in FH.
Now the bad news:
Unfortunately changing an entry in FH with AS open locks AS up with the 'Gedcom has changed outside of AS' dialog displayed. The OK button is not clickable. The close dialog is available but it will not close.
Re: FH running on Wine
Posted: 22 Feb 2014 14:08
by tatewise
It might be interesting to use the win7 Bottle as I suspect that fits the development and test environment for both FH and AS better.
The hieroglyphic characters are NOT Chinese, but simply the extended characters in modern font sets.
If you look in the Programs > Accessories > System Tools > Character Map you will see what I mean.
I suspect that they may in fact be a misrepresentation of UTF-8 multi-byte characters.
I thought I saw an option for UTF-8 somewhere in Crossover settings but cannot find it now.
If you can find it, and select it, then it may help, and should not upset any basic ANSI characters.
FH is always a 32-bit installation, and yes it will do no harm to use the AS 32-bit installation.
I believe FH needs the Microsoft Visual C++ package - is that included?
I believe AS needs the Microsoft .NET Framework package - is that included?
In the Windows Registry you should be able to find both:
HKEY_CLASSES_ROOT\winhttp.winhttprequest.5.1 and HKEY_CLASSES_ROOT\WScript.Shell
I have an updated version of my test Plugin that might give a better insight you might like to download and try.
Re: FH running on Wine
Posted: 22 Feb 2014 14:46
by Valkrider
Mike
Crossover won't allow FH to install in a Win7 Bottle as it says that it is not a compatible OS!!! It will allow AS 32 Bit to install to a Win7 Bottle.
I am still looking for the UTF8 setting.
Yes both Net Framework and C++ are installed.
Both of those keys are present in the Registry.
A couple of slightly different error messages with the new version of your plugin.

- Screen Shot 2014-02-22 at 15.40.06.png (24.01 KiB) Viewed 11296 times

- Screen Shot 2014-02-22 at 15.40.20.png (25.67 KiB) Viewed 11296 times

- Screen Shot 2014-02-22 at 15.40.38.png (25.77 KiB) Viewed 11296 times
Re: FH running on Wine
Posted: 22 Feb 2014 15:14
by tatewise
OK, thanks for trying that Colin.
I was just trying different methods of using Windows Script Host WScript.Shell but they all fail the same way.
If you look carefully, they all report exactly the same COM exception and if we could interpret the hieroglyphs it would help.
The fact that WScript.Shell is in the Windows Registry suggests Windows Script Host is installed.
Is Windows Script Host listed amongst the installed dependencies with Microsoft Visual C++ etc?
Perhaps Crossover support will be able to throw some light on both the hieroglyphs and Windows Script Host.
Re: FH running on Wine
Posted: 22 Feb 2014 16:06
by Valkrider
Mike
I can confirm that Windows Script 5.6 is installed by default and therefore available to all applications.
I have raised a call with Codeweavers and will let you know the outcome.
Re: FH running on Wine
Posted: 22 Feb 2014 22:27
by tatewise
This
CrossTie for
Windows Script Host 5.7 might be worth a try:
https://www.codeweavers.com/compatibili ... pp_id=7886
Re: FH running on Wine
Posted: 23 Feb 2014 15:06
by Valkrider
Mike

That version of the Windows script works
I have run both the Ancestral Sources Data entry and also your test plugin and they both work fine. Unfortunately the Backup & Restore plugin still has the same registry error.
And to make matters even better I have heard from the Wine developer and the free version of Wine has been updated to 1.7.11 RC. This version will bottle FH v5.09 too. There is a video on YouTube at
http://youtu.be/vhiwKjAxKNA by Mike Kronenburg the Wine developer showing how to install it.
I will do some more testing tomorrow and update the Knowledgebase appropriately.
As an aside iMac is a specific type of Mac computer so references should be to MAC not iMac.
Re: FH running on Wine
Posted: 23 Feb 2014 16:11
by tatewise
WOW!!! That is brilliant ~ perseverance pays off ~ have a glass of WINE
Hopefully, between us, the updated KB should give others an easier route to success, if we remember it all!
Regarding
Wine Bottler, that is a step forward (using Free Trial), but the acid test is can
Licence Keys be entered, and do
Reports and
Plugins work OK?
I am not surprised about the
Backup and Restore Plugin as it uses more extensive Registry commands.
However, I might be able to adapt it for
Mac use in due course, albeit without Registry Backup & Restore.
Note taken regarding
iMac versus
Mac.
Did the Test Plugin actually open
RegEdit and
Command Prompt in the latter stages?
I have updated the Test Plugin to report some
Environment Variables that are often used in Plugins.
Could you run it again please ~ you can now
Cancel at any step.
In particular the 'OS' environment variable would hopefully identify a
Mac OS.
Do FH dialogues such as
Tools > Preferences > Backup > <<Select > Make New Folder still produce hieroglyphic messages?
Re: FH running on Wine
Posted: 24 Feb 2014 07:36
by Valkrider
Mike
I have downloaded and run the new script see the environment variables results in the attached screenshot.

- Screen Shot 2014-02-24 at 08.27.47.png (24.02 KiB) Viewed 11248 times
The plugin does open Regedit but it doesn't open a command prompt.
Yes I still get the weird characters if I try to create a new folder within the Backp & Restore dialog.
I have had an email exchange with the Wine developer and he has sent me a beta to try which I will do later. This should correct the Environment Variable problem as a couple of other applications have the same issue. He has given me a way to add the later version of Windows Script too. I will try all this out and report back.
I will also do some more testing between AS and FH.
Re: FH running on Wine
Posted: 24 Feb 2014 14:48
by tatewise
I have just noticed that in your Codeweavers Forum reply to Anne Evans you omitted to mention that Reports can be seen on screen by using File > Print Preview.
Re: FH running on Wine
Posted: 24 Feb 2014 14:57
by Valkrider
Mike
You are right I will go back and correct that. She also has another thread running that I responded to.
Re: FH running on Wine
Posted: 24 Feb 2014 15:20
by Valkrider
I have just gone backwards and forwards with AS and FH and now both seem to be running fine. BUT AS now shuts down on save which isn't much of a chore just not the behaviour I am used to (unless it is a setting I have changed). If you force keep open Ancestral Sources by running it separately from initiating it with the plugin then the frozen AS problem rears its head again.
I think it might be best to split the Knowledgebase in two with entries for Wine and Crossover separately as there are some differences so others aren't confused. WDYT Mike?
Re: FH running on Wine
Posted: 24 Feb 2014 16:17
by Valkrider
Wine Update:
I have tried the beta version and I have installed WSH 5.7. Running the Test Script plugin gives the same error on both Ancestral Sources and Backup & Restore.

- Screen Shot 2014-02-24 at 16.58.31.png (22.01 KiB) Viewed 11226 times

- Screen Shot 2014-02-24 at 16.58.45.png (22.89 KiB) Viewed 11226 times
I have been unable to run the update from 5.07 to 5.09, probably my lack of knowledge of Wine.
The FH help function in Wine runs perfectly.
The reports preview suffers the same issue as Crossover but is visible in Print Preview and on printing.
I am having some problems getting AS installed into the same Bottle, probably my lack of knowledge of Wine.
I will have another go tomorrow at these 2 issues.
Re: FH running on Wine
Posted: 24 Feb 2014 16:23
by tatewise
Perhaps you have overlooked the Plugin Close on 'Save Entry To File'? tick option?
I have been considering whether to separate the Crossover and Wine KB advice, but am waiting to see how great the differences and similarities turn out to be. There are also the Mac and Unix flavours to consider. Let's see how things settle down.
Re: FH running on Wine
Posted: 24 Feb 2014 16:59
by tatewise
I am confused...
(1) Having installing
WSH 5.7 into same Bottle as
FH V5.0.7, I would have thought the same technique would install
FH V5.0.9 and
AS V3.2.3. As with Crossover, I suspect perseverance with
Wine will pay off.
(2) You say "Running the Test Script plugin..." but the screenshots are for the AS Plugin and B&R Plugin. However, the reason for those failures is that both Plugins need
FH V5.0.8 or later. I did put a check for that in the Plugins, but it is in the wrong place!

Re: FH running on Wine
Posted: 25 Feb 2014 09:56
by Valkrider
Crossover Update.
I have had a reply from CodeWeavers about the weird character issue and it isn't good news.
There's no fix I'm aware of. The program is likely crashing in a way that it can't even determine the error message file location string and that's where the garbage text is coming from. You could try using Crossover debugging
http://www.codeweavers.com/support/wiki ... supportlog and capture the +seh,+tid channels and then run and recreate the crash in FH and see if Crossover logging captures more detail. What's probably happening is FH is trying to use some Windows Script code that Crossover has no idea how to translate yet and that's causing the application to bomb out.
I will progress this over the coming days.
Wine Update
Despite spending a couple of hours at it I am still unable to update to FH v5.09 and to install AS in the same Bottle so have emailed the developer.
Comments
My experience so far suggests that it is easier to do some things in Crossover and some things easier in Wine so at the moment there is no clear winner.
Re: FH running on Wine
Posted: 25 Feb 2014 11:18
by tatewise
Regarding the hieroglyphic characters, it sounds as if you have reported the Windows Script failure messages.
I think it better to focus on the FH Tools > Preferences > Backup > <<Select > Make New Folder message.
There is mention of program crashes, but I don't recall any cases of actual FH crashes.
Could you try running the A Test Script Plugin on FH V5.0.7 with WSH V5.7?
Regarding your Comments, what things have you found easier in Wine?