Step 1 of Merging branch 'master' into sdl2.0 in a try to minimize conflicts

This commit is contained in:
Pere Pujal i Carabantes 2022-01-28 22:50:04 +01:00
commit 4107ae3ecd
161 changed files with 16716 additions and 11237 deletions

View file

@ -751,7 +751,7 @@
</h3>
<p style="font-size: small;">
<em>
September 21, 2021 Mark K. Kim &lt;<a href="mailto:markuskimius@gmail.com">markuskimius@gmail.com</a>&gt;
January 20, 2022 Mark Kim &lt;<a href="mailto:markuskimius@gmail.com">markuskimius@gmail.com</a>&gt;
</em>
</p>
@ -800,7 +800,7 @@
$ sudo port install rust cargo<br/>
$ git clone https://github.com/ImageOptim/libimagequant.git<br/>
$ cd libimagequant/imagequant-sys<br/>
$ cargo build --release<br/>
$ cargo build --release # Must use cargo from MacPorts<br/>
$ sudo make PREFIX=/opt/local install
</code>
</blockquote>
@ -823,7 +823,10 @@
% 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>
... to create the <code>TuxPaint.app</code> application bundle that can be run in-place or copied to <code>/Applications</code>. To create the DMG file for distribution, use 'make TuxPaint.dmg'. </p>
<p>
Additional steps may be required when building for the Apple Silicon. See "Building for Apple Silicon" below. </p>
</blockquote>
<hr size="1" noshade width="75%" />
@ -834,7 +837,9 @@
<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>
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.<br/>
<br/>
Alternatively, Tux Paint and all of its library dependencies may be compiled with appropriate options to be runnable on older versions of macOS. These options are already set on Tux Paint, so only its dependencies (from MacPorts) need to be recompiled. See "Recompiling MacPorts" below for the instructions. </li>
</ul>
</blockquote>
@ -846,7 +851,10 @@
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>
macOS for Intel CPU 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>
Dual booting multiple versions of macOS for Apple Silicon has been so far unsuccessful. Instead of installing an older version of macOS for Apple Silicon to build Tux Paint to run on the old version of macOS for Apple Silicon, use the instructions found in the "Recompiling MacPorts" section to build Tux Paint to run on older versions of macOS for Apple Silicon. </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>
@ -854,9 +862,6 @@
<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>
@ -868,6 +873,64 @@
</blockquote>
<h4>Recompiling MacPorts</h4>
<blockquote>
<p>
To recompile MacPorts to be usable on older versions of macOS, set the following options in <code style="white-space: nowrap;">/opt/local/etc/macports/macports.conf</code>: <blockquote>
<code>
buildfromsource always<br/>
macosx_deployment_target 10.10
</code>
</blockquote>
</p>
<p>
Then uninstall all MacPorts packages: <blockquote>
<code>
$ sudo port -fp uninstall installed
</code>
</blockquote>
</p>
<p>
Then reinstall all MacPorts packages needed by Tux Paint. Also rebuild libimagequant using the updated Cargo package from MacPorts. </p>
<p>
As of this writing, all libraries Tux Paint requires from MacPorts can be recompiled in this manner to run on macOS 10.10 Yosemite and later on Intel CPUs, and macOS 11.0 Big Sur and later on Apple Silicon. Unfortunately, although MacPorts has the option to enable the building of universal libraries, several libraries Tux Paint require cannot be built as universal libraries so they can only be built to run natively on the hardware on which they were built. See "Building a Universal Binary" below for instructions on how to build Tux Paint as a Universal Binary. </p>
</blockquote>
<h4>Building for Apple Silicon</h4>
<blockquote>
<p>macOS for Applie Silicon requires all native Apple Silicon applications be signed, even if it is signed "ad-hoc" (anonymously). Because of this, compilers that produce native Apple Silicon applications sign all produced binaries and libraries as a part of the compilation process.<sup>*</sup> However, the Tux Paint compilation process modifies the libraries to be modular (using <code>install_name_tool</code>) so they can be added into the application bundle, which has the unfortunate side effect of breaking the signature. This can be addressed by signing the application bundle ad-hoc (example below) or using your own Apple Developer Identity if you have one. The DMG file, if needed, must be created after signing the App Bundle so the DMG file is created with signed App Bundle: <blockquote>
<code>
$ codesign -s - TuxPaint.app<br/>
$ make TuxPaint.dmg
</code>
</blockquote>
<sup>*</sup> For more information on the code signing requirements on the Apple Silicon, see https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-universal-apps-release-notes#:~:text=New%20in%20macOS,pass%20through%20Gatekeeper.
</p>
<p>If you get an error that the application bundle is already signed, remove it before signing:: <blockquote>
<code>
$ codesign --remove-signature TuxPaint.app
</code>
</blockquote>
</p>
<p>If you plan to combine the Apple Silicon bundle with the Intel CPU bundle to produce the Universal bundle, the code signing must be done after they are combined. See "Building a Universal Binary" below. </p>
</blockquote>
<h4>Building a Universal Binary</h4>
<blockquote>
<p>
To build Tux Paint as a Universal Binary, compile Tux Paint for the Intel CPU and the Apple Silicon separately first. Then rename the app bundle for the Intel CPU to TuxPaint-x86_64.app, and the bundle for the Apple Silicon to TuxPaint-arm64.app, copy the app bundle from the Intel machine to the Apple Silicon machine, then use the provided <code>build-universal.sh</code> script to combine the two application bundles as below. The produced bundle must be signed (see "Building for Apple Silicon" above for more details). The DMG file, if required, must be built after the signing: <blockquote>
<code>
$ macos/build-universal.sh<br/>
$ codesign -s - TuxPaint.app <br/>
$ make TuxPaint.dmg
</code>
</blockquote>
</p>
</blockquote>
</blockquote>
</blockquote>

View file

@ -29,7 +29,7 @@
</p>
<p>
January 20, 2022 </p>
January 21, 2022 </p>
</center>
<hr size="2"
@ -589,6 +589,9 @@
<p>
In the canvas, click the mouse and hold it to stretch the shape out from where you clicked. Some shapes can change proportion (e.g., rectangle and oval may be wider than tall, or taller than wide), others cannot (e.g., square and circle). </p>
<p>
For shapes that can change proportion, the aspect ratio of the shape will be shown at the bottom. For example: "1:1" will be shown if it is "square" (as tall as it is wide); "2:1" if it is either twice as wide as it is tall, or twice as tall as it is wide; and so on. </p>
<p>
Let go of the mouse when you're done stretching. </p>
@ -807,7 +810,7 @@
Clicking this tool will undo the last drawing action. You can even undo more than once! </p>
<p>
<strong>Note:</strong> You can also press <b><code>[Control]</code></b> + <code><b>[Z]</b></code> on the keyboard to Undo. </p>
<strong>Note:</strong> You can also press <b><code>[Control / &#8984;]</code></b> + <code><b>[Z]</b></code> on the keyboard to Undo. </p>
<br clear="all">
<hr size="1">
@ -830,7 +833,7 @@
As long as you don't draw again, you can redo as many times as you had undone! </p>
<p>
<strong>Note:</strong> You can also press <b><code>[Control]</code></b> + <code><b>[R]</b></code> on the keyboard to Redo. </p>
<strong>Note:</strong> You can also press <b><code>[Control / &#8984;]</code></b> + <code><b>[R]</b></code> on the keyboard to Redo. </p>
<br clear="all">
<hr size="1">
@ -850,7 +853,7 @@
Clicking the 'New' button will start a new drawing. A dialog will appear where you may choose to start a new picture using a solid background color, or using a 'Starter' or 'Template' image (see below). You will first be asked whether you really want to do this. </p>
<p>
<strong>Note:</strong> You can also press <b><code>[Control]</code></b> + <code><b>[N]</b></code> on the keyboard to start a new drawing. </p>
<strong>Note:</strong> You can also press <b><code>[Control / &#8984;]</code></b> + <code><b>[N]</b></code> on the keyboard to start a new drawing. </p>
<strong>'Starter' &amp; Template Images</strong>
<blockquote>
<p>
@ -963,7 +966,7 @@
If choose to open a picture, and your current drawing hasn't been saved, you will be prompted as to whether you want to save it or not. (See "<a href="#save">Save</a>," below.) </p>
<p>
<strong>Note:</strong> You can also press <b><code>[Control]</code></b> + <code><b>[O]</b></code> on the keyboard to bring up the 'Open' dialog. </p>
<strong>Note:</strong> You can also press <b><code>[Control / &#8984;]</code></b> + <code><b>[O]</b></code> on the keyboard to bring up the 'Open' dialog. </p>
<br clear="all">
<hr size="1">
@ -1003,7 +1006,7 @@
<strong>Note:</strong> If either the "<code>saveover</code>" or "<code>saveovernew</code>" options are set, it won't ask before saving over. See the "<a href="OPTIONS.html"><em>Options</em></a>" documentation. </p>
<p>
<strong>Note:</strong> You can also press <b><code>[Control]</code></b> + <code><b>[S]</b></code> on the keyboard to save. </p>
<strong>Note:</strong> You can also press <b><code>[Control / &#8984;]</code></b> + <code><b>[S]</b></code> on the keyboard to save. </p>
<br clear="all">
<hr size="1">
@ -1255,7 +1258,7 @@
In that case, the "window close" button on Tux Paint's title bar (if not in fullscreen mode) or the <b><code>[Alt]</code></b> + <b><code>[F4]</code></b> key sequence may be used to quit. </p>
<p>
If neither of those are possible, the key sequence of <b><code>[Shift]</code></b> + <b><code>[Control]</code></b> + <b><code>[Escape]</code></b> may be used to quit. </p>
If neither of those are possible, the key sequence of <b><code>[Shift]</code></b> + <b><code>[Control / &#8984;]</code></b> + <b><code>[Escape]</code></b> may be used to quit. </p>
<p>
See the "<a href="OPTIONS.html"><em>Options</em></a>" documentation. </p>