- How do I install .pkg file intended for MAC?
- 2 Answers 2
- rmi1974 / unpack_wine_macos_pkg.md
- Creating an OS X PKG file on Linux?
- 2 Answers 2
- 🍏 Как запускать приложения Mac на Linux
- Запустите виртуальную машину MacOS (все приложения)
- Использование Darling Translation Layer (только CLI)
- Сборка и установка дорогой Darling
- Extract .pkg and .mpkg files with xar on Linux
- 9 Replies to “Extract .pkg and .mpkg files with xar on Linux”
How do I install .pkg file intended for MAC?
A private bank has its net-banking facility provided with a software. Only when I install the software I will be able to use the facility. Now they have different versions of the software for Windows and MAC. There is no separate version for Linux. Is it possible to install a .pkg file (which is intended for MAC) in Ubuntu?
Wine is very good for Windows apps, but there is a program called Darling in development that should be able to do the same for Darwin/Mac apps . Both Darwin and Linux are Unix-like systems, so this could be quite simple.
2 Answers 2
You wont be able to use a Mac program in Ubuntu (as far as I know of), you can, however, try and get the Windows version working with Wine which lets you run some Windows programs on Ubuntu.
Wine (originally an acronym for «Wine Is Not an Emulator») is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, Mac OSX, & BSD
Install Wine with this command in terminal:
Then try to right click the Windows program, choose «Open With > Winw Windows Program Loader».
Info about Wine here Alternatively, you could install Windows into a Virtual Machine, running a full copy of Windows inside Ubuntu, (assuming you own a copy of Windows) and run the program in there. You could use VirtualBox or VMWare Player. This will take a bit more setup.
rmi1974 / unpack_wine_macos_pkg.md
You need xar tool for extracting macOS .pkg files on Linux. See Open/Extract xar/pkg File with Freeware on Windows/Mac/Linux for overview.
xar (short for eXtensible ARchive) is an open source file archiver and the archiver’s file format. It was created within the OpenDarwin project and is used in Mac OS X 10.5 for software installation routines, as well as browser extensions in Safari 5.0. Xar replaced the use of gzipped pax files.
pkg is just .xar archives with a different extension and a specified file hierarchy. pkg is an OS X Installer file. This file format is used by Apple Inc. on its Macintosh line of computers and on the iPhone. It is also used by Sony PlayStation 3 on downloadable content over PlayStation Network. The contents of a PKG file can be installed using the Apple Installer application.
$ mkdir -p winehq-devel-5.0-rc4 && cd $_ $ xar -xf ../winehq-devel-5.0-rc4.pkg $ ll total 28 -rw-r--r--. 1 focht focht 2994 Jan 4 01:07 Distribution drwxr-xr-x. 3 focht focht 4096 Jan 5 15:07 org.winehq.wine-devel32.pkg drwxr-xr-x. 3 focht focht 4096 Jan 5 15:08 org.winehq.wine-devel64.pkg drwxr-xr-x. 2 focht focht 4096 Jan 5 15:06 org.winehq.wine-devel-deps64.pkg drwxr-xr-x. 2 focht focht 4096 Jan 5 15:06 org.winehq.wine-devel-deps.pkg drwxr-xr-x. 3 focht focht 4096 Jan 5 15:10 org.winehq.wine-devel.pkg drwxr-xr-x. 2 focht focht 4096 Jan 5 15:06 Resources
$ cd org.winehq.wine-devel.pkg/ $ cat Payload | gunzip -dc |cpio -i 735228 blocks
$ file Contents/Resources/wine/lib/wine/write.exe Contents/Resources/wine/lib/wine/write.exe: PE32 executable (GUI) Intel 80386, for MS Windows
Creating an OS X PKG file on Linux?
I have Debian / Ubuntu / Xubuntu. I’m trying to distribute and run a Python file with the least number of clicks for the end user. How do I create a PKG file for Mac OS X on Linux? Edit: I think I may have ended up using a rar or a zip file, which has contents that can be ran somewhat like a DMG can be.
stackoverflow.com/questions/2323818/… this SE question might be a start, also osxgnu.org/info/osxpackages.html — other than some files that are generated by packagemaker, it looks like the pkg file is a fairly standard nix style compressed archive
If I extract the contents of a .pkg file, there’s some directories, and a PAX file (which i can make), and a BOM file, (which i’ve no idea how to make on a platform other than osx)
@TomO’Connor Is your problem identical to Luke’s, i.e. you have a script file and just want to execute it (and could accept alternatives), or do you actually want to create a proper Installer .pkg , possibly containing lots of files?
@TomO’Connor It’s much easier to create Mac OS X application bundles. There might be easier options that integrate just as well with your target system (i.e. easy for your users). Consider specifying your requirements in more detail. If they’re not too fancy, and more along the lines of running instead of installing, this might work quite well.
2 Answers 2
Some multiplatform installers I know of are :
IzPack is a an open source software installer generator. As it uses Java you need the JRE on the target platform.
a multiplatform GUI installer and builder designed to be completely cross-platform and function on Windows and most all versions of UNIX with eventual support for Mac OS X.
You could contact the developer, as he is very responsive.
InstallAnywhere is a commercial multiplatform installer. Its Standard Edition is priced at $1,999.
Generate installers for all target platforms from a single project file. Create all your installers from a single build environment!
The only one from the above that I have used is InstallJammer, which I really recommend. If OS X is already available in beta, don’t hesitate to try it, as the developer corrects bugs at a very fast pace.
🍏 Как запускать приложения Mac на Linux
К сожалению, это не означает, что приложения могут плавно переходить между операционными системами.
Для запуска приложений Mac в Linux вам понадобится виртуальная машина или слой перехода.
Запустите виртуальную машину MacOS (все приложения)
Самый надежный способ запуска приложений Mac в Linux – через виртуальную машину.
С помощью бесплатного гипервизора с открытым исходным кодом, такого как VirtualBox, вы можете запускать macOS на виртуальном устройстве на вашем компьютере с Linux.
Правильно установленная виртуализированная среда MacOS без проблем запустит все приложения MacOS.
Подобная виртуализация рабочего стола требует значительного объема оперативной памяти, поэтому она может работать некорректно на устройствах с ограниченными ресурсами.
Для машин с техническими характеристиками наилучшим вариантом является виртуализация операционных систем через виртуальную машину VirtualBox.
Использование Darling Translation Layer (только CLI)
Вы также можете запустить слой перехода под названием Darling.
Он работает как WINE, которая создает среду перевода с Windows на Linux, которая позволяет вам запускать некоторые приложения Windows в системах Linux.
Darling пытается достичь той же цели между macOS и Linux.
Поскольку macOS и Linux совместно используют одну и ту же базу в стиле UNIX, Darling менее ресурсоемок, чем WINE, и в большинстве случаев дает лучшие результаты.
В настоящее время Darling может работать только с очень простыми приложениями с графическим интерфейсом и несколькими приложениями командной строки.
Хотя поддержка приложений с графическим интерфейсом является целью проекта, эта функция еще не реализована.
По сути, вы можете надежно запускать оболочку macOS в Терминале и, возможно, не сможете эффективно запускать другие приложения.
Он также содержит огромное количество кода, требующего около 12 гигабайт дискового пространства после сборки.
По сути, это дублирует функциональность операционной системы MacOS.
Поэтому, если вы беспокоитесь о том, что удаленные исполняемые файлы могут повредить вашу систему, вы можете избегать пакетов такого размера.
Сборка и установка дорогой Darling
1. Следуйте инструкциям по установке, чтобы загрузить правильные зависимости для вашего дистрибутива Linux со страницы установки Darling.
В зависимости от вашего дистрибутива вам может потребоваться выполнить длинную команду.
Например, для Ubuntu выполните следующую команду терминала, чтобы загрузить зависимости Darling:
sudo apt-get install cmake clang bison flex xz-utils libfuse-dev libudev-dev pkg-config libc6-dev:i386 linux-headers-generic gcc-multilib libcap2-bin libcairo2-dev libgl1-mesa-dev libtiff5-dev libfreetype6-dev libfreetype6-dev:i386 git libelf-dev libxml2-dev libegl1-mesa-dev libfontconfig1-dev libbsd-dev
git clone --recursive https://github.com/darlinghq/darling.git
3. Измените каталог на Darling:
5. Сконфигурируйте сборку с помощью cmake:
Процесс сборки может занять более одного часа, в зависимости от ресурсов вашего компьютера.
Extract .pkg and .mpkg files with xar on Linux
macOS installer packages have the .pkg extension which are xar archives, to extract them on Linux we need to download and compile xar from https://code.google.com/archive/p/xar/downloads.
Operating system: Linux Debian 9 / kernel 4.9.0-3-amd64
2. Download and extract xar-1.5.2.tar.gz
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/xar/xar-1.5.2.tar.gz
tar -zxvf xar-1.5.2.tar.gz
4. Extract files with xar
9 Replies to “Extract .pkg and .mpkg files with xar on Linux”
it does not work: apt-get install build-essential libxml2-dev libssl1.0-dev zlib1g-dev E: Unable to locate package libssl1.0-dev
Linux Mint 19.3 my error is ;
“make: *** No targets specified and no makefile found. Stop.” I couldn’t find any specific solution.
Hi Bruno and vokhirion, Make sure that the ./configure is finishing successfully.
In case of an error, you must install the dependencies and retry the ./configure.
You have to use make and make install only after the ./configure was successfully.
My configure did not work. Here is the error:
============================================
checking for openssl/evp.h… yes
checking for OpenSSL_add_all_ciphers in -lcrypto… no
configure: error: Cannot build without libcrypto (OpenSSL)
================================================
I added the OpenSSL package (a higher version than the one recommended because the one recommended could not be found.
I reran the ./configure but got the same error, however, I found the libcrypto file:
===============================================
~/xar-1.5.2$ sudo find / -name libcrypto.so
/usr/lib/x86_64-linux-gnu/libcrypto.so I added the path to the LD_LIBRARY_PATH variable, but it still would not pick it up. Can you say what I might do to get the configure script to pick up the libcrypto file?
The missing libcrypo stuff is because debian has moved on and/or reorganised the openssl libraries. I found it simplest to go build the old debian packages. You can download them ready-built straight from debian packages repositories too.
libssl1.0.2_1.0.2u-1~deb9u1_i386.deb
libssl1.0-dev_1.0.2u-1~deb9u1_i386.deb
You probably need to uninstall libssl-dev if you have a 1.1-based version (Debian unstable does). Then you get a minor fight with apt that you should win easily.
Could you please write down the linux commands that we should be using now that the dependencies are no longer available to use this method?
I am very new at linux and couldn’t follow it after the dependencies were no longer found.
Any help would be appreciated.
Thanks
I could build xar without problems on a Raspberry Pi. But when I try to unpack an mpkg file, it refuses:
qic-warm:~/src> xar -xv -f 1528098253_uart_1_wire_clic_mikroc_arm.mpkg
Usage: xar -[ctx][v] -f …
-c Creates an archive
-x Extracts an archive
-t Lists an archive
….