Create a "file installer" for Mac

Discuss anything related to audio or music production.
Post Reply
jestermgee
Posts: 4500
Joined: Mon Apr 26, 2010 6:38 am

Create a "file installer" for Mac

Post by jestermgee » Tue Sep 25, 2018 11:31 pm

I'm not a Mac user and it appears something rather simple for Windows is overly complex for Mac, I also have no idea where I could ask for help on this so see if anyone has some ideas here.

What I want to achieve is an "installer" of types but not for an "application" I simply want to have a zip file that contains a folder of files which a script or installer can then just install to a location on the users system (their document folder). I do not want to bundle this into a dedicated Mac only format as it needs to be installed by both windows and Mac and it is just text files that need to be placed in a certain spot on each system)

Looking at the options, PKG seems to be for bundled applications and does not appear to let me just copy files to the document folder.

There are 2 different locations I need to install to and on Windows I have unlimited options to create installers via script or application that could also read registry info and install automatically without the users input.

WHat would be the best option to look at where the user can just click a file and it copies the files from the included folder to the location required?

fishmonkey
Posts: 4478
Joined: Wed Oct 24, 2007 4:50 am

Re: Create a "file installer" for Mac

Post by fishmonkey » Thu Sep 27, 2018 1:00 am

it only seems overly complex because you are unfamiliar with MacOS.

probably the easiest way for you to do it is to automate the file operations using AppleScript, using the AppleScript Editor. from the Editor you can create a simple application that the end-user can run.

and you will definitely need to have Windows and Mac versions of your installer, as there isn't really a cross-platform DIY way of doing what you describe.
Last edited by fishmonkey on Thu Sep 27, 2018 1:40 am, edited 1 time in total.

jestermgee
Posts: 4500
Joined: Mon Apr 26, 2010 6:38 am

Re: Create a "file installer" for Mac

Post by jestermgee » Thu Sep 27, 2018 1:22 am

Yeah you are right, it's because I don't use Mac it appears complicated but in all my searching there is no simple software that just creates an installer like with Windows.

I did look at Applescripts and was thinking that would be the way. Where I get confused is everything is termed "application" where I don't want to create an "application installer" I simply need to take files from a zip folder and place them on the drive in a specific location because writing instructions for users on paper leaves user-error in place and users will make errors even when it is as simple as copy from A to B.

I have no issue with a separate installer for Mac and Pc, that is a given, I just don't want to have to bundle all the files within a "container" just for Mac, I want the files to be in a folder and have a simple script just copy them to the location.

Might have to look into scripts and how they work on Mac for this kind of thing. Thanks.

fishmonkey
Posts: 4478
Joined: Wed Oct 24, 2007 4:50 am

Re: Create a "file installer" for Mac

Post by fishmonkey » Thu Sep 27, 2018 1:28 am

the AppleScript Editor can export a script as a standalone application. your users can then run the installer application from your installer folder.

oh, the Editor has changed names several times and is again called Script Editor.

another thing: AppleScript more or less revolves around sending commands to other Mac applications (most Mac apps have hooks built-in that enables them to be controlled via AppleScript). if your installer needs to copy a lot of files, and speed is of the essence, then it is better to write a shell script to do the copying, and use an AppleScript application to run the shell script. this is because if you are just using AppleScript, you will be telling the MacOS Finder to do the copying, which is slower. obviously that is a bit more complicated though.

jestermgee
Posts: 4500
Joined: Mon Apr 26, 2010 6:38 am

Re: Create a "file installer" for Mac

Post by jestermgee » Thu Sep 27, 2018 2:14 am

Thanks again for the info. I think i'm understanding it more now.

The files are simply text+sound files. It's actually for the Komplete Kontrol NKS libraries I develop which users simply manually copy to their computer. Most users seem to get the gist of how to copy and paste but some get confused and the Mac Os has this issue where if you copy a folder with sub folders to a location where a folder already exists it allows you to completely replace the folder instead of just merging so I find some users completely delete all their official NKS images folder when they "replace" it with one in the zip instead of merging.

As much of a pain it is for me to learn yet another scripting language and develop 50+ new installers, if it saves the issues for a few users and makes it more simple for blind users to manage it's worth the effort.

fishmonkey
Posts: 4478
Joined: Wed Oct 24, 2007 4:50 am

Re: Create a "file installer" for Mac

Post by fishmonkey » Thu Sep 27, 2018 2:36 am

AppleScript is quite user-friendly, as it uses mostly natural language commands.

a web search on "copying files with AppleScript" will give you a bunch of good starting points to work from.

the Script Editor is a mini-IDE, so you can develop and test your script in the editor, and then export it as an application when you have got it working the way you want.

i don't know how much programming experience you have, but you can never have too much sanity and error checking in your code. try and think of every possible thing that could go wrong, and have an explicit way of handling it.

Post Reply