* New Page - Writing Plugins Compatible with Mac/Linux

Post here to suggest corrections, additions, changes etc to the FHUG KnowledgeBase . Include as much information as possible to help editors act on your post.

Moderator: kb admin

Post Reply
User avatar
Mark1834
Megastar
Posts: 2599
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

New Page - Writing Plugins Compatible with Mac/Linux

Post by Mark1834 »

New page now available at Writing Plugins Compatible With Apple Mac and Linux.

Comments invited from both plugin authors and Mac/Linux users. By its very nature, this type of page will never be complete. There are bound to be other incompatibilities that haven't tripped us up yet, but it will be kept up to date as new issues are discovered or old ones resolved.
Mark Draper
User avatar
ColeValleyGirl
Megastar
Posts: 5580
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by ColeValleyGirl »

The most reliable method appears to be looking for the presence of a Z:\etc folder, where Z:\ is the WINE mapping of the root directory of the host OS, and the /etc directory is the standard location of configuration settings in Unix-derived systems. Clearly, this would flag a false positive if a Windows user had mapped a network or local data drive to the same location, but this is probably unlikely.
Not that unlikely.... In every system I've had for decades, Z: is mapped to a network drive (where I keep my backups).


Question: What methods work in Wine for zipping/unzipping files?
User avatar
Mark1834
Megastar
Posts: 2599
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by Mark1834 »

Would a rephrasing to something like “if a Windows user had created an \etc folder in a Z:\ local or mapped drive” be clearer? If there is a particular signature file that is always present in Mac OS, that would be better, but we need advice from our Mac users here.

There is a PowerShell command for zipping files that I tried with an early version of the backup plugin, but gave up on it as it was horrendously slow compared with calling 7 Zip from the command line. I haven’t tried the PowerShell method in WINE, but I suspect it would be unsupported.
Mark Draper
User avatar
ColeValleyGirl
Megastar
Posts: 5580
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by ColeValleyGirl »

Mark1834 wrote: 10 Jul 2024 06:43 Would a rephrasing to something like “if a Windows user had created an \etc folder in a Z:\ local or mapped drive” be clearer? If there is a particular signature file that is always present in Mac OS, that would be better, but we need advice from our Mac users here.
Yes.

There is a PowerShell command for zipping files that I tried with an early version of the backup plugin, but gave up on it as it was horrendously slow compared with calling 7 Zip from the command line. I haven’t tried the PowerShell method in WINE, but I suspect it would be unsupported.
Thanks. Will have a think.
User avatar
Valkrider
Megastar
Posts: 1587
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by Valkrider »

Does this help? This is a screenshot of the Z drive as reported by Crossover on an M3 Mac running the latest version of Sonoma.
Screenshot 2024-07-10 at 08.58.40.png
Screenshot 2024-07-10 at 08.58.40.png (5.25 KiB) Viewed 301 times
User avatar
Mark1834
Megastar
Posts: 2599
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by Mark1834 »

Thanks Colin. It appears that /etc and /bin are both ubiquitous in Mac and Linux, so it would be really perverse if a Windows user had created both on a Z:\ drive. Checking Z:\ for both folders to detect WINE should be fairly bomb-proof in the absence of a supported method.
Mark Draper
User avatar
tatewise
Megastar
Posts: 28712
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by tatewise »

That is a great article. Pedantic that I am, I've spotted a few typos that need correcting:

Scope
1st paragraph has an unmatched opening parenthesis: "...VM (Virtual Machine, ..."

Can Plugins Detect Emulators?
2nd paragraph uses \ and / inconsistently: "... Z:\etc folder, where Z:\ is ... and the /etc directory ..."
Should it always be \ or perhaps \\ in plugin strings, or always / that UNIX prefers?
c.f. You used \\ in the Registry path in the paragraph below.

File Access Issues
Near end of 3rd paragraph is should be if in: "... use FSO directly is if backwards compatibility ..."
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2599
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by Mark1834 »

Typos squashed (plus a couple we hadn’t spotted!), but / vs \ is deliberate, as we need to use the correct form according to the context (using / in Windows or \ in Unix are both definitely wrong).

I think it’s clearer now, as I have added a couple of additional sentences giving the background for readers whose only experience is DOS/Windows and aren’t familiar with the basic Unix file structure.
Mark Draper
User avatar
Mark1834
Megastar
Posts: 2599
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by Mark1834 »

One minor quirk of the KB I noticed. I created this page in the normal way, and haven't edited any of the default settings regarding the glossary. However, it still omits all definition links until the final section, when it suddenly decides that "plugin" and "WINE" need a highlighted link. :?
Mark Draper
User avatar
tatewise
Megastar
Posts: 28712
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by tatewise »

Yes, that is odd. I've inspected several other 'Writing plugins' articles which also don't highlight the first occurrence of glossary words such as 'Plugins' or 'Plugin Store' or 'Lua'.

Actually, looking at other articles it happens in many of them for glossary words like 'fact', 'source record', 'citation', etc.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5580
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by ColeValleyGirl »

The program that implements the glossary has some annoying undocumented quirks. It will not, for example, highlight a glossary word, if it's at the beginning of a line. It's been upgraded recently, so I suspect some more annoyances have crept in. I'll report them, but don't anticipate anything other than being told to rewrite things!

It's been a while since I looked for an alternative... but migration could be a big job.
User avatar
tatewise
Megastar
Posts: 28712
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by tatewise »

In this new article none of the early occurences of 'plugin' or 'WINE' are at the beginning of a line.
They all seem to occur in the middle of normal text, so what are the other 'quirks'?
There are a large number of occurrences of those glossary words that have all been overlooked so the 'quirks' must be very strange indeed.

As far as I recall, much the same applies to the articles I inspected. I did not have to delve very much to find plenty of examples.

How do we rewrite things if we don't know the 'undocumented quirks'?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5580
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by ColeValleyGirl »

tatewise wrote: 11 Jul 2024 14:06 In this new article none of the early occurences of 'plugin' or 'WINE' are at the beginning of a line.
They all seem to occur in the middle of normal text, so what are the other 'quirks'?
As I said!

"annoying undocumented quirks"
There are a large number of occurrences of those glossary words that have all been overlooked so the 'quirks' must be very strange indeed.
I have spent some time trying to work them out, in the absence of any guidance from the WordPress plugin authors. And failed miserably.
How do we rewrite things if we don't know the 'undocumented quirks'?
You can't, and it's an unreasonable ask.

I have raised a support ticket, but I'm not hopeful. It could be an interaction with something else we use, which makes tracking it down harder.

I won't have time for several months to devote much effort to this.... And I'm reluctant to fork out money for yet another plugin. From a cursory search today, many of the alternatives cost money to deliver the same functionality, and charge an annual fee to stay current.
User avatar
Mark1834
Megastar
Posts: 2599
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by Mark1834 »

IMO, it’s just a minor untidiness, and not worth spending additional cash or excessive time on. It’s always easy of course to ask someone else to fix it, but it’s not something that would be high up my to-do list.
Mark Draper
User avatar
tatewise
Megastar
Posts: 28712
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: New Page - Writing Plugins Compatible with Mac/Linux

Post by tatewise »

Perhaps How to Add Content to the Knowledge Base under Glossary Entries needs to explain that there are 'undocumented quirks' and that "If you use a term or phrase that is in the Glossary, it will be highlighted the first time it occurs on the page." does not always happen.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Post Reply