missing NULL terminator in set_config_x
[geda-gaf.git] / docs / wiki / geda-devmacosx.html
blob9f4e1297fe0502dabd9e461260664243a9a4de25
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html>
4 <head>
5 <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />
6 <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />
7 <link rel="stylesheet" media="print" type="text/css" href="./print.css" />
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10 </head>
11 <body>
13 <p>
14 <em>Translations of this page are also available in the following languages:</em> <a href="geda-devmacosx.ru.html" class="wikilink1" title="geda-devmacosx.ru.html">Русский</a>.
15 </p>
17 <p>
18 See also: <a href="http://jschneider.net/pcb-build.html" class="urlextern" title="http://jschneider.net/pcb-build.html" rel="nofollow">Building the pcb package on OS X</a> by Jon Schneider
19 </p>
21 <h2 class="sectionedit1" id="geda_on_the_mac">gEDA On The Mac</h2>
22 <div class="level2">
24 <p>
25 There are a number of options with running gEDA on the mac. You can install via the fink or macports package management or build from the source or some combination of the two. Both fink and macports will install software in a directory off the root or “sandbox” (fink /sw and macports /opt) so they don&#039;t co-mingle software with your native mac software. You can read more about the pros and cons of each online.
26 </p>
28 <p>
29 I have both fink and macports package managers installed and have been using macports lately. I added some code to my .bash_profile that lets me choose what package manager I want to use on shell startup by setting my path variable. I&#039;ve pasted it below.
30 </p>
32 <p>
33 Personally, I use macports to install dependencies and build and install geda from the source. This makes it easy for me to grab the latest code from the git repository.
34 </p>
35 <pre class="code">PS3=&quot;Which port?:&quot;
36 echo &quot;Choose from the list below.&quot;
37 select NAME in macports fink mac
39 break
40 done
41 echo &quot;Setting path to prefer $NAME.&quot;
42 case $NAME in
43 macports) export PATH=/opt/local/bin:${PATH} PS1=&quot;opt-\A-[\w]\$&quot; ;;
44 fink) test -r /sw/bin/init.sh &amp;&amp; . /sw/bin/init.sh PS1=&quot;sw-\A-[\w\\$&quot; ;;
45 *) PS1=&quot;osx-\A-[\w]\$&quot; ;;
46 esac
48 echo &quot;Path set to &quot; $PATH</pre>
50 </div>
51 <!-- EDIT1 SECTION "gEDA On The Mac" [214-1460] -->
52 <h2 class="sectionedit2" id="geda_via_fink">gEDA via Fink</h2>
53 <div class="level2">
55 <p>
56 You can link to instructions on installing gEDA via fink from the gEDA <a href="http://www.geda.seul.org/download.html" class="urlextern" title="http://www.geda.seul.org/download.html" rel="nofollow">download page</a> or go directly to <a href="http://www.ghz.cc/charles/fink/" class="urlextern" title="http://www.ghz.cc/charles/fink/" rel="nofollow">http://www.ghz.cc/charles/fink/</a>. Using fink, gEDA can be installed from binaries or compiled from a recent development snapshot, if the fink unstable branch is enabled. (Please see the Fink documentation on how to enable the unstable branch.)
57 </p>
59 <p>
60 Once Fink is installed, gEDA (and other programs) can be installed from the command line or through a graphical tool called <a href="http://finkcommander.sourceforge.net/" class="urlextern" title="http://finkcommander.sourceforge.net/" rel="nofollow">fink commander</a>.
61 From the command line, the principal gEDA suite programs can be installed with the command:
62 </p>
63 <pre class="code">fink install geda-bundle</pre>
65 </div>
66 <!-- EDIT2 SECTION "gEDA via Fink" [1461-2198] -->
67 <h2 class="sectionedit3" id="geda_via_macports">gEDA via macports</h2>
68 <div class="level2">
70 <p>
71 I am in the process of putting together a macports release of gEDA. You can download macports from <a href="http://www.macports.org/" class="urlextern" title="http://www.macports.org/" rel="nofollow">http://www.macports.org/</a>. I use macports with the <abbr title="Graphical User Interface">GUI</abbr> Porticus. You can download that from here <a href="http://porticus.alittledrop.com/" class="urlextern" title="http://porticus.alittledrop.com/" rel="nofollow">http://porticus.alittledrop.com/</a>.
72 </p>
74 <p>
75 Until the macports release is ready, you can use Porticus (or macports command line) to install these dependent projects, then download and compile the source from the gEDA download page.
76 </p>
77 <ul>
78 <li class="level1"><div class="li"> gettext</div>
79 </li>
80 <li class="level1"><div class="li"> guile</div>
81 </li>
82 <li class="level1"><div class="li"> gtk2</div>
83 </li>
84 <li class="level1"><div class="li"> groff</div>
85 </li>
86 </ul>
88 <p>
89 I&#039;ve also installed python25 and python_select. python_select let&#039;s you choose what version of python your mac will run as the default python.
90 </p>
92 <p>
93 As described here: <a href="geda-gaf_building_git_version.html#macports" class="wikilink1" title="geda-gaf_building_git_version.html">Building gEDA/gaf</a>, to run the software, you need to set an environment variable to allow Guile to load its shared libraries:
94 </p>
95 <pre class="code">$ export LTDL_LIBRARY_PATH=/opt/local/lib</pre>
97 </div>
98 <!-- EDIT3 SECTION "gEDA via macports" [2199-3088] -->
99 <h2 class="sectionedit4" id="building_the_project">Building The Project</h2>
100 <div class="level2">
103 Once you have the dependencies installed (either via fink or macports) just follow the instructions in the developer section for building and installing. I had no issues (there was an issue with strnlen function being used in gschem, which isn&#039;t part of the standard gcc libraries, but once that was fixed I was able to build and run with no problems). I have also setup an XCode project to debug gEDA code in. I will post that up to the site as soon as it&#039;s ready.
104 </p>
106 </div>
107 <!-- EDIT4 SECTION "Building The Project" [3089-3592] -->
108 <h2 class="sectionedit5" id="working_with_python">Working With Python</h2>
109 <div class="level2">
112 Currently I am working with myEclipse and the PyDev python plugin. You can download Eclipse <a href="http://www.eclipse.org/" class="urlextern" title="http://www.eclipse.org/" rel="nofollow">http://www.eclipse.org/</a> or myEclipse <a href="http://www.eclipse.org/" class="urlextern" title="http://www.eclipse.org/" rel="nofollow">http://www.eclipse.org/</a> which is Eclipse bundled with plugins and currently costs $31.75 per year for a subscription. You can download PyDev here <a href="http://pydev.sourceforge.net/" class="urlextern" title="http://pydev.sourceforge.net/" rel="nofollow">http://pydev.sourceforge.net/</a>. It seems to have an annoying popup unless you buy a license, but other than that it seems to work well in Eclipse for working with python code.
113 </p>
115 </div>
116 <!-- EDIT5 SECTION "Working With Python" [3593-4091] -->
117 <h2 class="sectionedit6" id="current_mac_issues">Current Mac Issues</h2>
118 <div class="level2">
119 <ul>
120 <li class="level1"><div class="li"> gEDA Manager does not currently run because it needs pyinotify which is based on Linux kernel infrastructure. If anyone knows a way to get gEDA Manager running on mac that is appreciated. Otherwise I plan on looking at a cross platform way to modify gEDA Manager.</div>
121 </li>
122 </ul>
124 </div>
125 <!-- EDIT6 SECTION "Current Mac Issues" [4092-4396] -->
126 <h2 class="sectionedit7" id="geda_via_virtualbox">gEDA via VirtualBox</h2>
127 <div class="level2">
130 An alternative method to run gEDA programs on the Mac is to install them under Linux in an virtualization environment. <a href="http://www.virtualbox.org/" class="urlextern" title="http://www.virtualbox.org/" rel="nofollow">VirtualBox</a> is a professional-grade x86 virtualization program that is available under the <abbr title="GNU General Public License">GPL</abbr>. After installing this program, you can download and install a linux distribution within that environment. This method has the advantage of using precompiled linux-oriented binaries, and installatoin - even accounting for for downloading and installing the guest <abbr title="Operating System">OS</abbr> - can be <em>very fast</em> compared to compiling and building the gEDA suite in Fink.
131 </p>
134 The gEDA suite programs have been tested and appear to work properly under Ubuntu running within VirtualBox on the Mac. After downloading and installing VirtualBox, download <a href="http://www.ubuntu.com/getubuntu" class="urlextern" title="http://www.ubuntu.com/getubuntu" rel="nofollow">Ubuntu</a> and launch its installer, following the VirtualBox instructions. Once Ubuntu is installed, you can install gEDA following (simplified, standard) procedures for installing gEDA under linux. From the command line,
135 </p>
136 <pre class="code">sudo apt-get install geda</pre>
139 This installs gschem , gnetlist, &amp; gattrib. Then, to install additional applications:
140 </p>
141 <pre class="code">sudo apt-get install geda-utils
142 sudo apt-get install pcb-gtk
143 sudo apt-get install gerbv
144 sudo apt-get install geda-xgsch2pcb</pre>
146 </div>
147 <!-- EDIT7 SECTION "gEDA via VirtualBox" [4397-] --></body>
148 </html>