doc: macosx instructions

Jean-Francois Dockes Jean-Francois Dockes 2017-11-01

changed doc/Makefile
copied doc/install.html -> doc/building.html
copied doc/install.txt -> doc/building.txt
doc/Makefile Diff Switch to side-by-side view
Loading...
doc/install.html to doc/building.html
--- a/doc/install.html
+++ b/doc/building.html
@@ -4,7 +4,7 @@
 <head>
 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
 <meta name="generator" content="AsciiDoc 8.6.9" />
-<title></title>
+<title>Building and installing Upplay</title>
 <style type="text/css">
 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
 
@@ -733,10 +733,11 @@
 </head>
 <body class="article">
 <div id="header">
+<h1>Building and installing Upplay</h1>
 </div>
 <div id="content">
 <div class="sect1">
-<h2 id="_building_and_installing_upplay">Building and installing Upplay</h2>
+<h2 id="_building_on_linux">Building on Linux</h2>
 <div class="sectionbody">
 <div class="sect2">
 <h3 id="_prerequisites">Prerequisites</h3>
@@ -767,8 +768,7 @@
 </li>
 </ul></div>
 <div class="paragraph"><p>You need to download the release tar files for
-<a href="http://www.lesbonscomptes.com/upmpdcli/downloads.html">libupnpp</a> and
-<a href="downloads.html">upplay</a>, or clone the git repositories:
+<a href="downloads.html">libupnpp and upplay</a>, or clone the git repositories:
 <a href="https://opensourceprojects.eu/p/libupnpp">libupnpp</a>,
 <a href="https://opensourceprojects.eu/p/upplay">upplay</a>.</p></div>
 </div>
@@ -802,12 +802,64 @@
 </div>
 </div>
 </div>
+<div class="sect1">
+<h2 id="_building_on_mac_os_x">Building on Mac OS X</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Thanks to <a href="https://github.com/distler">Jacques Distler</a> for providing
+the procedure:</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">for libupnpp versions 0.16.0 and earlier and upplay versions 1.2.11
+and earlier, you will need to unset libupnpp_la_LDFLAGS in the <em>Makefile</em>
+before building libupnpp, and add -lupnp to LINK in the upplay
+<em>Makefile</em>. These should be fixed in later versions.</td>
+</tr></table>
+</div>
+<div class="paragraph"><p>1) Install QT. Example with <a href="http://www.finkproject.org/">Fink</a> as a package
+   manager. To install the relevant QT components:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><code>fink install qt5-mac-qtbase qt5-mac-qtbase-dev-tools qt5-mac-qtwebkit qt5-mac-qtscript</code></pre>
+</div></div>
+<div class="paragraph"><p>It should be possible to do something similar with MacPorts.</p></div>
+<div class="paragraph"><p>2) Install libupnp. Extract the
+   <a href="https://sourceforge.net/projects/pupnp/">source code</a>, then:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><code>./configure
+make
+sudo make install</code></pre>
+</div></div>
+<div class="paragraph"><p>3) Install libupnpp. Extract the
+   <a href="https://www.lesbonscomptes.com/upplay/downloads.html">source
+   code</a>, then:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><code>CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib \
+upnp_CFLAGS=-I/usr/local/include upnp_LIBS=-L/usr/local/lib \
+./configure --libdir=/usr/local/lib --includedir=/usr/local/include
+make
+sudo make install</code></pre>
+</div></div>
+<div class="paragraph"><p>4) Install Upplay. Extract the
+   <a href="http://www.lesbonscomptes.com/upplay/downloads.html">source code</a>, then:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><code>/sw/lib/qt5-mac/bin/qmake PREFIX=/usr/local
+make
+sudo make install</code></pre>
+</div></div>
+</div>
+</div>
 </div>
 <div id="footnotes"><hr /></div>
 <div id="footer">
 <div id="footer-text">
 Last updated
- 2017-09-20 12:54:19 CEST
+ 2017-11-01 09:49:06 CET
 </div>
 </div>
 </body>
doc/install.txt to doc/building.txt
--- a/doc/install.txt
+++ b/doc/building.txt
@@ -1,5 +1,6 @@
-== Building and installing Upplay
+= Building and installing Upplay
 
+== Building on Linux
 === Prerequisites
 
 You will need:
@@ -13,8 +14,7 @@
   libtool). 
 
 You need to download the release tar files for
-http://www.lesbonscomptes.com/upmpdcli/downloads.html[libupnpp] and
-link:downloads.html[upplay], or clone the git repositories:
+link:downloads.html[libupnpp and upplay], or clone the git repositories:
 https://opensourceprojects.eu/p/libupnpp[libupnpp],
 https://opensourceprojects.eu/p/upplay[upplay].
 
@@ -43,3 +43,44 @@
 the following command before the libupnpp 'configure':
   
     sh autogen.sh
+
+== Building on Mac OS X
+
+Thanks to link:https://github.com/distler[Jacques Distler] for providing
+the procedure: 
+
+NOTE: for libupnpp versions 0.16.0 and earlier and upplay versions 1.2.11
+and earlier, you will need to unset libupnpp_la_LDFLAGS in the 'Makefile'
+before building libupnpp, and add -lupnp to LINK in the upplay
+'Makefile'. These should be fixed in later versions.
+
+1) Install QT. Example with link:http://www.finkproject.org/[Fink] as a package
+   manager. To install the relevant QT components:
+
+       fink install qt5-mac-qtbase qt5-mac-qtbase-dev-tools qt5-mac-qtwebkit qt5-mac-qtscript
+
+It should be possible to do something similar with MacPorts.
+
+2) Install libupnp. Extract the
+   link:https://sourceforge.net/projects/pupnp/[source code], then: 
+
+      ./configure
+      make
+      sudo make install
+
+3) Install libupnpp. Extract the
+   link:https://www.lesbonscomptes.com/upplay/downloads.html[source
+   code], then:
+
+     CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib \
+     upnp_CFLAGS=-I/usr/local/include upnp_LIBS=-L/usr/local/lib \
+     ./configure --libdir=/usr/local/lib --includedir=/usr/local/include
+     make
+     sudo make install
+
+4) Install Upplay. Extract the
+   link:http://www.lesbonscomptes.com/upplay/downloads.html[source code], then:
+
+     /sw/lib/qt5-mac/bin/qmake PREFIX=/usr/local
+     make
+     sudo make install