macOS Catalina: trying to install content to the system volume - macos-catalina

I have apps that I distribute as .pkg files created using pkgbuild and productbuild. With macOS Catalina, this doesn't work any more. The installer complains that I'm trying to install content to the system volume.
I posted three weeks ago thinking the error had to do with bundling a Java runtime. It turns out it has nothing to do with Java.
To test it I have the smallest possible project called Hello with a main window and a button to click. In XCode, I do Product -> Archive, then Distribute App, and Copy App. This creates a directory Hello 2019-12-18 15-01-07 with contents Hello.app. The app works fine. I then
pkgbuild --root *7 Hello.pkg
which creates Hello.pkg.
When I double-click Hello.pkg in the finder the installer presents me with screens for Introduction, Destination Select (only one option is offered), and Installation type ("Standard Install on Macintosh HD"), then asks me for my password. It then says, "This package is incompatible with this version of macOS. The package is trying to install content to the system volume. Contact the software manufacturer for assistance."
It makes no difference if I codesign and notarize. Productbuild only adds one more layer to the failing process.
What am I missing?

We could fix the issue by using the option
--install-location
of the pkgbuild command.
If the
--install-location
option is not used, pkgbuild uses / as the default install location in many cases.
In macOS Catalina, only certain folders are writable. Refer this link for more details.
In our case, the package installation succeeded only when we specified one of the writable folders such as
/usr/local
/opt
/Applications
as the default install location.

Related

Qt - How to deploy application dynamically on Linux?

I have an application that I built using Qt Creator on Linux and want to deploy it now. However, I don't want to statically build it as I don't want it to be open-sourced. I tried the ldd ./YourExecutable command, however that only lists (and not add) the additional dependencies the application needs in order for it to run. My question is, how do I gather the necessary dependencies without having to individually look for these files? Is there a tool, such as windeployqt.exe on Windows, that I can use on Linux for the same purpose? Or is there a better approach than the one I'm thinking of?
Get Cygwin setup.exe: http://www.cygwin.com/
1.1. Run setup.exe and continue to package selection list.
1.2. Under Devel catagory select tools you need for compiling your source. For
example 'GNU make'.
1.3. Finish installing.
Get linux crosscompilers for cygwin:
"cygwin-gcc-linux.tar.bz2" (68.2 Mb).
md5sum: 340e91a346f5bb17e660db10e43005b8
These compilers are made with crosstool 0.28-rc37. This package contains:
gcc-3.3.4 and gcc-2.95.3 for i386 (glibc 2.1.3) and gcc-3.3.3 for amd64
(glibc 2.3.2).
Note! There is now newer version of GCC avaible with glibc 2.3.2:
"cygwin-gcc-3.3.6-glibc-2.3.2-linux.tar.bz2 (i386, x86_64)".
2.1. Copy 'cygwin-gcc-linux.tar.bz2' to 'c:\cygwin' or install directory which
you selected in setup.exe.
2.2. Open Cygwin shell and change directory to root with 'cd /'.
2.3. Uncompress to Cygwin root with command:
'tar -jxvf cygwin-gcc-linux.tar.bz2'.
Cross-compilers are installed under '/opt/crosstool'. You can use theim
directly or with commands: gcc-linux, g++-linux, gcc-linux-2.95,
g++-linux-2.95, gcc-linux-x86_64 and g++-linux-x86_64.
From: Cross-compiling on Windows for Linux
More info here.
It sounds like you want to use the shared library deployment option:
http://doc.qt.io/qt-5/linux-deployment.html#creating-the-application-package
Then if you wanted to go further than that, you could look into making a .rpm or a .deb .
There are lots of examples of qt projects that are now available on GitHub and have packages made. Usually for prebuilt binaries you need to make one for x86 and a separate one for x64.
Hope that helps.

Android App created with Kivy (Buildozer) crashes on phone, but why?

I have some problems with an App, which I wrote with kivy an packaged with buildozer is always crashing when I try to run in on my phone. On my PC I use Ubuntu 14.10 and I don't get any error when compiling it (buildozer android debug). Then I send it on my SmartPhone and I install and run it, but it just loads and after a few seconds it crashes. By the way the kivy program is not very big.
Could someone help me, please? And sorry for my bad grammar ;)
Try using kivy-launcher just put your main.py and other files and run it and you can debug logs inside log directory. Then once you got all the error fix build an apk and use it.
If you are using kivy and your app loads some images, then there is no problem. But if you are using some other packages like pygame to load images, it will crash. Or if you are working in some files like reading or writing a text file, it will crash. Because when you package your app with buildozer, It will move the additional files of your app (.txt, .png) to a different location. So your python file fails to find the additional files in your specified location.
To solve this, do some corrections in your python file like changing the path of the additional file from the current directory of the python file to the path that is referred below.
PATH = "/data/data/#package domain#.#package name#/files/app"
In the above path change #package domain# with the domain of your package and #package name# with your package name.
All the additional files of any app that is installed in an android device will go to this location.
Try out this. All the best.
Buildozer.spec, use the following setting
Tittle= abc
Package.name=abc
Package.domain=org.abc
Include all your files eg.png,txt etc
Requirements= python3,kivy==2.0.0,kivymd, pillow,kivy-deps.angle,kivy-deps.glew,kivy-deps.sdl2
Uncomment android.logcat.
Now make sure your phone is on developer mode, connect your phone to the computer, turn on USB debugging, open a terminal,
cd abc
sudo apt install scrcpy
Type
sudo apt install adb
type
scrcpy
your phone will appear on your computer.
Type
buildozer android debug deploy run logcat.
adb logcat -s python
Run your app on your phone ( ensure you phone is connected to your computer); your log file will appear

Qt project release ubuntu - error while loading shared libraries: libQt5Widgets.so.5

I want to release my project written with Qt to a Ubuntu / Linux user. If they try to execute the build release version they get this error message, because they have not installed Qt:
error while loading shared libraries: libQt5Widgets.so.5:
cannot open shared object file: No such file or directory
Is there a way to add all the libraries such as libQt5Widgets.so.5 to the folder where the executable is, just like under Windows with qt.conf, where you can specify the Plugins folder?
Try this
sudo apt-get install libqt5widgets5
One solution could be:
export LD_LIBRARY_PATH=/path/to/dir/with/libs:$LD_LIBRARY_PATH
But a proper solution would be to install QT libraries in system and/or package your app for Ubuntu (in your case).
I had recently updated the Android tools via the SDK manager when I saw this error.
Re-install the SDK tools to fix. That is what worked for my machine.
It may be simplest to package the project using Ubuntu's package management system. The Qt dependency will then be automatically installed by the package manager when your project is installed. That'd be the best way to go about it, as long as there is a version of Qt 5 available in Ubuntu's package repository. It'll save you a whole lot of grief.

Error while accessing sqlite3 shell from django application

When I run python manage.py dbshell command I get this error:
Error: You appear not to have the 'sqlite3' program installed or on your path. The solution is partly hinted at in the second post of this thread. But how it can be solved on ubuntu? The python I'm using is version 2.6.
Installing the sqlite program should solve the problem:
sudo apt-get install sqlite3
(or use synaptic if you prefer a GUI interface)
To download SQLite, you open the download page of the SQlite website.
First, go to the https://www.sqlite.org website.
Second, open the download page https://www.sqlite.org/download.html
SQLite provides various versions for various platforms e.g., Windows, Linux, Mac, etc. You should choose an appropriate version to download.
For example, to work with SQLite on Windows, you download the command-line shell program as shown in the screenshot below.
The downloaded file is ZIP format and its size is quite small.
Install SQLite
Installing SQLite is simple and straightforward.
First, create a new folder e.g., C:\sqlite.
Second, extract the content of the file that you downloaded in the previous section to the C:\sqlite folder. You should see the sqlite3.exe is in the C:\sqlite folder.
To verify the installation, you perform the following steps:
First, open the command line window and navigate to the C:\sqlite folder.
Second, enter sqlite3, you should see the following window
Third, you can type the .help command from the sqlite> prompt to see all available commands in sqlite3.
Fourth, to quit the sqlite>, you use .quit command as follows:
Append the directory where you installed the sqlite to the system path variable in windows environment variables and kaboom. Mine worked just fine.
Happy programming...!

Using QtMobility in QtCreator: Setup?

I am trying to set up a development environment to play around with developing Qt apps for Symbian devices. I have succesfully set up the environment and am able to create simple apps such as HelloWorld and get them to run on my device. I would now like to try using the QtMobility package, but I am struggling to get it to work in QtCreator.
I got some sample code for using the camera (initially I only had QtMobility 1.0.2, but I have now downloaded the 1.1.0 technology preview version). I followed the instructions in the help file to install it, here is what I did:
Extracted the zip file to C:\QtMobility
Opened a Qt Command prompt and ran configure (in the QtMobility directory)
Ran mingw32-make
Ran mingw32-make install
Finally I updated my PATH variable to include C:\QtMobility\lib
I went back to QtCreator (restarted it) and looked at the cpp file that first calls the macro QTM_USE_NAMESPACE but it is still underlined in red, because it can't find the qmobilityglobal.h file.
Does anyone know if I have missed anything out during the installation that will tell the QtCreator where to find the QtMobility header files?
mingw32-make suggests you're building for win32-mingw target environment. To work with Symbian SDKs, you should be building for e.g. symbian-abld instead. The configure.bat script will auto-detect the target you are building for. Just make sure that QT_PATH environment variable points to a location where you have a Symbian build of the Qt toolchain.
(Also note that make install is unnecessary with symbian-abld - the build step already puts everything in place in Symbian SDK directories.)