Add macOS compile/install instructions to INSTALL

This commit is contained in:
Bill Kendrick 2021-08-31 22:37:18 -07:00
parent 6407bec2a2
commit 987b2c1cc3
12 changed files with 1643 additions and 149 deletions

View file

@ -63,6 +63,9 @@
<li>
<a href="#compiling-linux">Usuarios de Linux/Unix</a>
</li>
<li>
<a href="#compiling-macos">Usuarios de macOS</a>
</li>
</ul>
</li>
<li>
@ -271,7 +274,8 @@
Proceed to the next "<a href="#64bit">MinGW 64bit (x86_64) toolchains</a>" section, or skip to the "<a href="#32bit">MinGW 32bit (i686) toolchains</a>" section if you need only a 32bit build environment. </i>
</p>
<h4>
<hr size="1" noshade width="75%" />
<h4>
<a name="64bit" id="64bit">
MinGW 64bit (x86_64) toolchains </a>
</h4>
@ -368,7 +372,8 @@
<i>
Proceed to the next "<a href="#32bit">MinGW 32bit (i686) toolchains</a>" section, or skip to the "<a href="#imagemagick">ImageMagick</a>" section if you need only a 64bit build environment. </i>
</p>
<h4>
<hr size="1" noshade width="75%" />
<h4>
<a name="32bit" id="32bit">
MinGW 32bit (i686) toolchains </a>
</h4>
@ -462,6 +467,8 @@
</blockquote>
<hr size="1" noshade width="75%" />
<h4>
<a name="imagemagick" id="imagemagick">ImageMagick</a>
</h4>
@ -484,6 +491,8 @@
You can make this permanent by adding the above to your the BASH shell configuration file, "<code>~/.bash_profile</code>". </p>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>Tux Paint</h4>
<blockquote>
@ -508,6 +517,8 @@
All the files needed for starting Tux Paint (and Tux Paint Config.) are collected in the directory for binary distribution "<code>bdist</code>" directory under "<code>win32</code>". You can start them by double-clicking their executable (<code>.exe</code>) files in the "<code>bdist</code>" directory. </p>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>Building the Tux Paint Windows Installer:</h4>
<blockquote>
@ -519,6 +530,8 @@
Then, you can easily build an executable installer by right-clicking on the "<code>tuxpaint.iss</code>" icon in the "<code>win32</code>" directory and selecting "Compile" on the list. It will run for a while, and eventually you will find a "<code>tuxpaint-<i>X.Y.Z</i>-win32-installer.exe</code>" file in the same directory. </p>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>Running the Tux Paint Windows Installer:</h4>
<blockquote>
<p>
@ -536,6 +549,8 @@
Neste punto, pode premer en «Instalar» para instalar Tux Paint. </p>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>Cambiar os axustes usando o acceso directo:</h4>
<blockquote>
<p>
@ -572,6 +587,8 @@
Cando teña rematado, prema en «Aceptar». </p>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>Se algo vai mal:</h4>
<blockquote>
<p>
@ -582,6 +599,8 @@
</blockquote>
</blockquote>
<hr size="1" noshade />
<h3>
<a name="compiling-linux" id="compiling-linux">
Usuarios de Linux/Unix </a>
@ -602,6 +621,8 @@
</blockquote>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>
Desactivar a compatibilidade de «SVG» (e, polo tanto, as dependencias de «Cairo, libSVG, e svg-cairo»: </h4>
<blockquote>
@ -614,6 +635,8 @@
</blockquote>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>
Desactivar a compatibilidade de «Pango» (e, polo tanto, as dependencias de «Pango, Cairo, etc.»: </h4>
<blockquote>
@ -626,6 +649,8 @@
</blockquote>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>Desactivación do son en tempo de compilación:</h4>
<blockquote>
Se non te unha tarxeta de son ou prefire construír o programa sen asistencia de son (e polo tanto sen a dependencia <code>SDL_mixer</code>), pode executar «<code>make</code>» con «<code>SDL_MIXER_LIB=</code>» engadido: </p>
@ -636,18 +661,24 @@
</blockquote>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>Outras opcións:</h4>
<blockquote>
<p>
Outras opcións (p. ex.: rutas de instalación) poden ser anuladas; véxaas en «<code>Makefile</code>» para máis detalles. </p>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>Se se producen erros:</h4>
<blockquote>
<p>
Se recibe algún erro durante o tempo de compilación, asegúrese de ter instaladas as bibliotecas axeitadas (ver máis arriba). Se está a empregar versións empaquetadas das bibliotecas (por exemplo, RPM en RedHat ou DEB en Debian), asegúrese de obter tamén os correspondentes paquetes «<code>-dev</code>» ou «<code>-devel</code>», se non, non poderá compilar Tux Paint (e outros programas) dende o código fonte. </p>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>Instalar:</h4>
<blockquote>
<p>
@ -730,6 +761,134 @@
</blockquote>
</blockquote>
</blockquote>
<hr size="1" noshade />
<h3>
<a name="compiling-macos" id="compiling-macos">
Usuarios de macOS </a>
</h3>
<p style="font-size: small;">
<em>
21 de Setembro de 2021 Mark K. Kim &lt;<a href="mailto:markuskimius@gmail.com">markuskimius@gmail.com</a>&gt;
</em>
</p>
<blockquote>
<p>
Tux Paint 0.9.22 and earlier required building Tux Paint from the Xcode IDE. Starting with 0.9.23, however, Tux Paint for macOS is built as though it were a Linux application. </p>
<h4>Prerequisites</h4>
<blockquote>
<p>
Although Tux Paint is built without the Xcode IDE, Xcode itself is still required to build Tux Paint. <a href="https://developer.apple.com/xcode/ide/">Download it from the App Store</a>, and launch it once to accept its license agreements. You may also need to install the Xcode command line tools using the command: <blockquote>
<code>
xcode-select --install
</code>
</blockquote>
</p>
<p>
Building Tux Paint also requires various libraries. We install them from MacPorts where possible, source code otherwise. Install MacPorts to the default <code>/opt/local</code> path according to the instructions found on their website: <a href="https://www.macports.org/">https://www.macports.org/</a> <ul>
<li><code>ImageMagick</code></li>
<li><code>cairo</code></li>
<li><code>fribidi</code></li>
<li><code>lbzip2</code></li>
<li><code>libimagequant</code><sup>*</sup></li>
<li><code>libpaper</code></li>
<li><code>libpng</code></li>
<li><code>librsvg</code></li>
<li><code>libsdl</code></li>
<li><code>libsdl_image</code></li>
<li><code>libsdl_mixer</code></li>
<li><code>libsdl_pango</code></li>
<li><code>libsdl_ttf</code></li>
<li><code>pkgconfig</code></li>
<li><code>zlib</code></li>
</ul>
... but you should install any package that is required by the latest version of Tux Paint.<br/>
<br/>
<sup>*</sup> Not available from MacPorts as of this writing, see below. </p>
<h5>libimagequant</h5>
<blockquote>
<p>
<code>libimagequant</code> is not available from MacPorts as of this writing. It can be installed from the source code as follows. It should be installed to <code>/opt/local</code> (same as MacPorts) for the library to be included in <code>TuxPaint.dmg</code>. <blockquote>
<code>
$ git clone https://github.com/ImageOptim/libimagequant.git<br/>
$ cd libimagequant<br/>
$ ./configure --prefix=/opt/local<br/>
$ make<br/>
$ sudo make install
</code>
</blockquote>
</p>
</blockquote>
<p>
<strong>WARNING:</strong> Having any UNIX-like toolset installed on your Mac besides MacPorts and Xcode, such as Fink or Brew, will prevent your app bundle from being portable. Be sure Fink and Brew are not accessible from your build environment. </p>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>How to Build</h4>
<blockquote>
<p>
Simply, run: <blockquote>
<code>
% make<br/>
% make install
</code>
</blockquote>
... to create the <code>TuxPaint.app</code> application bundle that can be run in-place or
copied to <code>/Applications</code>. It also creates <code>TuxPaint.dmg</code> for distribution. </p>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>Known Issues</h4>
<blockquote>
<ul>
<li>
A macOS binary built on a specific version of macOS only runs on that version of macOS or later. To ensure Tux Paint can run on the oldest version of macOS possible, build it on the oldest version of macOS available. As of this writing we know Tux Paint cannot be built to run on macOS 10.7 or earlier.<br/>
<br/>
See "Old Versions of macOS" below for best-effort instructions on how to obtain, install, and build Tux Paint on an old version of macOS. </li>
</ul>
</blockquote>
<hr size="1" noshade width="75%" />
<h4>Old Versions of macOS</h4>
<blockquote>
<p>
Some old versions of macOS can be downloaded from Apple's support page: <a href="https://support.apple.com/en-us/HT211683">https://support.apple.com/en-us/HT211683</a> </p>
<p>
macOS does allow dual booting of multiple versions of the OS, but it's safer and easier to install the old macOS onto a flash drive. Wherever you're installing it, the target drive's partitioniong scheme and partition type must match what the old macOS expects, so use the Disk Utility to partition and format the flash drive accordingly. </p>
<p>
As of this writing, the oldest version of macOS available on Apple's support site is Yosemite 10.10, which expects "GPT (GUID Partition Table)" partitioning scheme instead of the older MBR scheme, and "Mac OS Extended (Journaled)" as the partition type instead of the newer APFS partition type. </p>
<p>
Upon launching the installer, if you get a popup about macOS being too old or new to be installed, a bootable installer can be created using the instructions found here: <a href="https://support.apple.com/en-mide/HT201372">https://support.apple.com/en-mide/HT201372</a> </p>
<p>
It has been found that macOS can be installed onto the bootable media itself, so you can make the flash drive into a bootable installer then install the old macOS onto the same flash drive. </p>
<p>
Once the old macOS is installed, you may find the Xcode on the App Store is too new to run on the version of the old macOS. Old versions of Xcode can be downloaded from Apple's Developer site in an area accessible with free registration: <a href="https://developer.apple.com/download/more/">https://developer.apple.com/download/more/</a> </p>
<p>
The list of macOS versions and the last version of Xcode compatible with them are laid out nicely on the Wikipedia page on Xcode: <a href="https://en.wikipedia.org/wiki/Xcode#Version_comparison_table">https://en.wikipedia.org/wiki/Xcode#Version_comparison_table</a> </p>
<p>
And because Xcode is being installed manually, you can skip the step to install the Xcode command line tools (do not run "<code>xcode-select --install</code>") but otherwise build Tux Paint using the same steps described in the earlier part of this document. </p>
</blockquote>
</blockquote>
</blockquote>
<hr size="2" noshade />
@ -769,6 +928,8 @@
</blockquote>
</blockquote>
<hr size="1" noshade />
<h3>
<a name="uninstalling-linux" id="uninstalling-linux">
Linux </a>