Missing PDF component?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Missing PDF component?

Post by FourthWorld » Fri Apr 07, 2017 3:56 pm

dunbarx wrote:It turns out that the "revpdfprinter.dll" was of course included in the standalone build, but that another file, of about 4K, named "_revpdfprinter.dll" was as well. No idea where this could have come from, but it was placed in the folder which the other files, and did not work. I did not create this thing, and I have it.
Did you build on a Mac, zip the app bundle, and then unzip it?

MacOS is notorious for adding "_*" files in Zip archives it creates, which I believe are there in an effort to preserve Mac-specific metadata when moving across platforms with different file systems.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10350
Joined: Wed May 06, 2009 2:28 pm

Re: Missing PDF component?

Post by dunbarx » Fri Apr 07, 2017 4:40 pm

Richard.
Did you build on a Mac, zip the app bundle, and then unzip it?
I did not.

So I made a new standalone. On the Mac I develop, the "Windows" folder shows the .exe file, the working stack, the "revPDFPrinter.dll" file. And an "Extensions" folder with a "revFont.dll" file.

When I bring that folder to a Windows 7 machine, the "Windows" folder has all those and three more:

A "_revPDFPrinter.dll" file
A "_revFont.dll" file in the "extensions folder
A "_myWorkingStack" file

It was the "_revPDFPrinter.dll" file that I inadvertently placed in the Documents folder, not paying attention to the redundancy, or the clue that the underscore might cause problems.

Simple one-shot creation of a standalone. No side trips. So why do I deserve these extras? I am not that nice a guy. I am still in v6.7.9, of course.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Missing PDF component?

Post by FourthWorld » Fri Apr 07, 2017 5:12 pm

Are you copying from your Mac to your Windows machine via SMB?

If so, what we see most often is the creation of files beginning with "._". E.g. "MyStack.livecode" would be accompanied by "._MyStack.livecode".

Background on that, with links to some tools to remedy this (everyone seems mystified as to why Apple provides no Preferences setting for this) here:
https://superuser.com/questions/212896/ ... core-files

For "_" files (no leading "."), I've only seen those in Zip archives. Sounds related to the Mac's insistence on creating these metadata files, but since it doesn't have the "." and isn't in a Zip archive I'm not exactly sure what's happening in your case.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10350
Joined: Wed May 06, 2009 2:28 pm

Re: Missing PDF component?

Post by dunbarx » Fri Apr 07, 2017 7:30 pm

Nothing so fancy. I take the files made on my Mac. Put them on a thumb drive, and copied to the Windows machine.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Missing PDF component?

Post by FourthWorld » Fri Apr 07, 2017 7:36 pm

Unless the thumb drive is formatted for HFS+ it's probably using NTFS or Fat32; with either of those macOS will detect it's a non-Mac file system and create the dreaded "._*" files.

But the weird part is that yours don't have the ".", so I'm still not entirely sure what's happening in your case.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Missing PDF component?

Post by [-hh] » Fri Apr 07, 2017 10:43 pm

Hi all.

May be this is from the OS transition from 10.4.11 to 10.5 (and later)?
Are the zips generated in 10.4.x?
For a while some helper software removed leading dots from "._" names to make
invisible files visible in the zip.

Hermann

p.s.
For me works the following, when I'm sure to NOT need dot-underscore-files (sometimes they contain metadata for Mac apps that use deprecated OS features).
Also I never remove ".Spotlight" files. Else loading media from a slow thumb drive may become painful on Mac.

(One may do the same for a folder on a hardDrive immediately before zipping the folder. Always give the full folder path.)

Code: Select all

-- removes recursively apple's dot-underscore-files from an USBThumb
-- and optionally (by rightClick) leading-underscore-files -- be careful with that
on mouseUp b
  put "yourUSBthumbName" into v2
  put v2 & ":" into rprt
  put cr&shell("find /Volumes/"&v2&" -name '._*' -print0 | xargs -t0 rm") after rprt
  put cr&shell("find /Volumes/"&v2&" -name '.DS_Store' -print0 | xargs -t0 rm") after rprt
  if (b=3) then # <----------------------------- switch
    put cr&shell("find /Volumes/"&v2&" -name '_*' -print0 | xargs -t0 rm") after rprt
  end if
  put rprt
end mouseUp
shiftLock happens

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Missing PDF component?

Post by jacque » Sat Apr 08, 2017 3:34 pm

I thought those underscore files were the old OS 9 resource forks. They're useless on Windows but should be ignored by the OS, they're just an unused file in the same folder. It's odd they'd cause a problem.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Missing PDF component?

Post by FourthWorld » Sat Apr 08, 2017 3:58 pm

I haven't read the boot script in revCommon in a long time, but as I recall it's very, shall we say, "thorough". ;) It may be that it's attempting to load anything in that folder ending in ".dll".
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Missing PDF component?

Post by jacque » Sat Apr 08, 2017 4:36 pm

FourthWorld wrote:I haven't read the boot script in revCommon in a long time, but as I recall it's very, shall we say, "thorough". ;) It may be that it's attempting to load anything in that folder ending in ".dll".
Got it. That makes sense.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Missing PDF component?

Post by [-hh] » Sat Apr 08, 2017 4:55 pm

It's not always clever to remove or ignore the dot-underscore-files:

Perhaps it is best to use the OS-built-in utility "dot_clean"
(see "man dot_clean" in terminal)
that does the best with it (merges all ._* files with their corresponding native files following given rules).

That's also what some "google-top-utilities" internally use -- but you don't know what they really do ...
shiftLock happens

Klaus
Posts: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Missing PDF component?

Post by Klaus » Sat Apr 08, 2017 4:58 pm

Hey, cool, didn't know that this exists, thanks a lot!

Post Reply