File: INSTALL.html

package info (click to toggle)
tuxpaint 1%3A0.9.28-sdl2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 39,144 kB
  • sloc: ansic: 46,280; makefile: 1,294; sh: 664; objc: 303; cpp: 120; python: 75
file content (1213 lines) | stat: -rw-r--r-- 64,392 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>
      Documentación da instalación de Tux Paint    </title>
    <meta http-equiv="Content-Type"
          content="text/html; charset=utf-8">
    <style>
  body { font-size: large; }
  table { font-size: large; }
  div.screenshot-center {
    text-align: center;
  }
  div.screenshot-right {
    float: right;
    margin-left: 1em;
    margin-bottom: 1em;
  }
  div.screenshot-right-after {
    clear: both;
  }
  div.keeptogether { page-break-inside: avoid; }
  section h1 { font-size: 2em; }
  h1, h2, h3, h4, h5 { font-family: sans; }
  h1 { color: #800; page-break-before: always; break-before: always; }
  h2 { color: #440; page-break-after: avoid; break-after: avoid; }
  h3 { color: #080; page-break-after: avoid; break-after: avoid; }
  h4 { color: #008; page-break-after: avoid; break-after: avoid; }
  h5 { color: #808; page-break-after: avoid; break-after: avoid; }
  h1 + p { page-break-inside: avoid; }
  h2 + p { page-break-inside: avoid; }
  h3 + p { page-break-inside: avoid; }
  h4 + p { page-break-inside: avoid; }
  h5 + p { page-break-inside: avoid; }
  dt {
    font-size: large;
    color: #404;
    font-family: sans;
    margin-top: 1em;
    margin-bottom: 0.25em;
  }
  dd, blockquote {
    border-left: 1px solid #888;
    padding-left: 1em;
    border-radius: 0 0 0 1em;
  }
  p.note {
    border: 1px solid #000;
    background-color: #eee;
    border-radius: 0.5em;
    padding: 0.5em;
    display: inline-block;
    margin-right: 3em;
  }
  section.outer {
    padding-bottom: 1em;
    border-bottom: 2px solid #000;
  }
  section.indent p,dl {
    margin-left: 2em;
  }
  section.indent dl p {
    margin-left: 0;
  }
  p + ul {
    margin-left: 2em;
  }

  @media print {
    p {
      orphans: 3;
      widows: 3;
    }
  }
</style>
  </head>
  <body bgcolor="#FFFFFF"
        text="#000000"
        link="#0000FF"
        vlink="#FF0000"
        alink="#FF00FF">
    <section class="outer">
      <header>
        <center>
          <h1>
            <img src="../../html/images/tuxpaint-title.png"
                width="205"
                height="210"
                alt="Tux Paint"><br>
            versión 0.9.28<br/>
            Documentación da instalación          </h1>

          <p>
            Copyright &copy; 2002-2022 by varios colaboradores; see <a href="../../AUTHORS.txt">AUTHORS.txt</a>.<br>
            <a href="https://tuxpaint.org/">https://tuxpaint.org/</a>
          </p>

          <p>
             4 de Xuño de 2022          </p>
        </center>
      </header>

      <table border="2"
             cellspacing="0"
             cellpadding="2"
             summary="Índice"
             align="center"
             style="page-break-inside: avoid;">
        <tr>
          <th>
            Índice          </th>
        </tr>

        <tr>
          <td>
            <ul>
              <li><a href="#requirements">Requirements</a>                <ul>
                  <li><a href="#req-libsdl">Simple DirectMedia Layer library (libSDL)</a></li>                  <li><a href="#req-other-libs">Outras bibliotecas</a></li>                </ul>
              </li>
              <li><a href="#compiling">Compiling and Installation</a>                <ul>
                  <li><a href="#compiling-windows">Windows</a></li>                  <li><a href="#compiling-linux">Linux/Unix</a></li>                  <li><a href="#compiling-macos">macOS</a></li>                </ul>
              </li>
              <li><a href="#debugging">Debugging</a></li>              <li><a href="#uninstalling">Uninstalling Tux Paint</a>                <ul>
                  <li><a href="#uninstalling-windows">Windows</a></li>                  <li><a href="#uninstalling-macOS">macOS</a></li>                  <li><a href="#uninstalling-linux">Linux</a></li>                </ul>
              </li>
            </ul>
          </td>
        </tr>
      </table>
    </section>

    <section class="outer indent"><!-- H1: Requirements -->
      <header>
        <h1>
          <a name="requirements" id="requirements">
            Requirements          </a>
        </h1>
      </header>

      <section class="indent"><!-- H2: Simple DirectMedia Layer library (libSDL) -->
        <header>
          <h2>
            <a name="req-libsdl" id="req-libsdl">
              Simple DirectMedia Layer library (libSDL)            </a>
          </h2>
        </header>

        <p>
          Tux Paint require a «Simple DirectMedia Layer Library (libSDL)», unha biblioteca de programación multimedia de código aberto dispoñíbel baixo a licenza pública GNU Lesser General Public License (LGPL).        </p>

        <p>
          Along with libSDL, Tux Paint depends on a number of other SDL 'helper' libraries: SDL_Image (for graphics files), SDL_gfx (for some graphical functions, like rotation), SDL_TTF and (optionally) SDL_Pango (for True Type Font support) and, optionally, SDL_Mixer (for sound effects).        </p>

        <dl>
          <dt><strong>Linux/Unix</strong></dt>
          <dd>
            <p>
              As bibliotecas SDL están dispoñíbeis como código fonte ou como paquetes RPM ou Debian para varias distribucións de Linux. Pódense descargar dende:            </p>
            <ul>
              <li>libSDL: <a href="http://www.libsdl.org/">http://www.libsdl.org/</a></li>
              <li>SDL_Image: <a href="http://www.libsdl.org/projects/SDL_image/">http://www.libsdl.org/projects/SDL_image/</a></li>
              <li>SDL_gfx: <a href="https://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/">https://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/</a> (<a href="https://sourceforge.net/projects/sdlgfx/">https://sourceforge.net/projects/sdlgfx/</a>)</li>
              <li>SDL_TTF: <a href="http://www.libsdl.org/projects/SDL_ttf/">http://www.libsdl.org/projects/SDL_ttf/</a></li>
              <li>SDL_Pango: <a href="http://sourceforge.net/projects/sdlpango/">http://sourceforge.net/projects/sdlpango/</a> (opcional)</li>
              <li>SDL_Mixer: <a href="http://www.libsdl.org/projects/SDL_mixer/">http://www.libsdl.org/projects/SDL_mixer/</a> (opcional)</li>
            </ul>

            <p>
              Normalmente tamén están dispoñíbeis xunto coa súa distribución de Linux (p. ex.: nun medio de instalación ou dispoñíbeis a través dun software de mantemento de paquetes como «<code>apt</code>» de Debian).            </p>

            <p class="note">
              <span title="Information">&#128161;</span>              <strong>Note:</strong> When installing libraries from packages, be sure to ALSO install the development versions of the packages. (For example, install both "<code>SDL-1.2.4.rpm</code>" <em>and</em> "<code>SDL-1.2.4-devel.rpm</code>".)            </p>
          </dd>
        </dl>
      </section><!-- H2: Simple DirectMedia Layer library (libSDL) -->

      <section class="indent"><!-- H2: Other Libraries -->
        <header>
          <h3>
            <a name="req-other-libs" id="req-other-libs">
              Outras bibliotecas            </a>
          </h3>
        </header>

        <p>
          Tux Paint tamén aproveita outras bibliotecas libres con licenza LGPL. En Linux, do mesmo xeito que SDL, deberían estar xa instaladas ou estar dispoñíbeis para a súa instalación como parte da súa distribución de Linux.        </p>

        <dl>
          <dt><strong>libPNG</strong></dt>
          <dd>
            <p>
              Tux Paint utiliza o formato PNG (Portable Network Graphics – Gráficos de Rede Portátiles) para os seus ficheiros de datos. A imaxe SDL requirirá a instalación de libPNG.            </p>

            <p>
              <a href="http://www.libpng.org/pub/png/libpng.html">http://www.libpng.org/pub/png/libpng.html</a>
            </p>
          </dd>

          <dt><strong>gettext</strong></dt>
          <dd>
            <p>
              Tux Paint utiliza a configuración local do sistema xunto coa biblioteca «gettext» para admitir varios idiomas (p. ex., o español). Necesitará ter a biblioteca gettext instalada.            </p>

            <p>
              <a href="http://www.gnu.org/software/gettext/">http://www.gnu.org/software/gettext/</a>
            </p>
          </dd>

          <dt><strong>libpaper (Só Linux/Unix)</strong></dt>
          <dd>
            <p>
              A partir de Tux Paint 0.9.17, Tux Paint pode determinar o tamaño de papel predeterminado do seu sistema (p. ex.: A4 ou Carta), ou pódeselle indicar que use un tamaño de papel particular, grazas a «libpaper».            </p>

            <p>
              <a href="https://github.com/naota/libpaper">https://github.com/naota/libpaper</a>
            </p>
          </dd>

          <dt><strong>FriBiDi</strong></dt>
          <dd>
            <p>
              As ferramentas «Texto» e «Etiqueta» de Tux Paint admiten linguaxes bidireccionais grazas á biblioteca «FriBiDi».            </p>

            <p>
              <a href="http://fribidi.org/">http://fribidi.org/</a>
            </p>
          </dd>

          <dt><strong>Compatibilidade de SVG</strong></dt>
          <dd>
            <p>
              A partir de Tux Paint 0.9.17, Tux Paint pode cargar imaxes SVG (Scalable Vector Graphics — Gráficos Vectoriais Escalábeis) como selos. Admítense dous conxuntos de bibliotecas e pódese desactivar completamente a compatibilidade SVG (a través de «<code style="white-space: nowrap;">make SVG_LIB:=</code>»)            </p>

            <dl>
              <dt>librsvg-2 &amp; libCairo2 (bibliotecas máis recentes)</dt>
              <dd>
                <ul>
                  <li>libRSVG 2: <a href="http://librsvg.sourceforge.net/">http://librsvg.sourceforge.net/</a></li>
                  <li>Cairo 2: <a href="http://www.cairographics.org/">http://www.cairographics.org/</a></li>
                  <li>Estes tamén dependen do seguinte:                    <ul>
                      <li>GdkPixbuf &amp; GLib: <a href="http://www.gtk.org/">http://www.gtk.org/</a></li>
                      <li>Pango: <a href="http://www.pango.org/">http://www.pango.org/</a></li>
                    </ul>
                  </li>
                </ul>
              </dd>

              <dt>Bibliotecas SVG máis antigas</dt>
              <dd>
                <ul>
                  <li>libcairo1, libsvg1, &amp; libsvg-cairo1: <a href="http://www.cairographics.org/">http://www.cairographics.org/</a></li>
                  <li>Estes tamén dependen do seguinte:                    <ul>
                      <li>libxml2: <a href="https://gitlab.gnome.org/GNOME/libxml2">https://gitlab.gnome.org/GNOME/libxml2</a></li>
                    </ul>
                  </li>
                </ul>
              </dd>
            </dl>
          </dd>

          <dt><strong>Función de exportación de GIF animado</strong></dt>
          <dd>
            <p>
              Para a compatibilidade da exportación de GIF animados (presentacións de diapositivas), é necesaria a biblioteca «libimagequant» (do proxecto «pngquant2»).            </p>

            <p>
              <a href="https://github.com/ImageOptim/libimagequant">https://github.com/ImageOptim/libimagequant</a>
            </p>
          </dd>

          <dt><strong>Ferramentas NetPBM (opcional) Xa non se usa, de xeito predeterminado</strong></dt>
          <dd>
            <p class="note">
              <span title="Version variation">&#128220;</span>              En Linux e Unix, as versións anteriores de Tux Paint utilizaban as ferramentas NetPBM para axudar á impresión. (Tux Paint xera un PNG e convértese nun PostScript usando as ferramentas da liña de ordes NetPBM «<code>pngtopnm</code>» e «<code>pnmtops</code>»).            </p>

            <p>
              <a href="http://netpbm.sourceforge.net/">http://netpbm.sourceforge.net/</a>
            </p>
          </dd>
        </dl>
      </section>
    </section>

    <section class="outer indent"><!-- H1: Compiling and Installation -->
      <header>
        <h1>
          <a name="compiling" id="compiling">
            Compiling and Installation          </a>
        </h1>
      </header>

      <p>
        Tux Paint publícase baixo a Licenza Pública Xeral de GNU (GPL) (consulte «COPYING.txt» para máis detalles) e, polo tanto, o «código fonte» do programa está dispoñíbel libremente.      </p>

      <section class="indent"><!-- H2: Windows -->
        <header>
          <h2>
            <a name="compiling-windows" id="compiling-windows">
              Windows            </a>
          </h2>

          <p style="font-size: small;">
            <em>
              16 de Maio de 2022              Shin-ichi TOYAMA dolphin6k@wmail.plala.or.jp &lt;<a href="mailto:dolphin6k@wmail.plala.or.jp">dolphin6k@wmail.plala.or.jp</a>&gt;
            </em>
          </p>
        </header>

        <section class="indent"><!-- H3: Compiling Set-Up -->
          <header>
            <h3>Compiling Set-Up</h3>
          </header>

          <p>
            A partir de febreiro de 2005 (comezando con Tux Paint 0.9.15), o «<code>Makefile</code>» inclúe compatibilidade para construír nun sistema Windows usando MinGW/MSYS (<a href="https://sourceforge.net/projects/msys2/">https://sourceforge.net/projects/msys2/</a>).          </p>

          <p>
            Many tools and libraries are required to build Tux Paint. The package management system "<code>pacman</code>" helps you install them automatically solving complicated dependencies.          </p>

          <p>
            Download the latest MSYS2 environment from <a href="https://sourceforge.net/projects/msys2/files/Base/">https://sourceforge.net/projects/msys2/files/Base/</a> and install it where you'd like (the default is "<code>C:\msys64</code>")          </p>
          <p>
            Open the MSYS2 shell from the "Start Menu" -&gt; "MSYS2 64bit" -&gt; "MSYS2 MSYS" and execute following command (press <b><code>[Intro]</code></b> or <b><code>[Retorno]</code></b> to accept the defaults for all questions):
            <blockquote>
              <code>
                pacman -Syu
              </code>
            </blockquote>
          </p>

          <p>
            This will update core system and the window will close automatically.  Repeat the steps above one more time to finish the remaining update process.          </p>

          <p>
            Within the MSYS2 shell, run the following command to install basic development tools:            <blockquote>
              <code>
                pacman -S make automake-wrapper autoconf-wrapper libtool git zip patch gperf
              </code>
            </blockquote>
          </p>

          <p>
            <i>
              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>

                      <hr size="1" noshade width="75%" />
            <section class="indent"><!-- H4: MinGW...compiler and tools -->
              <header>
                <h4>
                  <a name="64bit" id="64bit">
                    MinGW 64bit (x86_64) compiler and tools                  </a>
                </h4>
              </header>

              <p>
                Within the MSYS2 shell, run the following command to install 64bit compiler and basic development tools:                <blockquote>
                  <code>
                    pacman -S mingw-w64-x86_64-{gcc,pkgconf,ntldd-git}
                  </code>
                </blockquote>
              </p>
              <p>
                "<code>ntldd</code>" is a small tool which examine windows executable files to list Dynamic Link Library (<code>.dll</code>) files they depends on. Tux Paint's packaging process for binary distribution uses it to find required <code>.dll</code> files.              </p>
            </section><!-- H4: MinGW...toolchains -->

            <section class="indent"><!-- H4: ...dependency libraries for Tux Paint -->
              <header>
                <h4>
                  64bit (x86_64) dependency libraries for Tux Paint and Tux Paint Config                </h4>
              </header>

              <p>
                You can install tools and libraries required for compiling Tux Paint and Tux Paint Config on MSYS2/MINGW using "<code>pacman</code>" except for SDL_mixer, SDL_Pango and libunibreak.              </p>
              <p>
                FLTK is a cross-platform GUI toolkit used by "Tux Paint Config". You can skip installing it if you are <em>only</em> building "Tux Paint".              </p>
              <p>
                <blockquote>
                  <code>
                    $ pacman -S mingw-w64-x86_64-SDL_{image,ttf,gfx}<br/>
                    $ pacman -S mingw-w64-x86_64-libvorbis<br/>
                    $ pacman -S mingw-w64-x86_64-librsvg<br/>
                    $ pacman -S mingw-w64-x86_64-fribidi<br/>
                    $ pacman -S mingw-w64-x86_64-libimagequant<br/>
                    $ pacman -S mingw-w64-x86_64-fltk<br/>
                  </code>
                </blockquote>
              </p>
              <p class="note">
                <span title="Information">&#128161;</span>                <strong>Note:</strong> Close the shell before proceeding to the remaining process.              </p>
            </section><!-- H4: ...dependency libraries for Tux Paint -->

            <section class="indent"><!-- H4: Install SDL_Pango... -->
              <header>
                <h4>
                  Install SDL_mixer, SDL_Pango and libunibreak on the 64bit environment                </h4>
              </header>

              <p>
                SDL_mixer, SDL_Pango and libunibreak should be installed manually.              </p>
              <p>
                This time, use the MinGW "64bit" shell. Open the shell from the "Start Menu" -&gt; "MSYS2 64bit" -&gt; "MSYS2 MinGW 64-bit"              </p>

              <section class="indent"><!-- H5: SDL_mixer -->
                <header>
                  <h5>SDL_mixer</h5>
                </header>

                <p>
                  Download <a href="https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.12.tar.gz">source tar-ball of SDL_mixer-1.2.12</a> from <a href="https://www.libsdl.org/projects/SDL_mixer/">SDL_mixer's page</a>.                </p>
                <p>
                  Build and install SDL_mixer as follows.                  <blockquote>
                    <code>
                      $ tar zxvf SDL_mixer-1.2.12.tar.gz<br/>
                      $ cd SDL_mixer-1.2.12/<br/>
                      $ ./configure --prefix=/mingw64  &amp;&amp; make &amp;&amp; make install
                    </code>
                  </blockquote>
                </p>
              </section><!-- H5: SDL_mixer -->

              <section class="indent"><!-- H5: SDL_Pango -->
                <header>
                  <h5>SDL_Pango</h5>
                </header>

                <p>
                  At first, you have to prepare source tar-ball and a required patch in the same directory.                  <ul>
                    <li>
                      Download <a href="https://sourceforge.net/projects/sdlpango/files/SDL_Pango/0.1.2/SDL_Pango-0.1.2.tar.gz/download">source tar-ball of SDL_Pango-0.1.2</a> from <a href="https://sourceforge.net/projects/sdlpango/">SDL_Pango's page on Sourceforge.net</a>.                    </li>
                    <li>
                      Download <a href="http://johnnypops.co.uk/tuxpaint/SDL_Pango-configure-extra-api.patch">a patch file</a> from <a href="http://www.johnnypops.co.uk/tuxpaint/">John Popplewell's "Tux Paint - MinGW/MSYS build instructions" webpage</a>.                      (This adds some extra (required) functionality to SDL_Pango.)                    </li>
                  </ul>
                </p>
                <p>
                  Build and install SDL_Pango as follows.                  <blockquote>
                    <code>
                      $ tar zxvf SDL_Pango-0.1.2.tar.gz<br/>
                      $ cd SDL_Pango-0.1.2/<br/>
                      $ patch -p0 &lt; ../SDL_Pango-configure-extra-api.patch<br/>
                      $ ./configure --prefix=/mingw64  &amp;&amp; make &amp;&amp; make install
                    </code>
                  </blockquote>
                </p>
              </section><!-- H5: SDL_Pango -->

              <section class="indent"><!-- H5: libunibreak -->
                <header>
                  <h5>libunibreak</h5>
                </header>

                <p>
                  libunibreak is required for compiling Tux Paint Config. You can skip installing it if you are <em>only</em> building "Tux Paint".                </p>
                <p>
                  You can fetch the source code from the git repositry and compile it as follows.                  <blockquote>
                    <code>
                      $ git clone https://github.com/adah1972/libunibreak libunibreak<br/>
                      $ cd libunibreak<br/>
                      $ ./augogen.sh --prefix=/mingw64  &amp;&amp; make &amp;&amp; make install
                    </code>
                  </blockquote>
                </p>
              </section><!-- H5: libunibreak -->

                              <p>
                  <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>
                
            </section><!-- H4: Install SDL_Pango... -->

                        <hr size="1" noshade width="75%" />
            <section class="indent"><!-- H4: MinGW...compiler and tools -->
              <header>
                <h4>
                  <a name="32bit" id="32bit">
                    MinGW 32bit (i686) compiler and tools                  </a>
                </h4>
              </header>

              <p>
                Within the MSYS2 shell, run the following command to install 32bit compiler and basic development tools:                <blockquote>
                  <code>
                    pacman -S mingw-w64-i686-{gcc,pkgconf,ntldd-git}
                  </code>
                </blockquote>
              </p>
              <p>
                "<code>ntldd</code>" is a small tool which examine windows executable files to list Dynamic Link Library (<code>.dll</code>) files they depends on. Tux Paint's packaging process for binary distribution uses it to find required <code>.dll</code> files.              </p>
            </section><!-- H4: MinGW...toolchains -->

            <section class="indent"><!-- H4: ...dependency libraries for Tux Paint -->
              <header>
                <h4>
                  32bit (i686) dependency libraries for Tux Paint and Tux Paint Config                </h4>
              </header>

              <p>
                You can install tools and libraries required for compiling Tux Paint and Tux Paint Config on MSYS2/MINGW using "<code>pacman</code>" except for SDL_mixer, SDL_Pango and libunibreak.              </p>
              <p>
                FLTK is a cross-platform GUI toolkit used by "Tux Paint Config". You can skip installing it if you are <em>only</em> building "Tux Paint".              </p>
              <p>
                <blockquote>
                  <code>
                    $ pacman -S mingw-w64-i686-SDL_{image,ttf,gfx}<br/>
                    $ pacman -S mingw-w64-i686-libvorbis<br/>
                    $ pacman -S mingw-w64-i686-librsvg<br/>
                    $ pacman -S mingw-w64-i686-fribidi<br/>
                    $ pacman -S mingw-w64-i686-libimagequant<br/>
                    $ pacman -S mingw-w64-i686-fltk<br/>
                  </code>
                </blockquote>
              </p>
              <p class="note">
                <span title="Information">&#128161;</span>                <strong>Note:</strong> Close the shell before proceeding to the remaining process.              </p>
            </section><!-- H4: ...dependency libraries for Tux Paint -->

            <section class="indent"><!-- H4: Install SDL_Pango... -->
              <header>
                <h4>
                  Install SDL_mixer, SDL_Pango and libunibreak on the 32bit environment                </h4>
              </header>

              <p>
                SDL_mixer, SDL_Pango and libunibreak should be installed manually.              </p>
              <p>
                This time, use the MinGW "32bit" shell. Open the shell from the "Start Menu" -&gt; "MSYS2 64bit" -&gt; "MSYS2 MinGW 32-bit"              </p>

              <section class="indent"><!-- H5: SDL_mixer -->
                <header>
                  <h5>SDL_mixer</h5>
                </header>

                <p>
                  Download <a href="https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.12.tar.gz">source tar-ball of SDL_mixer-1.2.12</a> from <a href="https://www.libsdl.org/projects/SDL_mixer/">SDL_mixer's page</a>.                </p>
                <p>
                  Build and install SDL_mixer as follows.                  <blockquote>
                    <code>
                      $ tar zxvf SDL_mixer-1.2.12.tar.gz<br/>
                      $ cd SDL_mixer-1.2.12/<br/>
                      $ ./configure --prefix=/mingw32  &amp;&amp; make &amp;&amp; make install
                    </code>
                  </blockquote>
                </p>
              </section><!-- H5: SDL_mixer -->

              <section class="indent"><!-- H5: SDL_Pango -->
                <header>
                  <h5>SDL_Pango</h5>
                </header>

                <p>
                  At first, you have to prepare source tar-ball and a required patch in the same directory.                  <ul>
                    <li>
                      Download <a href="https://sourceforge.net/projects/sdlpango/files/SDL_Pango/0.1.2/SDL_Pango-0.1.2.tar.gz/download">source tar-ball of SDL_Pango-0.1.2</a> from <a href="https://sourceforge.net/projects/sdlpango/">SDL_Pango's page on Sourceforge.net</a>.                    </li>
                    <li>
                      Download <a href="http://johnnypops.co.uk/tuxpaint/SDL_Pango-configure-extra-api.patch">a patch file</a> from <a href="http://www.johnnypops.co.uk/tuxpaint/">John Popplewell's "Tux Paint - MinGW/MSYS build instructions" webpage</a>.                      (This adds some extra (required) functionality to SDL_Pango.)                    </li>
                  </ul>
                </p>
                <p>
                  Build and install SDL_Pango as follows.                  <blockquote>
                    <code>
                      $ tar zxvf SDL_Pango-0.1.2.tar.gz<br/>
                      $ cd SDL_Pango-0.1.2/<br/>
                      $ patch -p0 &lt; ../SDL_Pango-configure-extra-api.patch<br/>
                      $ ./configure --prefix=/mingw32  &amp;&amp; make &amp;&amp; make install
                    </code>
                  </blockquote>
                </p>
              </section><!-- H5: SDL_Pango -->

              <section class="indent"><!-- H5: libunibreak -->
                <header>
                  <h5>libunibreak</h5>
                </header>

                <p>
                  libunibreak is required for compiling Tux Paint Config. You can skip installing it if you are <em>only</em> building "Tux Paint".                </p>
                <p>
                  You can fetch the source code from the git repositry and compile it as follows.                  <blockquote>
                    <code>
                      $ git clone https://github.com/adah1972/libunibreak libunibreak<br/>
                      $ cd libunibreak<br/>
                      $ ./augogen.sh --prefix=/mingw32  &amp;&amp; make &amp;&amp; make install
                    </code>
                  </blockquote>
                </p>
              </section><!-- H5: libunibreak -->

              
            </section><!-- H4: Install SDL_Pango... -->

                    </section><!-- H3: Compiling Set-Up -->

        <section class="indent"><!-- H3: ImageMagick -->
          <header>
            <h3>
              <a name="imagemagick" id="imagemagick">ImageMagick</a>
            </h3>
          </header>

          <p>
            <a href="https://imagemagick.org">ImageMagick</a> is a compilation of command line tools to create, edit, compose, or convert bitmap images supporting quite a large number of image formats. Tux Paint uses two functions ("convert" and "composite") in it to generate thumbnails for startar images and templates during the build process.          </p>
          <p>
            Using official binary release available from "<a href="https://imagemagick.org/script/download.php#windowsand">Windows Binary Release</a>" is recommended, due to the commands installed with "<code>pacman</code>" on MinGW/MSYS not working as expected!          </p>
          <p>
            Do not forget to enable "Install legacy utilities (e.g. convert)" while installing it, because Tux Paint's build process uses them.          </p>
          <p>
            Add the path to the directory in which ImageMagick is installed at the top of your "PATH" environment variable. For example:            <blockquote>
              <code>
                $ export PATH=/c/Program\ Files/ImageMagick-7.0.10-Q16-HDRI:$PATH
              </code>
            </blockquote>
          </p>
          <p>
            You can make this permanent by adding the above to your the BASH shell configuration file, "<code>~/.bash_profile</code>".          </p>
        </section><!-- H3: ImageMagick -->

        <section class="indent"><!-- H3: Tux Paint -->
          <header>
            <h3>Tux Paint</h3>
          </header>

          <p>
            You can compile 64bit binaries using MSYS2 64bit shell, and 32bit binaries using MSYS2 32bit shell, respectively.          </p>
          <ul>
            <li>
              Select "MSYS2 64bit" -&gt; "MSYS2 MinGW 64-bit" from the "Start Menu" to open the 64bit shell.            </li>
            <li>
              Select "MSYS2 64bit" -&gt; "MSYS2 MinGW 32-bit" from the "Start Menu" to open the 32bit shell.            </li>
          </ul>
          <p>
            Compile Tux Paint with the following command:            <blockquote>
              <code>
                $ make bdist-win32
              </code>
            </blockquote>
          </p>
          <p class="note">
            <span title="Information">&#128161;</span>            <strong>Note:</strong> At this point, you will want to build "Tux Paint Config." for Windows, so it can be included along with "Tux Paint", if you're making an official (or test) release.  The build process will look for it in a directory named "<code>tuxpaint-config</code>" (with no version number, e.g., "<code>tuxpaint-config-X.Y.Z</code>"). See "Tux Paint Config."'s INSTALL.txt documentation for details.          </p>
          <p>
            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>
        </section><!-- H3: Tux Paint -->

        <section class="indent"><!-- H3: Building the Tux Paint Windows Installer -->
          <header>
            <h3>
              Building the Tux Paint Windows Installer            </h3>
          </header>

          <p>
            <a href="https://jrsoftware.org/isinfo.php">Inno Setup</a> is used to build executable installer for Tux Paint. Therefore you have to install it in the first place.          </p>
          <p>
            Inno Setup officially supports translations for only about 20 languages. However, one of the great points of Tux Paint is it supports so many languages. Therefore, the set up script "<code>tuxpaint.iss</code>" to build the installer is written to use much more translations including unofficial one which are available on "<a href="https://jrsoftware.org/files/istrans/">Inno Setup Translations</a>". You have to download translation files (<code>.isl</code>) required and put them in "Languages" directory under the directory in which Inno Setup is installed.          </p>
          <p>
            Before building an installer, edit the "<code>tuxpaint.iss</code>" file and enable one of the lines starting with "<code>#define BuildTarget=</code>", depending on the architecture of the installer you want to create.          </p>
          <p>
            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>-windows-&lt;arch&gt;-installer.exe</code>" file in the same directory.          </p>
        </section><!-- H3: Building the Tux Paint Windows Installer -->

        <section class="indent"><!-- H3: Running the Tux Paint Windows Installer -->
          <header>
            <h3>
              Running the Tux Paint Windows Installer            </h3>
          </header>

          <p>
            Faga dobre clic no executábel do instalador de Tux Paint (ficheiro .EXE) e siga as instrucións.          </p>

          <p>
            First, you will be asked to read the license. (It is the GNU General Public License (GPL), which is also available as "COPYING.txt".)          </p>

          <p>
            Após preguntaráselle se quere instalar accesos directos a Tux Paint no seu menú de inicio de Windows e no escritorio de Windows. (Ámbalas dúas opcións están definidas de xeito predeterminado.)          </p>

          <p>
            A seguir preguntaráselle onde quere instalar Tux Paint. O valor predeterminado debería ser axeitado, sempre que haxa espazo dispoñíbel. Se non, escolla un lugar diferente.          </p>

          <p>
            Neste punto, pode premer en «Instalar» para instalar Tux Paint.          </p>
        </section><!-- H3: Running the Tux Paint Windows Installer -->

        <section class="indent"><!-- H3: Changing the Settings Using the Shortcut -->
          <header>
            <h3>
              Changing the Settings Using the Shortcut            </h3>
          </header>

          <p>
            Para cambiar os axustes do programa, prema co botón dereito no atallo de TuxPaint e seleccione «Propiedades» (na parte inferior).          </p>

          <p>
            Asegúrese de que a lapela «Atallo» está seleccionada na xanela que aparece e examine o campo «Obxectivo:». Debería ver algo así:          </p>

          <blockquote>
            <code>
              "C:\Program Files\TuxPaint\TuxPaint.exe"
            </code>
          </blockquote>

          <p>
            Agora pode engadir opcións de liña de ordes que se activarán ao facer dobre clic na icona.          </p>

          <p>
            Por exemplo, para que o xogo se execute en modo de pantalla completa, con formas sinxelas (sen opción de rotación) e en francés, engada as opcións (após «TuxPaint.exe»), así:          </p>

          <blockquote>
            <code>
              "C:\Program Files\TuxPaint\TuxPaint.exe" -f -s --lang french
            </code>
          </blockquote>

          <p>
            (Vexa a documentación principal para obter unha lista completa das opcións dispoñíbeis da liña de ordes.)          </p>

          <p>
            Se se trabuca ou desaparece todo, use <b><code>[Control]</code></b> + <b><code>[Z]</code></b> para desfacer ou só prema a tecla <b><code>[Esc]</code></b> e a caixa pecharase sen facer cambios (a non ser que premera o botón «Aplicar»).          </p>

          <p>
            Cando teña rematado, prema en «Aceptar».          </p>
        </section><!-- H3: Changing the Settings Using the Shortcut -->

        <section class="indent"><!-- H3: If Something Goes Wrong -->
          <header>
            <h3>
              If Something Goes Wrong            </h3>
          </header>

          <p>
            Se ao facer dobre clic no atallo para executar Tux Paint, non ocorre nada, probabelmente sexa porque algunhas destas opcións da liña de ordes son incorrectas. Abra un explorador de ficheiros coma antes e busque un ficheiro chamado «<code>stderr.txt</code>» no cartafol TuxPaint.          </p>

          <p>
            Conterá unha descrición do que estaba mal. Normalmente só se debe a maiúsculas e minúsculas incorrectas (maiúsculas «Z» no canto de minúsculas «z») ou a falta (ou exceso) de «-» (guións).          </p>
        </section><!-- H3: If Something Goes Wrong -->
      </section><!-- H2: Windows -->

      <section class="indent"><!-- H2: Linux/Unux -->
        <header>
          <h2>
            <a name="compiling-linux" id="compiling-linux">
              Linux/Unix            </a>
          </h2>
        </header>

        <section class="indent"><!-- H3: Compiling -->
          <header>
            <h3>
              Compilación:            </h3>
          </header>

          <p class="note">
            <span title="Information">&#128161;</span>            <strong>Note:</strong> Tux Paint does not use <code>autoconf</code>/<code>automake</code>, so there is no "<code>./configure</code>" script to run.  Compiling should be straight-forward though, assuming everything Tux Paint needs is installed.          </p>

          <p>
            Para compilar o programa dende o código fonte, simplemente execute a seguinte orde dende un indicador do sistema (p. ex.: «$»):          </p>

          <blockquote>
            <code>
              $ make
            </code>
          </blockquote>
        </section><!-- H3: Compiling -->

        <section class="indent"><!-- H3: Disabling SVG support... -->
          <header>
            <h3>
              Desactivar a compatibilidade de «SVG» (e, polo tanto, as dependencias de «Cairo, libSVG, e svg-cairo»:            </h3>
          </header>

          <p>
            Para desactivar a compatibilidade con SVG (por exemplo, se o seu sistema non é compatíbel coa biblioteca de Cairo ou outras dependencias relacionadas co SVG), pode executar «<code>make</code>» engadindo «<code style="white-space: nowrap;">SVG_LIB= SVG_CFLAGS= NOSVGFLAG=NOSVG</code>»:
          <blockquote>
            <code>
              $ make SVG_LIB= SVG_CFLAGS=
            </code>
          </blockquote>
        </section><!-- H3: Disabling SVG support... -->

        <section class="indent"><!-- H3: Disabling Pango support... -->
          <header>
            <h3>
              Desactivar a compatibilidade de «Pango» (e, polo tanto, as dependencias de «Pango, Cairo, etc.»:            </h3>
          </header>

          <p class="note">
            <span title="Version variation">&#128220;</span>            Antes da versión 0.9.18, Tux Paint utilizaba a biblioteca <code>libSDL_ttf</code> para renderizar texto usando tipos de letra TrueType. Dende o 0.9.18 úsase <code>libSDL_Pango</code>, xa que ten unha mellor compatibilidade coa internacionalización. Non obstante, se quere desactivar o uso de SDL_Pango, pode facelo executando «<code>make</code>» engadindo «<code>SDL_PANGO_LIB=</code>»:          </p>
          <blockquote>
            <code>
              $ make SDL_PANGO_LIB=
            </code>
          </blockquote>
        </section><!-- H3: Disabling Pango support... -->

        <section class="indent"><!-- H3: Disabling Sound at Compile-time -->
          <header>
            <h3>
              Disabling Sound at Compile-time            </h3>
          </header>

          <p>
            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>
          <blockquote>
            <code>
              $ make SDL_MIXER_LIB=
            </code>
          </blockquote>
        </section><!-- H3: Disabling Sound at Compile-time -->

        <section class="indent"><!-- H3: Other options -->
          <header>
            <h3>
              Other options            </h3>
          </header>

          <p>
            Outras opcións (p. ex.: rutas de instalación) poden ser anuladas; véxaas en «<code>Makefile</code>» para máis detalles.          </p>
        </section><!-- H3: Other options -->

        <section class="indent"><!-- H3: If you get errors -->
          <header>
            <h3>
              If you get errors            </h3>
          </header>

          <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>
        </section><!-- H3: If you get errors -->

        <section class="indent"><!-- H3: Installing -->
          <header>
            <h3>
              Installng            </h3>
          </header>

          <p>
            Supoñendo que non se produciron erros graves, agora pode instalar o programa para que os usuarios do sistema poidan executalo. De xeito predeterminado, isto debe facelo o usuario «root» («superusuario»). Cambie a «root» escribindo a orde:          </p>

          <blockquote>
            <code>
              $ su
            </code>
          </blockquote>

          <p>
            Introduza o contrasinal de «root» no indicador do sistema. Agora debería ser «root» (cun indicador como «#»). Para instalar o programa e os seus ficheiros de datos, escriba:          </p>

          <blockquote>
            <code>
              # make install
            </code>
          </blockquote>

          <p>
            Finalmente, pode volver ao seu usuario habitual saíndo do modo de superusuario:          </p>

          <blockquote>
            <code>
              # exit
            </code>
          </blockquote>

          <p>
            Como alternativa, pode simplemente usar a orde «sudo» (po.ex.: en Ubuntu Linux):          </p>

          <blockquote>
            <code>
              $ sudo make install
            </code>
          </blockquote>

          <p class="note">
            <span title="Information">&#128161;</span>            <strong>Note:</strong> By default, "<code>tuxpaint</code>", the executable program, is placed in "<code>/usr/local/bin/</code>".  The data files (images, sounds, etc.) are placed in "<code>/usr/local/share/tuxpaint/</code>".          </p>

          <section class="indent"><!-- H4: Changing Where Things Go -->
            <header>
              <h4>
                Cambiar onde van as cousas              </h4>
            </header>

            <p>
              Pode cambiar onde irán as cousas axustando as variábeis de «<code>Makefile</code>» na liña de ordes. «<code>DESTDIR</code>» úsase para colocar a saída nunha área de espera para a creación de paquetes. «<code>PREFIX</code>» é a base de onde van todos os demais ficheiros e, de xeito predeterminado, está estabelecido en «<code>/usr/local</code>».            </p>

            <p>
              Outras variábeis son:            </p>
            <dl>
              <dt><code>BIN_PREFIX</code></dt>
              <dd>
                Onde se instalará o binario «<code>tuxpaint</code>». (Estabelécese como «<code>$(PREFIX)/bin</code>»como predeterminado, p. ex.: «<code>/usr/local/bin</code>»)              </dd>

              <dt><code>DATA_PREFIX</code></dt>
              <dd>
                Onde irán os ficheiros de datos (son, gráficos, pinceis, selos, tipos de letra) e onde os buscará Tux Paint cando se execute. (Estabelecer en «<code>$(PREFIX)/share/tuxpaint</code>»)              </dd>

              <dt><code>DOC_PREFIX</code></dt>
              <dd>
                Onde irán os ficheiros de texto da documentación (o directorio «<code>docs</code>»). (Estabelecer como «<code>$(PREFIX)/share/doc/tuxpaint</code>»)              </dd>

              <dt><code>MAN_PREFIX</code></dt>
              <dd>
                Onde irá a páxina do manual de Tux Paint. (Estabelecer como «<code>$(PREFIX)/share/man</code>»)              </dd>

              <dt><code>ICON_PREFIX</code> &mdash; <code>$(PREFIX)/share/pixmaps</code></dt>
              <dt><code>X11_ICON_PREFIX</code>  &mdash; <code>$(PREFIX)/X11R6/include/X11/pixmaps</code></dt>
              <dt><code>GNOME_PREFIX</code>  &mdash; <code>$(PREFIX)/share/gnome/apps/Graphics</code></dt>
              <dt><code>KDE_PREFIX</code>  &mdash; <code>$(PREFIX)/share/applnk/Graphics</code></dt>
              <dd>
                Onde irán as iconas e os lanzadores (para GNOME e KDE).              </dd>

              <dt><code>LOCALE_PREFIX</code></dt>
              <dd>
                Onde irán os ficheiros de tradución para Tux Paint e onde os buscará Tux Paint. (Estabelécese en «<code>$(PREFIX)/share/locale/</code>») (A localización final dun ficheiro de tradución estará no directorio da configuración local (por exemplo, «<code>es</code>» para o español), dentro do subdirectorio «<code>LC_MESSAGES</code>»).              </dd>
            </dl>

            <p class="note">
              <span title="Information">&#128161;</span>              <strong>Note:</strong> This list is out of date.  See "<code>Makefile</code>" and "<code>Makefile-i18n</code>" for a complete list.            </p>
          </section class="indent"><!-- H4: Changing Where Things Go -->
        </section><!-- H3: Installing -->
      </section><!-- H2: Linux/Unux -->

      <section class="indent"><!-- H2: macOS -->
        <header>
          <h2>
            <a name="compiling-macos" id="compiling-macos">
              macOS            </a>
          </h2>
          <p style="font-size: small;">
            <em>
              20 de Xaneiro de 2022              Mark Kim &lt;<a href="mailto:markuskimius@gmail.com">markuskimius@gmail.com</a>&gt;
            </em>
          </p>
        </header>

        <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>

        <section class="indent"><!-- H3: Prerequisites -->
          <header>
            <h3>
              Prerequisites            </h3>
          </header>

          <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>libsdl_gfx</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>

          <section class="indent"><!-- H4: libimagequant -->
            <header>
              <h4>
                libimagequant
              </h4>
            </header>

            <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>
                  $ sudo port install rust cargo<br/>
                  $ git clone https://github.com/ImageOptim/libimagequant.git<br/>
                  $ cd libimagequant/imagequant-sys<br/>
                  $ cargo build --release       # Must use cargo from MacPorts<br/>
                  $ sudo make PREFIX=/opt/local install
                </code>
              </blockquote>
            </p>
          </section><!-- H4: libimagequant -->

          <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>
        </section><!-- H3: Prerequisites -->

        <section class="indent"><!-- H3: How to Build -->
          <header>
            <h3>
              How to Build            </h3>
          </header>

          <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>.            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>
        </section><!-- H3: How to Build -->

        <section class="indent"><!-- H3: Known Issues -->
          <header>
            <h3>
              Known Issues            </h3>
          </header>

          <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.<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>
        </section><!-- H3: Known Issues -->

        <section class="indent"><!-- H3: Old Versions of macOS -->
          <header>
            <h3>
              Old Versions of macOS            </h3>
          </header>

          <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 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>

          <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>
            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 style="white-space: nowrap;">xcode-select --install</code>") but otherwise build Tux Paint using the same steps described in the earlier part of this document.          </p>
        </section><!-- H3: Old Versions of macOS -->

        <section class="indent"><!-- H3: Recompiling MacPorts -->
          <header>
            <h3>
              Recompiling MacPorts            </h3>
          </header>

          <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>
        </section><!-- H3: Recompiling MacPorts -->

        <section class="indent"><!-- H3: Building for Apple Silicon -->
          <header>
            <h3>
              Building for Apple Silicon            </h3>
          </header>

          <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 <a href="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">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</a>.          </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>
        </section><!-- H3: Building for Apple Silicon -->

        <section class="indent"><!-- H3: Building a Universal Binary -->
          <header>
            <h3>
              Building a Universal Binary            </h3>
          </header>

          <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>
        </section><!-- H3: Building a Universal Binary -->

      </section><!-- H2: macOS -->

    </section><!-- H1: Compiling and Installation -->

    <section class="outer indent"><!-- H1: Debugging -->
      <header>
        <h1>
          <a name="debugging" id="debugging">
            Debugging          </a>
        </h1>
      </header>

      <p class="note">
        <span title="Configuration option">&#9881;</span>          Debugging output &mdash; to "STDOUT" on Linux and Unix, to a "<code>stdout.txt</code>" file on Windows, and to the file "<code>/tmp/tuxpaint.log</code>" on macOS &mdash; can be enabled by setting "<code>DEBUG</code>" (and, if verbose logging is wanted, "<code>VERBOSE</code>") <code>#define</code>s in "<code>src/debug.h</code>" and (re)compiling Tux Paint.      </p>
    </section><!-- H1: Debugging -->

    <section class="outer indent"><!-- H1: Uninstalling Tux Paint -->
      <header>
        <h1>
          <a name="uninstalling" id="uninstalling">
            Uninstalling Tux Paint          </a>
        </h1>
      </header>

      <section class="indent"><!-- H2: Windows -->
        <header>
          <h2>
            <a name="uninstalling-windows" id="uninstalling-windows">
              Windows            </a>
          </h2>
        </header>

        <section class="indent"><!-- H3: Using the Uninstaller -->
          <header>
            <h3>
              Uso do desinstalador            </h3>
          </header>

          <p>
            Se instalou os atallos do menú Inicio (o predeterminado), vaia ao cartafol TuxPaint e seleccione «Desinstalar». Amosarase unha caixa que confirmará que está a piques de desinstalar Tux Paint e, se está seguro de que quere eliminar permanentemente Tux Paint, prema no botón «Desinstalar».          </p>

          <p>
            Cando remate, prema no botón pechar.          </p>
        </section><!-- H3: Using the Uninstaller -->

        <section class="indent"><!-- H3: Using the Control Panel -->
          <header>
            <h3>
              Usar o Panel de control            </h3>
          </header>

          <p>
            Tamén é posíbel usar a entrada «TuxPaint (só eliminar)« na sección Engadir/Eliminar programas do Panel de control.          </p>
        </section><!-- H3: Using the Control Panel -->
      </section><!-- H2: Windows -->

      <section class="indent"><!-- H2: macOS -->
        <header>
          <h2>
            <a name="uninstalling-macos" id="uninstalling-macos">
              macOS            </a>
          </h2>
        </header>

        <p>
          Delete "<code>TuxPaint.app</code>" from the "Applications" folder. Data files, including the configuration files, stamps, and saved pictures, may be found in "<code style="white-space: nowrap;">Library/Application Support/TuxPaint</code>" (all users) and "<code style="white-space: nowrap;">/Users/<i>USERNAME</i>/Library/Application Support/TuxPaint</code>" (individual users).        </p>
      </section><!-- H2: macOS -->

      <section class="indent"><!-- H2: Linux -->
        <header>
          <h2>
            <a name="uninstalling-linux" id="uninstalling-linux">
              Linux            </a>
          </h2>
        </header>

        <p>
          Within the Tux Paint source directory (where you compiled Tux Paint), you can use the "<code style="white-space: nowrap;">make uninstall</code>" target to uninstall Tux Paint. By default, this must be done by the "root" user ('superuser'), but if you installed Tux Paint somewhere else (e.g., using a "<code>PREFIX=...</code>" setting to "<code>make</code>" and "<code style="white-space: nowrap;">make install</code>"), you may not, and will want to provide those same settings here. (See the <a href="#compiling-linux">installation instructions above</a> for further information.)        </p>
      </section><!-- H2: Linux -->
    </section><!-- H1: Uninstalling Tux Paint -->
  </body>
</html>