gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r147 - in GNUnet/contrib: . OSX


From: grothoff
Subject: [GNUnet-SVN] r147 - in GNUnet/contrib: . OSX
Date: Tue, 1 Feb 2005 18:43:32 -0800 (PST)

Author: grothoff
Date: 2005-02-01 18:43:32 -0800 (Tue, 01 Feb 2005)
New Revision: 147

Added:
   GNUnet/contrib/OSX/
   GNUnet/contrib/OSX/GNUnet
   GNUnet/contrib/OSX/GNUnet.png
   GNUnet/contrib/OSX/Info.plist
   GNUnet/contrib/OSX/Makefile
   GNUnet/contrib/OSX/README
   GNUnet/contrib/OSX/build_app
   GNUnet/contrib/OSX/gnunet-gtk
   GNUnet/contrib/OSX/gnunet-peer-info
   GNUnet/contrib/OSX/gnunetd
   GNUnet/contrib/OSX/gnunetmac-nox.html
   GNUnet/contrib/OSX/gnunetmac.html
Log:
From: 
Jussi Eloranta <address@hidden>


To: 
Christian Grothoff <address@hidden>


Date: 
Today 03:25:52


Christian,

This tar file contains the OS X related stuff:

osx.tgz

It should go under contrib.


Jussi


Added: GNUnet/contrib/OSX/GNUnet
===================================================================
--- GNUnet/contrib/OSX/GNUnet   2005-02-01 11:01:50 UTC (rev 146)
+++ GNUnet/contrib/OSX/GNUnet   2005-02-02 02:43:32 UTC (rev 147)
@@ -0,0 +1,86 @@
+#!/bin/bash
+
+HOMEPAGE=http://www.chem.jyu.fi/~eloranta/gnunetmac.html
+NOX=http://www.chem.jyu.fi/~eloranta/gnunetmac-nox.html
+
+# Check for X11 - if not installed then help
+
+if [ ! -d /usr/X11R6 ]; then
+  exec /usr/bin/open /Applications/Safari.app $NOX
+fi  
+
+rootdir=`dirname $0`
+
+if [ ! -d $rootdir ]; then
+  cd ..
+  rootdir=`pwd`
+fi
+
+if [ ! -d $rootdir ]; then
+  echo "Can't locate GNUnet rootdir."
+  exit 0
+fi
+
+if [ ! -d ~/.gnunet ]; then
+  mkdir -p ~/.gnunet
+  mkdir -p ~/.gnunet/data
+  mkdir -p ~/.gnunet/data/hosts
+  cp $rootdir/hosts/* ~/.gnunet/data/hosts
+  /usr/bin/open /Applications/Safari.app $HOMEPAGE
+fi
+
+# Relocate PANGO - everytime since the app may have been moved...
+mkdir -p ~/.gnunet/pango
+PANGO_RC_FILE=~/.gnunet/pango/pango.rc
+export PANGO_RC_FILE
+cat << E_O_F > $PANGO_RC_FILE
+[Pango]
+ModuleFiles=$HOME/.gnunet/pango/pango.modules
+E_O_F
+
+cp $rootdir/etc/pangox.aliases ~/.gnunet/pango
+pth=`fgrep ModulesPath $rootdir/etc/pango.modules | cut -d\  -f4`
+sed -e "s-$pth-$rootdir/pango-g" < $rootdir/etc/pango.modules > 
~/.gnunet/pango/pango.modules
+
+# Generate gnunet.root ? TODO: other than ethernet devices?
+if [ ! -f ~/.gnunet/gnunet.root ]; then
+# Locate active network interface (e.g. en0 or en1)
+  act1=`ifconfig en0 2> /dev/null | grep inet | wc -l`
+  act2=`ifconfig en1 2> /dev/null | grep inet | wc -l`
+
+  cd $rootdir/etc
+  if [ $act1 -gt 0 ]; then
+     ip=`ifconfig en0 | grep inet\  | cut -f2 | cut -d\  -f2`
+     sed -e "s/ACTIVE_IFACE/en0/g;s/ACTIVE_IP/$ip/g" < gnunet.root > 
~/.gnunet/gnunet.root
+  elif [ $act2 -gt 0 ]; then
+     ip=`ifconfig en1 | grep inet\  | cut -f2 | cut -d\  -f2`
+     sed -e "s/ACTIVE_IFACE/en1/g;s/ACTIVE_IP/$ip/g" < gnunet.root > 
~/.gnunet/gnunet.root
+  else
+     echo "Warning: Can\'t find active network interface - assuming en0."
+     ip=`ifconfig en0 | grep inet\  | cut -f2 | cut -d\  -f2`
+     sed -e "s/ACTIVE_IFACE/en0/g;s/ACTIVE_IP/$ip/g" < gnunet.root > 
~/.gnunet/gnunet.root
+  fi
+  cd ..
+fi
+
+if [ ! -f ~/.gnunet/gnunet.conf ]; then
+  cp $rootdir/etc/gnunet.user ~/.gnunet/gnunet.conf
+fi
+
+# Do we need the server?
+
+if [ -e ~/.gnunet/gnunetd.pid ]; then
+  pid=`cat ~/.gnunet/gnunetd.pid`
+  if [ `ps -p $pid | wc -l` != 2 ]; then
+    $rootdir/bin/gnunetd &
+  fi
+else
+  $rootdir/bin/gnunetd &
+fi
+
+if [ "$SSH_CLIENT" != "" ]; then
+  $rootdir/bin/gnunet-gtk &
+else
+  /usr/bin/open-x11 $rootdir/bin/gnunet-gtk
+fi
+exit 0


Property changes on: GNUnet/contrib/OSX/GNUnet
___________________________________________________________________
Name: svn:executable
   + 

Added: GNUnet/contrib/OSX/GNUnet.png
===================================================================
(Binary files differ)


Property changes on: GNUnet/contrib/OSX/GNUnet.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: GNUnet/contrib/OSX/Info.plist
===================================================================
--- GNUnet/contrib/OSX/Info.plist       2005-02-01 11:01:50 UTC (rev 146)
+++ GNUnet/contrib/OSX/Info.plist       2005-02-02 02:43:32 UTC (rev 147)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
+<plist version="1.0">
+<dict>
+        <key>CFBundleIconFile</key>
+        <string>GNUnet.icns</string>
+</dict>
+</plist>

Added: GNUnet/contrib/OSX/Makefile
===================================================================
--- GNUnet/contrib/OSX/Makefile 2005-02-01 11:01:50 UTC (rev 146)
+++ GNUnet/contrib/OSX/Makefile 2005-02-02 02:43:32 UTC (rev 147)
@@ -0,0 +1,5 @@
+all:
+       ./build_app
+
+clean:
+       -rm -rf GNUnet.app GNUnet.dmg *~

Added: GNUnet/contrib/OSX/README
===================================================================
--- GNUnet/contrib/OSX/README   2005-02-01 11:01:50 UTC (rev 146)
+++ GNUnet/contrib/OSX/README   2005-02-02 02:43:32 UTC (rev 147)
@@ -0,0 +1,23 @@
+Few notes:
+
+1. Running make will produce .app of GNUnet and dmg image containing the 
application.
+
+2. To compile you will need bunch of stuff from fink 
(http://fink.sourceforge.net).
+
+3. Since native GTK+2 does not exist, we have to rely on X11.
+
+4. build_app is quite a hack! It first compiles as everything were to go
+  under /usr/local. Then it uses install_name_tool etc. to relocate shared
+  lib paths in executables and shared libs. It does all this by producing 
suitable
+  directory stucture for .app. Patching all the binaries
+  takes some time - be patient when running make. All the necessary shared libs
+  will be picked up from fink ($SW variable in build_app).
+  Can someone check Info.plist? I don't think it sets the icon correctly?
+
+5. Better hostlist mechanism. For some reason, esp. behind a firewall,
+the gnunetd hostlist mechanism does not get you anywhere. Hack:
+I am including a static list with the App :-(
+
+
+
+Jussi Eloranta (address@hidden)

Added: GNUnet/contrib/OSX/build_app
===================================================================
--- GNUnet/contrib/OSX/build_app        2005-02-01 11:01:50 UTC (rev 146)
+++ GNUnet/contrib/OSX/build_app        2005-02-02 02:43:32 UTC (rev 147)
@@ -0,0 +1,112 @@
+#!/bin/bash
+
+# This script should be run in the OSX subdirectory.
+# It will then produce MacOS X Finder application diretory
+# structure and make all the executables relocatable.
+
+# Fink root
+SW=/sw
+export SW
+
+# Fix a given executable or library to be relocatable
+
+fixlib () {
+
+if [ ! -d $1 ]; then
+  libs="`otool -L $1 | fgrep compatibility | cut -d\( -f1`"
+  for lib in $libs; do
+    base=`echo $lib | awk -F/ '{print $NF}'`
+    first=`echo $lib | cut -d/ -f1-3`
+    address@hidden/../lib/$base
+    if [ $first != /usr/lib -a $first != /usr/X11R6 ]; then
+      /usr/bin/install_name_tool -change $lib $to $1
+      if [ "`echo $lib | fgrep libcrypto`" = "" ]; then
+        /usr/bin/install_name_tool -id $to ../lib/$base
+        for ll in $libs; do
+          base=`echo $ll | awk -F/ '{print $NF}'`
+          first=`echo $ll | cut -d/ -f1-3`
+          address@hidden/../lib/$base
+          if [ $first != /usr/lib -a $first != /usr/X11R6 -a "`echo $ll | 
fgrep libcrypto`" = "" ]; then
+            /usr/bin/install_name_tool -change $ll $to ../lib/$base
+          fi
+        done
+      fi
+    fi
+  done
+fi
+}
+
+#
+# First install everything in /tmp
+# 
+rm -rf /tmp/GNUnet
+mkdir /tmp/GNUnet
+
+cd ../..
+if [ ! -f config.status ]; then
+# TODO: issues with gcrypt vs. openssl. The latter causes gnunetd to core dump
+# in some cases. Do we still need to disable gettext?
+#  ./configure --with-gdbm --without-mysql --without-bdb --with-sqlite=$SW 
--with-crypto=$SW --disable-nls
+  ./configure --with-gdbm --without-mysql --without-bdb --with-sqlite=$SW 
--disable-nls
+  make
+fi
+make install prefix=/tmp/GNUnet
+cd contrib/OSX
+
+echo "Compilation done. Patching executables and libraries - wait -"
+
+# TODO: set icon (SetFile?) - now must be done in Finder
+rm -rf GNUnet.app
+mkdir GNUnet.app
+mkdir GNUnet.app/Contents
+mkdir GNUnet.app/Contents/{MacOS,Resources}
+mkdir GNUnet.app/Contents/MacOS/{bin,doc,etc,html,lib,man,hosts}
+cp GNUnet.png GNUnet.app/Contents/Resources/GNUnet.icns
+cp Info.plist GNUnet.app/Contents
+cp GNUnet GNUnet.app/Contents/MacOS/GNUnet
+cp -r /tmp/GNUnet/man GNUnet.app/Contents/MacOS
+cp /tmp/GNUnet/bin/* GNUnet.app/Contents/MacOS/bin
+mv GNUnet.app/Contents/MacOS/bin/gnunet-gtk 
GNUnet.app/Contents/MacOS/bin/gnunet-gtk.wrap
+mv GNUnet.app/Contents/MacOS/bin/gnunetd 
GNUnet.app/Contents/MacOS/bin/gnunetd.wrap
+mv GNUnet.app/Contents/MacOS/bin/gnunet-peer-info 
GNUnet.app/Contents/MacOS/bin/gnunet-peer-info.wrap
+cp {gnunet-gtk,gnunetd,gnunet-peer-info} GNUnet.app/Contents/MacOS/bin
+cp /tmp/GNUnet/lib/* GNUnet.app/Contents/MacOS/lib
+sed -e 's-/var/lib/GNUnet-~/.gnunet-g;s-eth0-ACTIVE_IFACE-g' < 
../../contrib/gnunet.root > GNUnet.app/Contents/MacOS/etc/gnunet.root
+sed -e 'sX/tmp/gnunet-downloads/X~/gnunet-downloads/Xg' < 
../../contrib/gnunet.user > GNUnet.app/Contents/MacOS/etc/gnunet.user
+cp $SW/etc/pango/* GNUnet.app/Contents/MacOS/etc
+pth=`fgrep ModulesPath $SW/etc/pango/pango.modules | cut -d\  -f4`
+cp -r $pth GNUnet.app/Contents/MacOS/pango
+cp ../../COPYING GNUnet.app/Contents/MacOS/doc
+cp *.html GNUnet.app/Contents/MacOS/html
+cp hosts/* GNUnet.app/Contents/MacOS/hosts
+
+# Find out libs we need from fink (e.g. $SW)
+libs="`otool -L GNUnet.app/Contents/MacOS/{bin,lib}/* 2> /dev/null | fgrep 
compatibility | cut -d\( -f1 | grep $SW | sort | uniq`"
+cp -f $libs GNUnet.app/Contents/MacOS/lib
+# Second round, esp. gtk introduced some new deps.. in principle should
+# loop until no changes...
+libs="`otool -L GNUnet.app/Contents/MacOS/{bin,lib}/* 2> /dev/null | fgrep 
compatibility | cut -d\( -f1 | grep $SW | sort | uniq`"
+cp -f $libs GNUnet.app/Contents/MacOS/lib
+
+# Libcrypto comes with the system + fink version does not allow 
install_name_tool
+rm -f GNUnet.app/Contents/MacOS/lib/*.la 
GNUnet.app/Contents/MacOS/lib/libcrypto*
+
+# Fix shared lib paths in executables and shared libs
+cd GNUnet.app/Contents/MacOS/bin
+for file in *; do
+  fixlib $file
+done
+cd ../lib
+for file in *; do
+  fixlib $file
+done
+cd ../pango
+for file in *.so; do
+  fixlib $file
+done
+cd ../../../..
+
+# create dmg image
+/usr/bin/hdiutil create -srcfolder GNUnet.app GNUnet.dmg
+echo "Done."
+exit 0


Property changes on: GNUnet/contrib/OSX/build_app
___________________________________________________________________
Name: svn:executable
   + 

Added: GNUnet/contrib/OSX/gnunet-gtk
===================================================================
--- GNUnet/contrib/OSX/gnunet-gtk       2005-02-01 11:01:50 UTC (rev 146)
+++ GNUnet/contrib/OSX/gnunet-gtk       2005-02-02 02:43:32 UTC (rev 147)
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PANGO_RC_FILE=~/.gnunet/pango/pango.rc
+export PANGO_RC_FILE
+LD_LIBRARY_PATH=`dirname $0`/../lib
+export LD_LIBRARY_PATH
+
+exec $LD_LIBRARY_PATH/../bin/gnunet-gtk.wrap $*


Property changes on: GNUnet/contrib/OSX/gnunet-gtk
___________________________________________________________________
Name: svn:executable
   + 

Added: GNUnet/contrib/OSX/gnunet-peer-info
===================================================================
--- GNUnet/contrib/OSX/gnunet-peer-info 2005-02-01 11:01:50 UTC (rev 146)
+++ GNUnet/contrib/OSX/gnunet-peer-info 2005-02-02 02:43:32 UTC (rev 147)
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+LD_LIBRARY_PATH=`dirname $0`/../lib
+export LD_LIBRARY_PATH
+exec $LD_LIBRARY_PATH/../bin/gnunet-peer-info.wrap -c ~/.gnunet/gnunet.root $*


Property changes on: GNUnet/contrib/OSX/gnunet-peer-info
___________________________________________________________________
Name: svn:executable
   + 

Added: GNUnet/contrib/OSX/gnunetd
===================================================================
--- GNUnet/contrib/OSX/gnunetd  2005-02-01 11:01:50 UTC (rev 146)
+++ GNUnet/contrib/OSX/gnunetd  2005-02-02 02:43:32 UTC (rev 147)
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+LD_LIBRARY_PATH=`dirname $0`/../lib
+export LD_LIBRARY_PATH
+exec $LD_LIBRARY_PATH/../bin/gnunetd.wrap -c ~/.gnunet/gnunet.root $*


Property changes on: GNUnet/contrib/OSX/gnunetd
___________________________________________________________________
Name: svn:executable
   + 

Added: GNUnet/contrib/OSX/gnunetmac-nox.html
===================================================================
--- GNUnet/contrib/OSX/gnunetmac-nox.html       2005-02-01 11:01:50 UTC (rev 
146)
+++ GNUnet/contrib/OSX/gnunetmac-nox.html       2005-02-02 02:43:32 UTC (rev 
147)
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+  <title>Apple X11 not installed.</title>
+</head>
+<body style="background-image: url(Web/grainblue.jpg);">
+<big><span style="font-weight: bold;">Apple X11 not installed</span></big><br>
+<br>
+<span style="font-weight: bold;">Please download and install Apple's X11 
package.</span><br>
+<br>
+It is available from <a 
href="http://www.apple.com/macosx/features/x11/download/";> Apple</a>.
+</body>
+</html>

Added: GNUnet/contrib/OSX/gnunetmac.html
===================================================================
--- GNUnet/contrib/OSX/gnunetmac.html   2005-02-01 11:01:50 UTC (rev 146)
+++ GNUnet/contrib/OSX/gnunetmac.html   2005-02-02 02:43:32 UTC (rev 147)
@@ -0,0 +1,73 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+  <title>Welcome to GNUnet for MacOS X</title>
+</head>
+<body style="background-image: url(Web/grainblue.jpg);">
+<big><span style="font-weight: bold;">GNUnet 0.6.6 for MacOS X 
(10.3.7)</span></big><br>
+<br>
+X11 and mouse: many functions require you to press the apple key and the mouse
+button at the same time. This corresponds to the right mouse button on a three
+button mouse. Otherwise usage should be self-explanatory.
+<br>
+<br>
+If you are behind a firewall then you may need to edit ~/.gnunet/gnunet.* 
configuration files. After changing them you will need to stop and start the 
gnunetd server (daemon).
+<br>
+<br>
+<span style="font-weight: bold;">The executable uses the following packages 
(GPL, BSD, or other):</span><br>
+<br>
+- GNUnet 0.6.6 (http://www.gnunet.org)<br>
+- Exctractor 4.0 (http://www.gnunet.org)<br>
+- OpenSSL 0.9.7 (via Fink; http://fink.sourceforge.net)<br>
+- gmp 4.1.3 (via Fink; http://fink.sourceforge.net)<br>
+- GTK 2.4.9 (via Fink; http://fink.sourceforge.net)<br>
+- libiconv 1.9.2 (via Fink; http://fink.sourceforge.net)<br>
+- libncurses 5.4 (via Fink; http://fink.sourceforge.net)<br>
+- GDBM 1.8 (via Fink; http://fink.sourceforge.net)<br>
+- Sqlite 3 (via http://www.sqlite.org)<br>
+- GNU Wget 1.9.1 (via Fink; http://fink.sourceforge.net)<br>
+<br>
+The GPL COPYING file is included with the application and can be found from
+GNUnet.app/Contents/MacOS/doc/COPYING.
+<br>
+<br>
+<span style="font-weight: bold;">Relevant files and directories:</span><br>
+<br>
+1. .gnunet directory in your home directory contains all the GNUnet related 
data (e.g. ~/.gnunet).<br>
+2. That directory has two configuration files: gnunet.conf, which contains 
GNUnet client related configuration, and gnunet.root, which contains all GNUnet 
server (daemon) related configuration. For more information on these files, see 
the <a href="http://www.gnunet.org/";>GNUnet homepage</a>.<br>
+3. GNUnet command line utilities can be found from (use shell window) 
+GNUnet.app/Contents/MacOS/bin. You can add this directory to you path
+in ~/.cshrc or ~/.profile file.<br>
+4. GNUnet-downloads in you home directory will contain downloaded files.<br>
+<br>
+The commands are:<br>
+<br>
+gnunet-search &lt;keyword&gt;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
+&nbsp;&nbsp; &nbsp;&nbsp; will search for files. Note that it outputs
+suitable lines for download.<br>
+gnunet-download &lt;URI&gt;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
+&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; will download file corresponding to URI.<br>
+gnunet-gtk&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
+&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
+&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; graphical
+interface to GNUnet.<br>
+gnunet-insert &lt;files&gt;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
+&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; insert
+content to GNUnet<br>
+<br>
+<br>
+<span style="font-weight: bold;">If something goes wrong and you want to start 
from scratch:</span><br>
+1. Stop the gnunetd from advanced -menu in the graphical user interface or 
+by using a shell window:<br>
+% cat ~/.gnunet/gnunet.pid<br>
+somenumber is displayed here<br>
+% kill -9 the_number_above_goes_here<br>
+2. Remove you .gnunet directory (be careful not to remove anything 
else!!!):<br>
+% cd<br>
+% rm -rf .gnunet<br>
+If you are uncomfortable with command line then you can also use Finder to
+remove the .gnunet directory.
+</body>
+</html>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]