how can i Combining Multiple different DMGs for my application - macos

I am new to iOS/OS X. I have written kernel code, Qt app and Front End application for my application for OS X & tested it, works fine.
Problems facing :
I have to make a single distributable .dmg, which will install all three codes{kernel code, Qt app & Front end application } in separate directories with single double click.
How can i make this work ?
Methods Tried :
1) I made separate .dmg and added to a folder and again created another .dmg of folder .(But it require again to double click to install all three code parts)
2) I tried to generate .dmg with command line macdeployqt, Disk Utility, IDMG , DropDMG (It help in also adding licenses).
2a) DropDMG have the option of joining and then convert Image /Archiver its not working, After i joined the first file (file.001) ,it shows message "Use Convert ..to join ".dmgpart"files. when i try for convert Image /Archiver option, it doesn't detect files (.dmgpart)
Note : I am using DropDMG trail version and i renamed all three files as file.001 , file.002.dmgpart and file.003.dmgpart (as per user guild )

A .dmg is a disk image, not an installer; you need to create an Installer Package instead.
PRODUCTBUILD
productbuild -- Build a product archive for the OS X Installer or the Mac App Store
A product archive is a flat file with a .pkg extension. productbuild creates a deployable product archive, archive,
chive, which can be used with the OS X Installer.
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/productbuild.1.html#//apple_ref/doc/man/1/productbuild
PKGBUILD
pkgbuild -- Build an OS X Installer component package from on-disk
files
A component package contains payload to be installed by the OS X Installer. Although a component
package can be installed on its own, it is typically incorporated into a product archive, along with a
distribution and localized resources, using productbuild(1).
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/pkgbuild.1.html#//apple_ref/doc/man/1/pkgbuild

Related

How to build an installer for a python application for Mac

I have created a python application and can install it perfectly fine on Windows. I run pyinstaller to generate the executable, and then use NSIS to create an actual installer. I run the installer and it installs the application to my Program Files folder and gives me a nice desktop shortcut, etc.
What is the process to do the same for Mac? Essentially, I want to give my user a single file. When they run the file, it installs my program and any necessary libraries, and let's them launch it with a single click. I believe on Mac this is done with a .dmg or a .pkg file. What software/tools do I need to generate such a file? Do I need to restructure the project in anyway to create this?
For more info, pyinstaller creates a folder 'dist' which contains the unix executable of the application, and copies of python and any required libraries.
Note that I do not want to use the onefile option for pyinstaller because it would take a while to unpack everything each time the program is ran.

Windows store APPX package install file in different location

So I have recently developed an app for the windows store, I packaged it into an APPX package. The problem is that windows auto installs it into a non-accessible folder meaning I cannot reference .exe and .pdf files.
Is there a way to make it always install 2 files in the same place, for example the two files which need to be edited install on desktop and the rest of the app in the usual install location?
Can I do this using two separate .APPX files?
No, all APPX/MSIX packages are installed/extracted under the ProgramFiles/WindowsApps folder.
This folder is read-only, only the OS can write in there (when it's installing the app).
The solution is to copy the files you want from the install folder, the first time a user launches your application.

Can macOS flat file pkg installer throw error dialog?

I want to throw error dialog (and fail the installation) if certain file exists on the system. Is it possible?
pkg = flat file pkg
It's possible to customize the installer in various ways to get whatever functionality is needed generally. Typically in your scenario either a Pre-Installation script could be used or a Package Installer Plugin. The options would normally be defined in the installer package's distribution.dist which essentially functions as the schema it will follow.
See productbuild in the man pages:
--scripts scripts-path
- The contents of scripts-path is added to the product archive for use by system.run() commands commands in the distribution. This is valid only for product archives targeted to the OS X Installer application.
--plugins plugins-path
- The contents of plugins-path is added to the product archive for use by the OS X Installer application's plugin mechanism. It will normally contain a InstallerSections.plist file, and one or more plugin bundles.
↳ About Distribution Definition Files & productbuild

Move executable from application bundle to system location

In my cocoa application, i am trying to push a third party executable file to this /usr/libexec/cups location. For that , i have added this third party executable file in my bundle and successfully moved the file to that location when i run my application.
But the executable is not performing the same operation like when i install the third party installer package. if i manually copy the executable file to the location, it works fine by repairing the permission.
Edited :
Now i found that the executable file is altered in application package contents. Don't know how it get altered. what is the safest way to move a executable from application bundle to application content without getting altered.
Note that : I have disabled the sandbox mode in my application.
No need to do this complex steps. Use package maker, include your executables and application, apply the permission and create a .pkg file. If you are not releasing in mac store , its best to release the app in .pkg format using package maker.

How to autolaunch installer from dmg

I want to deploy my program on Macintosh and I have a working installer but the installer and the files are packed into a zip file. I would like to make a DMG file and place them into it. This is easy to do but I would like the installer to start automatically when the user opens the DMG file. Is there any way to do that?
No, you cannot do this. What you need to do is convert your installer package to a flat package (these are now the default anyway). A flat package installer is a single file, so there's no need to bundle it into a zip or DMG.

Resources