Cannot Run Qt Installer Application on MAC(Mojave) - macos

I have developed a camera application for MAC platform. The app executable and framework dependencies were bundled into an installer app named QtCameraInstaller (developed using Qt Framework). This installer app, perform unzip process to extract the compressed files.
QTProcess process;
process.start("/bin/sh unzip /User/MyMac/Desktop/test.zip");
Case #1:
By clicking the installer application, I was able to run the installer. Exactly the unzip shell commands(part of my Qt code) were not working. The unzip task were skipped, resulted in unsuccessful installation of my Camera App (dependencies found missing after the installation).
Case #2:
When I tried to run the installer resides inside the bundled package, I was able to install the application successfully (i.e) now the shell commands were working fine. The unzip commands were working and dependencies were copied successfully.
MAC OS Version: 10.14.5(Mojave)
Can someone please help to fix the problem in Case #1 ?
What differs between Case #1 vs Case #2 ?

Please try modifying it to this: /bin/sh -c /usr/bin/unzip /User/MyMac/Desktop/test.zip
It a suggestion that may work, considering you may not have a full environment on the first case, so passing the exactly path with the -c may help.

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.

Spring Tool Suite (STS) upgrade fails

An update was downloaded automatically by my 2.6.3.RELEASE Build 201411281425.
STS (Spring Tool Suite) asks to install it and when I click on the pop-up window it does some things and then stops with the following message which seem to indicate that it wants to delete itself.
I can understand why this fails but I am not sure why STS would think that this was possible.
I could not find any instructions about manually installing the zip file that is available as a download as an alternative way to upgrade my installation.
How do I fix the automatic install or manually install the zip?
(I am on Windows 7)
Error message:
An error occurred while uninstalling
session context was:
(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Uninstall,
operand=[R]org.springsource.sts.ide.executable.win32.win32.x86_64
3.6.3.201411281415-RELEASE-e44
--> null,
action=org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupzipAction).
Backup of file C:\RAMDrive\spring\STS.exe failed.
File that was copied to backup could not be deleted: C:\RAMDrive\spring\STS.exe
Start the STS you want to upgrade and before you click on "Check for Upgrades", with STS still running, rename the STS.exe file you just started, to something else, like "STS_old.exe". That should do it.
The message sounds strange, I've never seen this before. To install a fresh copy of STS, just download the ZIP file from the download page (the one that matches your operating system and pick the right 32bit or 64bit one, depending on your OS and the JDK you are using). Then unzip, and start STS.exe. That's it.

How to run multiple DMG files in one installer using Iceberg or Package Maker?

I am trying to create a Mac Installer to streamline the process for my end users.
The idea is that they could just run one installer that would take them through the process of installing 5 different pieces of software.
Another complicating factor is that I would like to run different types of installers within this one meta-installer in a particular order
1) Install a bunch of files (including the DMG files)
2) Run one DMG file and install it
3) Run another DMG file and install it
4) Run a .sh python script that would execute through the terminal
5) Install some more files
My questions are:
Is this possible?
Any idea how to do this with either Iceberg or Package Maker?
Thanks in advance!
Well, it is definitely possible.
Seems like your requirement is that you have 5 different installers and you want to install them one by one from a single main installer.
In this case, lets assume you have all these installers inside a dmg file with one main installer (All those installers can be hidden so that user sees only the main installer when he mounts the dmg).
Now, inside the postinstall script of this main installer (assuming you use packagemaker), you can write the logic to get the current path and start installing your sub-installers. You will have to do some error-handling as well to know if any of the installation failed.
What I provided is a high level idea of how to achieve what you want to do. I am sure there are a lot of improvements you can think of when you are writing the main postinstall file that contains all the business logic.
Command to install a packagemaker installer from the script:
installer -pkg "path_to_pkg" -target /
See man page of installer for more options.

How to automatically run cocoa application after install via installer

I have a built a cocoa application that I have packaged using package maker so that the app is installed using the installer.
After install is finished I want to run the installed application. In the package maker I can see postinstall actions, but I don't find an appropriate action to execute the application.
Any ideas what should I do ? my app is install in the /Applications/my.app
Should I write a script file of some sort or should the package maker help me run the app?
Thanks,
Ahmed
You need to add a postflight (assuming you want this for both installs and upgrades. If you just want it for installs, use postinstall).
Just call open "$3/Applications/my.app" to launch.
$3 is the install target. It's usually going to be /, but if you're being installed onto another volume, it could be something different like /Volumes/Other_Drive.

GAE Go Windows - "Cannot run program", "is not a valid Win32 application"

I've been trying to run a GAE Go project I developed on my Mac on my Windows machine with GoClipse after installing and configuring the appropriate SDKs and so forth. When attempting to run the project, I get this error:
Exception occurred executing command line. Cannot run program
"C:\GoogleAppEngine\dev_appserver.py" (in directory
"D:\Golang\workspace\Project\src\pkg"): CreateProcess
error=193, %1 is not a valid Win32 application
How can I fix that error in order to run my project?
While the below configuration works on the Mac as it has Python installed by default, Windows requires a different configuration.
On Mac the GoClipse External Tools Configuration would be:
Location: /GoogleAppEngine/dev_appserver.py
Working Directory: ${workspace_loc:/Project/src/pkg}
Arguments: .
The Windows configuration should look like:
Location: C:\Python27\Python.exe
Working Directory:
Arguments: C:\GoogleAppEngine\dev_appserver.py "${workspace_loc:/Project/src/pkg}"
Trying to run .py (Which IMO is a Python file?) wont work directly on windows. You will need to install Python and then pass the above filename to Python something like (I don't know Python so don't go by exact syntax, you might need to look around)
python "C:\GoogleAppEngine\dev_appserver.py
The reason it's working on Mac is because Python comes pre-installed on mac as cited here But on windows it doesn't. So you can install Python and add the Python's bin folder to path, and then run above script and it should run fine!

Resources