Sierra: Are Zips Still Possible?

Interesting it works OK for you. Was it launched from the download folder? I’ve actually had some sporadic results in testing including double clicking the icon for the first time and getting simply “#@% could not be found” (or something similar) without the app even attempting to launch. Assuming that’s a Sierra beta bug

[quote] !@#$% the app wants to show me daily tips. Haven seen those on the Mac for a long long time. Other than that the app starts fine - even from the downloads folder
[/quote]

Glad that was O M G and not a curse. :wink: Yeah, the help was developed long ago. We have a swoopy new version coming out soon.

I used DropDMG for that one which includes signing

@Stephen Dodd: yes, the app was started from the downloads folder.

App translocation should only affect files that are next to the main bundle and not within the bundle - as far as I understand this.

True. It’s strange that it doesn’t work some of the time. In any case, Apple seems keen on you using DMGs and not zips and I’m sure they’re will be other consequences now or later.

Zip can be opened (natively) on Windows (10) ?
DMG no.

@Emile Schwarz : and what do you think can happen with a Mac app on Windows?

It’s Apple way, or the freeway. Has been like that for a very long time.

To be fair, on the other side, the installer is the only valid way to proceed. A naked executable in a zip, even signed, may trigger nasty messages from the system, or require to confirm one wants the program to modify the system, as Windows thinks it is an installer. Not to mention the not so seldom occurrence when execution is prevented on EXE out of the Program Files directory. And don’t get me started on heuristic anti viruses apps that prevent execution of non installed apps for fear they be trojans.

I tend to regard all that as “When in Rome, do like the Romans do”. On Mac, users have come to expect a DMG, and sometimes an installer, but many users balk about installers, especially for evaluation software, if there is no uninstaller.

So, macOS makes it even more difficult to stray. Is it that of a problem ? What really protected Mac against malware for years is not some magical grigri employed by Steve Potter. It is the set of very stringent rules that prevent the sort of things that happen in Windows and Android apps. If anything, I rather go for prophylactic prevention, than messy anti malware bloatware cures.

I suspect this has more to do with avoiding viruses and malware. If the user has no choice about the product being launched all kinds of bad stuff would be installed.

Remember autorun.bat?

It was possible to autostart a program on a CD in Mac OS9 and this feature was used by a worm to infect Macs

“It was in Hong Kong, in 1998, when the next significant Mac malware outbreak was first spotted. A worm – dubbed AutoStart 9805 – spread rapidly in the desktop publishing community via removable media, using the CD-ROM AutoPlay feature of QuickTime 2.5+”

https://nakedsecurity.sophos.com/2011/10/03/mac-malware-history/#1998

More info on the Autostart 9805 worm :

http://www.macintouch.com/hkvirus.html

https://www.symantec.com/security_response/writeup.jsp?docid=2000-121813-3053-99

Apple killed the autoplay feature of Quicktime to kill it.

[quote=286414:@Greg O’Lone]I suspect this has more to do with avoiding viruses and malware. If the user has no choice about the product being launched all kinds of bad stuff would be installed.

Remember autorun.bat?[/quote]

You are right. Autorun on CDs was also host for many pests.

Autorun on Windows works with USB sticks even when logged out… the latest attack vector is to manipulate a computer without the need to login… it just installs a new network device via autorun due unknown ethernet-lan hardware… works too on Macs…

https://room362.com/post/2016/snagging-creds-from-locked-machines/
https://www.youtube.com/watch?v=Oplubg5q7ao

apps run from the folder they were unzipped normally work just fine. There is an extended delay as they are “translocated” making for a longer than usual launch time, but otherwise xojo apps should run just fine translocated after that extended launch time. The only problem is if you need to load other things via relative paths that are also in the unzipped folder. The link to those things would be broken, they will not be found because they are not translocated along with the app.

Otherwise it’s really a non-issue. So if your app isn’t large enough that the translocation takes long enough to worry users and you don’t try to load or find other things in the same folder that you zipped then yes, you can still use a zip.

in my case my users unzip and copy the app into the folder they usually run it from with it’s support databases and folders, or they move it into the applications folder in which case the app puts it’s support files where they really belong in the application support folder. This app has been around long enough to pre-date the applications folder :wink: So it will work either from there or the application folder. But you can’t unzip into the application folder without a lot of extra work so it’s unlikely to be a problem. Or my users could copy the support files INTO the folder that results from the unzipping… and someday someone will do that and it won’t work, but mostly it should be fine.

DMGs are the defacto standard as it seems. But they are a bit unlucky. Even with hints as outlined above (graphical arrows indicating to move it to the applications folder) - I see MANY average mac users running the apps from the DMG. They don’t know that they really should copy it to the applications folder (some of them being ex-win users that were used to installers, so…). Instead, they mount the DMG after every restart anew and run the app from there.

HOWEVER, a good practice is trying to detect upon application startup if it was launched from a DMG and then warn the user/offer the option to automatically copy the app to the applications folder and launch it from there again.

[quote=286504:@Alex von Siebenthal]

HOWEVER, a good practice is trying to detect upon application startup if it was launched from a DMG and then warn the user/offer the option to automatically copy the app to the applications folder and launch it from there again.[/quote]

And how to check this reliably?

App.ExecutableFile tells you a lot. Even if the app is translocated.

VirtualBox - macOS Sierra.

Yes, but that will not tell you it’s running from within a DMG

Only that you know the name of your distribution DMG, and it should be fairly easy to detect.

You can also do the reverse approach: check if the App.ExecutableFile does signify it’s not in the Applications folder but anywhere else.

I rather not force users to use the Application folder.