Commit 5f9693d4 authored by runge's avatar runge

Add Darwin stuff. Sync to current 1.0.7

parent 2635ae44
...@@ -20,6 +20,7 @@ by others. See these sites and related ones for more information: ...@@ -20,6 +20,7 @@ by others. See these sites and related ones for more information:
http://stunnel.mirt.net http://stunnel.mirt.net
http://www.openssl.org http://www.openssl.org
http://www.chiark.greenend.org.uk/~sgtatham/putty/ http://www.chiark.greenend.org.uk/~sgtatham/putty/
http://sourceforge.net/projects/cotvnc/
Note: Some of the Windows binaries included contain cryptographic software Note: Some of the Windows binaries included contain cryptographic software
that you may not be allowed to download, use, or redistribute. Please that you may not be allowed to download, use, or redistribute. Please
...@@ -107,6 +108,9 @@ README is in) and like this: ...@@ -107,6 +108,9 @@ README is in) and like this:
./build.unix ./build.unix
To use custom locations for libraries see the LDFLAGS_OS and CPPFLAGS_OS
description at the top of the build.unix script.
The programs: The programs:
------------ ------------
...@@ -129,9 +133,10 @@ you can run this instead: ...@@ -129,9 +133,10 @@ you can run this instead:
this is essentially the same GUI that is run on Windows (the this is essentially the same GUI that is run on Windows (the
ssl_tightvncviewer.exe). ssl_tightvncviewer.exe).
Using the GUI is it impossible to initiate a VNC connection that is not Using the GUI is it not possible (well not easy) to initiate
encrypted with either SSL or SSH. Unencrypted VNC connections can only a VNC connection that is not encrypted with either SSL or SSH.
be started by manually running the ./bin/tightvncviewer script. Unencrypted VNC connections can only be started by manually running the
./bin/tightvncviewer script.
For convenience, you can make symlinks from a directory in your PATH to For convenience, you can make symlinks from a directory in your PATH to
any of the 3 programs above you wish to run. That is all you usually any of the 3 programs above you wish to run. That is all you usually
...@@ -144,6 +149,10 @@ assuming $HOME/bin is in your $PATH: ...@@ -144,6 +149,10 @@ assuming $HOME/bin is in your $PATH:
(note the "." at the end). The above commands is basically the way to (note the "." at the end). The above commands is basically the way to
"install" this package on Unix. "install" this package on Unix.
Also symlinks to the GUI launcher script are provided in:
MacOSX/ssl_vnc_gui.sh
Unix/ssl_vnc_gui
On Windows unpack your archive and run: On Windows unpack your archive and run:
...@@ -224,6 +233,7 @@ See also: ...@@ -224,6 +233,7 @@ See also:
http://www.tightvnc.com http://www.tightvnc.com
http://www.realvnc.com http://www.realvnc.com
http://www.chiark.greenend.org.uk/~sgtatham/putty/ http://www.chiark.greenend.org.uk/~sgtatham/putty/
http://sourceforge.net/projects/cotvnc/
Windows: Windows:
......
#!/bin/sh
cp -p vncviewer.sh vncviewer
pwd
ls -l vncviewer.sh vncviewer
(cd ../Darwin.i386; .cpover)
#!/bin/sh
# copy "vncviewer.sh" back over to "vncviewer" in case you delete or overwrite it
# via build.unix. etc
dir=`dirname "$0"`
if [ "X$DISPLAY" != "X" ]; then
"$dir/vncviewer.x11" "$@"
else
args=""
for a in "$@"
do
if echo "$a" | grep '^-' > /dev/null; then
args="$args $a"
elif echo "$a" | grep ':' > /dev/null; then
h=`echo "$a" | awk -F: '{print $1}'`
p=`echo "$a" | awk -F: '{print $2}'`
if [ "X$p" != "X" ]; then
if [ $p -lt 5900 ]; then
p=`expr $p + 5900`
fi
fi
args="$args $h:$p"
else
args="$args $a"
fi
done
"$dir/../../MacOSX/Chicken of the VNC.app/Contents/MacOS/Chicken of the VNC" $args
fi
#!/bin/sh
cp -p ../Darwin.Power.Macintosh/vncviewer.sh .
cp -p vncviewer.sh vncviewer
pwd
ls -l vncviewer.sh vncviewer
...@@ -36,6 +36,10 @@ ...@@ -36,6 +36,10 @@
# -grab # -grab
# #
# #
# If the *very first* argument is "-cotvnc" then it is assumed you are on
# Darwin and want to run the Chicken of the VNC viewer via our wrapper.
#
#
# See the TightVNC viewer documentation for on its cmdline arguments. # See the TightVNC viewer documentation for on its cmdline arguments.
# #
# For convenience, here is the current (7/2006) TightVNC viewer -help output: # For convenience, here is the current (7/2006) TightVNC viewer -help output:
...@@ -73,7 +77,7 @@ ...@@ -73,7 +77,7 @@
# #
if [ "X$1" = "X-h" -o "X$1" = "X-help" -o "X$1" = "X--help" ]; then if [ "X$1" = "X-h" -o "X$1" = "X-help" -o "X$1" = "X--help" ]; then
head -70 "$0" | grep -v bin/sh head -76 "$0" | grep -v bin/sh
exit exit
fi fi
...@@ -84,26 +88,44 @@ export PATH ...@@ -84,26 +88,44 @@ export PATH
# Set this for ssl_vncviewer to pick up: # Set this for ssl_vncviewer to pick up:
# #
VNCVIEWERCMD="vncviewer" use_ours=0
export VNCVIEWERCMD if [ "X$1" = "X-cotvnc" ]; then
shift
DARWIN_COTVNC=1
export DARWIN_COTVNC
fi
if [ "X$VNCVIEWERCMD" = "X" ]; then
VNCVIEWERCMD="vncviewer"
export VNCVIEWERCMD
if [ "X$DARWIN_COTVNC" = "X" ]; then
use_ours=1
fi
fi
# work out os.arch platform string and check for binaries: # work out os.arch platform string and check for binaries:
# #
name=$UNAME name=$UNAME
if [ "X$name" = "X" ]; then if [ "X$name" = "X" ]; then
name=`uname -sm | sed -e 's/ /./'` name=`uname -sm | sed -e 's/ /./g'`
fi fi
if [ -L "$0" ]; then f="$0"
d=`dirname "\`ls -l "$0" | sed -e 's/^.* -> //'\`"` for t in 1 2 3 4 5
if echo "$d" | grep '^/' > /dev/null; then do
dir="$d" if [ -L "$f" ]; then
f0="$f"
f=`ls -l "$f" | sed -e 's/^.* -> //'`
if echo "$f" | grep '^/' > /dev/null; then
:
else
f="`dirname "$f0"`/$f"
fi
else else
dir="`dirname "$0"`/$d" break
fi fi
else done
dir=`dirname "$0"` dir=`dirname "$f"`
fi
if [ ! -d "$dir/$name" ]; then if [ ! -d "$dir/$name" ]; then
echo "cannot find platform dir: $dir/$name for your OS:" echo "cannot find platform dir: $dir/$name for your OS:"
uname -sm uname -sm
...@@ -115,10 +137,22 @@ fi ...@@ -115,10 +137,22 @@ fi
# pick them up: # pick them up:
# #
PATH="$dir:$dir/$name:$dir/util:$PATH" PATH="$dir:$dir/$name:$dir/util:$PATH"
if echo "$dir" | grep '^/' > /dev/null; then
:
else
dir=`pwd`/$dir
PATH="$dir:$dir/$name:$dir/util:$PATH"
fi
STUNNEL_EXTRA_OPTS=${STUNNEL_EXTRA_OPTS:-"maxconn = 1"} STUNNEL_EXTRA_OPTS=${STUNNEL_EXTRA_OPTS:-"maxconn = 1"}
export STUNNEL_EXTRA_OPTS export STUNNEL_EXTRA_OPTS
# Force the use of tight encoding for localhost redir connection: # If ours (and not cotvnc), force the use of tight encoding for localhost
# redir connection:
# #
ssl_vncviewer "$@" -encodings 'copyrect tight zrle zlib hextile' #
if [ $use_ours = 1 ]; then
ssl_vncviewer "$@" -encodings 'copyrect tight zrle zlib hextile'
else
ssl_vncviewer "$@"
fi
...@@ -21,6 +21,7 @@ fi ...@@ -21,6 +21,7 @@ fi
PATH=$PATH:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin PATH=$PATH:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin
export PATH export PATH
SSL_VNC_GUI_CMD="$0 $*" SSL_VNC_GUI_CMD="$0 $*"
export SSL_VNC_GUI_CMD export SSL_VNC_GUI_CMD
SSL_VNC_LAUNCH=$SSL_VNC_GUI_CMD SSL_VNC_LAUNCH=$SSL_VNC_GUI_CMD
...@@ -30,19 +31,26 @@ export SSL_VNC_LAUNCH ...@@ -30,19 +31,26 @@ export SSL_VNC_LAUNCH
# #
name=$UNAME name=$UNAME
if [ "X$name" = "X" ]; then if [ "X$name" = "X" ]; then
name=`uname -sm | sed -e 's/ /./'` name=`uname -sm | sed -e 's/ /./g'`
fi fi
if [ -L "$0" ]; then f="$0"
d=`dirname "\`ls -l "$0" | sed -e 's/^.* -> //'\`"` for t in 1 2 3 4 5
if echo "$d" | grep '^/' > /dev/null; then do
dir="$d" if [ -L "$f" ]; then
f0="$f"
f=`ls -l "$f" | sed -e 's/^.* -> //'`
if echo "$f" | grep '^/' > /dev/null; then
:
else
f="`dirname "$f0"`/$f"
fi
else else
dir="`dirname "$0"`/$d" break
fi fi
else done
dir=`dirname "$0"` dir=`dirname "$f"`
fi
if [ ! -d "$dir/$name" ]; then if [ ! -d "$dir/$name" ]; then
echo "cannot find platform dir: $dir/$name for your OS:" echo "cannot find platform dir: $dir/$name for your OS:"
uname -sm uname -sm
...@@ -54,6 +62,12 @@ fi ...@@ -54,6 +62,12 @@ fi
# pick them up: # pick them up:
# #
PATH="$dir:$dir/$name:$dir/util:$PATH" PATH="$dir:$dir/$name:$dir/util:$PATH"
if echo "$dir" | grep '^/' > /dev/null; then
:
else
dir=`pwd`/$dir
PATH="$dir:$dir/$name:$dir/util:$PATH"
fi
SSL_VNC_BASEDIR="$dir" SSL_VNC_BASEDIR="$dir"
export SSL_VNC_BASEDIR export SSL_VNC_BASEDIR
......
...@@ -32,7 +32,10 @@ ...@@ -32,7 +32,10 @@
# #
# "hostname:N" is the host and VNC display to connect to, e.g. snoopy:0 # "hostname:N" is the host and VNC display to connect to, e.g. snoopy:0
# #
# If the first argument is "-ssl" then ssl_tightvncviewer is called # If the *very first* argument is "-cotvnc" then it is assumed you are on
# Darwin and want to run the Chicken of the VNC viewer via our wrapper.
#
# If the next argument is "-ssl" then ssl_tightvncviewer is called
# instead. See that script for details. # instead. See that script for details.
# #
# See the TightVNC viewer documentation for on its cmdline arguments. # See the TightVNC viewer documentation for on its cmdline arguments.
...@@ -72,7 +75,7 @@ ...@@ -72,7 +75,7 @@
# #
if [ "X$1" = "X-h" -o "X$1" = "X-help" -o "X$1" = "X--help" ]; then if [ "X$1" = "X-h" -o "X$1" = "X-help" -o "X$1" = "X--help" ]; then
head -69 "$0" | grep -v bin/sh head -76 "$0" | grep -v bin/sh
exit exit
fi fi
...@@ -83,26 +86,44 @@ export PATH ...@@ -83,26 +86,44 @@ export PATH
# Set this for ssl_vncviewer to pick up: # Set this for ssl_vncviewer to pick up:
# #
VNCVIEWERCMD="vncviewer" use_ours=0
export VNCVIEWERCMD if [ "X$1" = "X-cotvnc" ]; then
shift
DARWIN_COTVNC=1
export DARWIN_COTVNC
fi
if [ "X$VNCVIEWERCMD" = "X" ]; then
VNCVIEWERCMD="vncviewer"
export VNCVIEWERCMD
if [ "X$DARWIN_COTVNC" = "X" ]; then
use_ours=1
fi
fi
# work out os.arch platform string and check for binaries: # work out os.arch platform string and check for binaries:
# #
name=$UNAME name=$UNAME
if [ "X$name" = "X" ]; then if [ "X$name" = "X" ]; then
name=`uname -sm | sed -e 's/ /./'` name=`uname -sm | sed -e 's/ /./g'`
fi fi
if [ -L "$0" ]; then f="$0"
d=`dirname "\`ls -l "$0" | sed -e 's/^.* -> //'\`"` for t in 1 2 3 4 5
if echo "$d" | grep '^/' > /dev/null; then do
dir="$d" if [ -L "$f" ]; then
f0="$f"
f=`ls -l "$f" | sed -e 's/^.* -> //'`
if echo "$f" | grep '^/' > /dev/null; then
:
else
f="`dirname "$f0"`/$f"
fi
else else
dir="`dirname "$0"`/$d" break
fi fi
else done
dir=`dirname "$0"` dir=`dirname "$f"`
fi
if [ ! -d "$dir/$name" ]; then if [ ! -d "$dir/$name" ]; then
echo "cannot find platform dir: $dir/$name for your OS:" echo "cannot find platform dir: $dir/$name for your OS:"
uname -sm uname -sm
...@@ -114,6 +135,15 @@ fi ...@@ -114,6 +135,15 @@ fi
# pick them up: # pick them up:
# #
PATH="$dir:$dir/$name:$dir/util:$PATH" PATH="$dir:$dir/$name:$dir/util:$PATH"
if echo "$dir" | grep '^/' > /dev/null; then
:
else
dir=`pwd`/$dir
PATH="$dir:$dir/$name:$dir/util:$PATH"
fi
STUNNEL_EXTRA_OPTS=${STUNNEL_EXTRA_OPTS:-"maxconn = 1"}
export STUNNEL_EXTRA_OPTS
if [ "X$1" = "X-ssl" ]; then if [ "X$1" = "X-ssl" ]; then
shift shift
...@@ -121,9 +151,13 @@ if [ "X$1" = "X-ssl" ]; then ...@@ -121,9 +151,13 @@ if [ "X$1" = "X-ssl" ]; then
exit $? exit $?
fi fi
STUNNEL_EXTRA_OPTS=${STUNNEL_EXTRA_OPTS:-"maxconn = 1"}
export STUNNEL_EXTRA_OPTS
# Force the use of tight encoding for localhost redir connection: # Force the use of tight encoding for localhost redir connection:
# #
vncviewer -encodings 'copyrect tight zrle zlib hextile' "$@" # If ours (and not doing cotvnc), force the use of tight encoding for
# the connection:
#
if [ $use_ours = 1 ]; then
"$VNCVIEWERCMD" -encodings 'copyrect tight zrle zlib hextile' "$@"
else
"$VNCVIEWERCMD" "$@"
fi
...@@ -126,6 +126,7 @@ help() { ...@@ -126,6 +126,7 @@ help() {
gotalpha="" gotalpha=""
use_ssh="" use_ssh=""
use_sshssl="" use_sshssl=""
direct_connect=""
ssh_sleep=15 ssh_sleep=15
ssh_cmd="sleep $ssh_sleep" ssh_cmd="sleep $ssh_sleep"
if [ "X$SSL_VNCVIEWER_SSH_CMD" != "X" ]; then if [ "X$SSL_VNCVIEWER_SSH_CMD" != "X" ]; then
...@@ -181,6 +182,15 @@ if [ "X$use_ssh" = "X1" -a "X$use_sshssl" = "X" ]; then ...@@ -181,6 +182,15 @@ if [ "X$use_ssh" = "X1" -a "X$use_sshssl" = "X" ]; then
fi fi
fi fi
if echo "$orig" | grep '^vnc://' > /dev/null; then
orig=`echo "$orig" | sed -e 's,vnc://,,'`
verify=""
mycert=""
use_ssh=""
use_sshssl=""
direct_connect=1
fi
# play around with host:display port: # play around with host:display port:
if echo "$orig" | grep ':' > /dev/null; then if echo "$orig" | grep ':' > /dev/null; then
: :
...@@ -277,8 +287,8 @@ if [ "X$use_ssh" = "X1" ]; then ...@@ -277,8 +287,8 @@ if [ "X$use_ssh" = "X1" ]; then
proxport=`findfree 3500` proxport=`findfree 3500`
echo echo
echo "Running 1st ssh proxy:" echo "Running 1st ssh proxy:"
echo "$ssh -f -p $ssh_port1 -t -e none -L $proxport:$ssh_host2:$ssh_port2 $ssh_host1 \"sleep 30\"" echo "$ssh -f -x -p $ssh_port1 -t -e none -L $proxport:$ssh_host2:$ssh_port2 $ssh_host1 \"sleep 30\""
$ssh -f -p $ssh_port1 -t -e none -L $proxport:$ssh_host2:$ssh_port2 $ssh_host1 "sleep 30" $ssh -f -x -p $ssh_port1 -t -e none -L $proxport:$ssh_host2:$ssh_port2 $ssh_host1 "sleep 30"
ssh_args="$ssh_args -o NoHostAuthenticationForLocalhost=yes" ssh_args="$ssh_args -o NoHostAuthenticationForLocalhost=yes"
sleep 1 sleep 1
stty sane stty sane
...@@ -307,18 +317,18 @@ if [ "X$use_ssh" = "X1" ]; then ...@@ -307,18 +317,18 @@ if [ "X$use_ssh" = "X1" ]; then
fi fi
# the -t option actually speeds up typing response via VNC!! # the -t option actually speeds up typing response via VNC!!
if [ "X$SSL_VNCVIEWER_SSH_ONLY" != "X" ]; then if [ "X$SSL_VNCVIEWER_SSH_ONLY" != "X" ]; then
echo "$ssh -p $ssh_port -t $C $ssh_args $ssh_host \"$info\"" echo "$ssh -x -p $ssh_port -t $C $ssh_args $ssh_host \"$info\""
echo "" echo ""
$ssh -p $ssh_port -t $C $ssh_args $ssh_host "$ssh_cmd" $ssh -x -p $ssh_port -t $C $ssh_args $ssh_host "$ssh_cmd"
exit $? exit $?
elif [ "X$SSL_VNCVIEWER_NO_F" != "X" ]; then elif [ "X$SSL_VNCVIEWER_NO_F" != "X" ]; then
echo "$ssh -p $ssh_port -t $C -L ${use}:${vnc_host}:${port} $ssh_args $ssh_host \"$info\"" echo "$ssh -x -p $ssh_port -t $C -L ${use}:${vnc_host}:${port} $ssh_args $ssh_host \"$info\""
echo "" echo ""
$ssh -p $ssh_port -t $C -L ${use}:${vnc_host}:${port} $ssh_args $ssh_host "$ssh_cmd" $ssh -x -p $ssh_port -t $C -L ${use}:${vnc_host}:${port} $ssh_args $ssh_host "$ssh_cmd"
else else
echo "$ssh -f -p $ssh_port -t $C -L ${use}:${vnc_host}:${port} $ssh_args $ssh_host \"$info\"" echo "$ssh -x -f -p $ssh_port -t $C -L ${use}:${vnc_host}:${port} $ssh_args $ssh_host \"$info\""
echo "" echo ""
$ssh -f -p $ssh_port -t $C -L ${use}:${vnc_host}:${port} $ssh_args $ssh_host "$ssh_cmd" $ssh -x -f -p $ssh_port -t $C -L ${use}:${vnc_host}:${port} $ssh_args $ssh_host "$ssh_cmd"
fi fi
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
echo "" echo ""
...@@ -337,9 +347,9 @@ if [ "X$use_ssh" = "X1" ]; then ...@@ -337,9 +347,9 @@ if [ "X$use_ssh" = "X1" ]; then
stty sane stty sane
if [ "X$use_sshssl" = "X" ]; then if [ "X$use_sshssl" = "X" ]; then
echo "Running viewer:" echo "Running viewer:"
echo $VNCVIEWERCMD "$@" localhost:$N echo "$VNCVIEWERCMD" "$@" localhost:$N
echo "" echo ""
$VNCVIEWERCMD "$@" localhost:$N "$VNCVIEWERCMD" "$@" localhost:$N
exit $? exit $?
else else
...@@ -408,6 +418,23 @@ print STDERR "proxy_host: $proxy_host\n"; ...@@ -408,6 +418,23 @@ print STDERR "proxy_host: $proxy_host\n";
print STDERR "proxy_port: $proxy_port\n"; print STDERR "proxy_port: $proxy_port\n";
print STDERR "proxy_connect: $connect\n"; print STDERR "proxy_connect: $connect\n";
my $listen_handle = "";
if ($ENV{SSL_VNC_LISTEN} != "") {
my $listen_sock = IO::Socket::INET->new(
Listen => 2,
LocalAddr => "localhost",
LocalPort => $ENV{SSL_VNC_LISTEN},
Proto => "tcp");
if (! $listen_sock) {
die "perl proxy: $!\n";
}
my $ip;
($listen_handle, $ip) = $listen_sock->accept();
if (! $listen_handle) {
die "perl proxy: $!\n";
}
}
my $sock = IO::Socket::INET->new( my $sock = IO::Socket::INET->new(
PeerAddr => $proxy_host, PeerAddr => $proxy_host,
PeerPort => $proxy_port, PeerPort => $proxy_port,
...@@ -462,10 +489,18 @@ if ($second ne "") { ...@@ -462,10 +489,18 @@ if ($second ne "") {
if (fork) { if (fork) {
print STDERR "parent\[$$] STDIN -> socket\n\n"; print STDERR "parent\[$$] STDIN -> socket\n\n";
xfer(STDIN, $sock); if ($listen_handle) {
xfer($listen_handle, $sock);
} else {
xfer(STDIN, $sock);
}
} else { } else {
print STDERR "child \[$$] socket -> STDOUT\n\n"; print STDERR "child \[$$] socket -> STDOUT\n\n";
xfer($sock, STDOUT); if ($listen_handle) {
xfer($sock, $listen_handle);
} else {
xfer($sock, STDOUT);
}
} }
exit; exit;
...@@ -523,6 +558,35 @@ else ...@@ -523,6 +558,35 @@ else
connect="connect = $host:$port" connect="connect = $host:$port"
fi fi
if [ "X$direct_connect" != "X" ]; then
echo ""
echo "Running viewer for direct connection:"
echo ""
echo "** NOTE: THERE WILL BE NO SSL OR SSH ENCRYPTION **"
echo ""
if type printf > /dev/null 2>&1; then
printf "Are you sure you want to continue? [y]/n "
else
echo -n "Are you sure you want to continue? [y]/n "
fi
read x
if [ "X$x" = "Xn" ]; then
exit 1
fi
echo ""
if [ "X$ptmp" != "X" ]; then
SSL_VNC_LISTEN=$use
export SSL_VNC_LISTEN
$ptmp &
sleep 2
host="localhost"
disp="$N"
fi
echo "$VNCVIEWERCMD" "$@" $host:$disp
echo ""
"$VNCVIEWERCMD" "$@" $host:$disp
exit $?
fi
##debug = 7 ##debug = 7
tmp=/tmp/ssl_vncviewer${RANDOM}.$$ tmp=/tmp/ssl_vncviewer${RANDOM}.$$
...@@ -566,9 +630,9 @@ rm -f "$tmp" ...@@ -566,9 +630,9 @@ rm -f "$tmp"
echo "" echo ""
echo "Running viewer:" echo "Running viewer:"
echo $VNCVIEWERCMD "$@" localhost:$N echo "$VNCVIEWERCMD" "$@" localhost:$N
echo "" echo ""
$VNCVIEWERCMD "$@" localhost:$N "$VNCVIEWERCMD" "$@" localhost:$N
kill $pid kill $pid
sleep 1 sleep 1
#!/bin/sh #!/bin/sh
# Notes: to customize locations, e.g. for libjpeg, set LDFLAGS_OS and/or CPPFLAGS_OS
#
# e.g. on Darwin we did:
#
# env LDFLAGS_OS="-L/Volumes/someplace/common/lib/" CPPFLAGS_OS="-I /Volumes/someplace/common/include" ./build.unix
#
# Add useful directories to PATH: # Add useful directories to PATH:
# #
PATH=$PATH:/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin/X11:/usr/openwin/bin:/opt/SUNWspro/bin:/usr/sfw/bin:/usr/ccs/bin PATH=$PATH:/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin/X11:/usr/openwin/bin:/opt/SUNWspro/bin:/usr/sfw/bin:/usr/ccs/bin
...@@ -17,7 +25,7 @@ fi ...@@ -17,7 +25,7 @@ fi
# #
name=$UNAME name=$UNAME
if [ "X$name" = "X" ]; then if [ "X$name" = "X" ]; then
name=`uname -sm | sed -e 's/ /./'` name=`uname -sm | sed -e 's/ /./g'`
fi fi
if [ "X$name" = "X" ]; then if [ "X$name" = "X" ]; then
echo "cannot determine platform: os.arch, e.g. Linux.i686" echo "cannot determine platform: os.arch, e.g. Linux.i686"
...@@ -25,6 +33,11 @@ if [ "X$name" = "X" ]; then ...@@ -25,6 +33,11 @@ if [ "X$name" = "X" ]; then
exit 1 exit 1
fi fi
LDD="ldd"
if [ `uname` = "Darwin" ]; then
LDD="otool -L"
fi
# Work out main destination: # Work out main destination:
# #
dest=./bin/$name dest=./bin/$name
...@@ -167,13 +180,17 @@ sync ...@@ -167,13 +180,17 @@ sync
wc $src wc $src
sum $src sum $src
sleep 2 sleep 2
echo cp -p $src $dest/vncviewer
cp -p $src $dest/vncviewer || exit 1 suff=""
if [ `uname` = "Darwin" ]; then
suff=".x11"
fi
echo cp -p $src $dest/vncviewer$suff
sleep 1 sleep 1
cp -p $src $dest/vncviewer || exit 1 cp -p $src $dest/vncviewer$suff || exit 1
ls -l $src $dest/vncviewer ls -l $src $dest/vncviewer$suff
$dest/vncviewer -h $dest/vncviewer$suff -h
ldd $dest/vncviewer $LDD $dest/vncviewer$suff
echo "" echo ""
# Do stunnel: # Do stunnel:
...@@ -237,8 +254,8 @@ sleep 1 ...@@ -237,8 +254,8 @@ sleep 1
cp -p $src $dest/stunnel || exit 1 cp -p $src $dest/stunnel || exit 1
ls -l $src $dest/stunnel ls -l $src $dest/stunnel
$dest/stunnel -help $dest/stunnel -help
ldd $dest/stunnel $LDD $dest/stunnel
echo "" echo ""
$dest/vncviewer -h $dest/vncviewer$suff -h
ldd $dest/vncviewer $LDD $dest/vncviewer$suff
#!/bin/sh #!/bin/sh
rm -rf ./src/tmp/* || exit 1 rm -rf ./src/tmp/* || exit 1
vers=1.0.5 vers=1.0.7
cd .. || exit 1 cd .. || exit 1
...@@ -24,6 +24,8 @@ rm -rf enhanced_tightvnc_viewer_windows_only-${vers}* ...@@ -24,6 +24,8 @@ rm -rf enhanced_tightvnc_viewer_windows_only-${vers}*
cp -pR enhanced_tightvnc_viewer enhanced_tightvnc_viewer_windows_only-$vers cp -pR enhanced_tightvnc_viewer enhanced_tightvnc_viewer_windows_only-$vers
rm -rf enhanced_tightvnc_viewer_windows_only-$vers/{src,bin,man}/* rm -rf enhanced_tightvnc_viewer_windows_only-$vers/{src,bin,man}/*
rm -rf enhanced_tightvnc_viewer_windows_only-$vers/bin/.linkin rm -rf enhanced_tightvnc_viewer_windows_only-$vers/bin/.linkin
rm -rf enhanced_tightvnc_viewer_windows_only-$vers/MacOSX
rm -rf enhanced_tightvnc_viewer_windows_only-$vers/Unix
cp -p enhanced_tightvnc_viewer/bin/util/ssl_tightvncviewer.tcl enhanced_tightvnc_viewer_windows_only-$vers/Windows/util cp -p enhanced_tightvnc_viewer/bin/util/ssl_tightvncviewer.tcl enhanced_tightvnc_viewer_windows_only-$vers/Windows/util
rm -f enhanced_tightvnc_viewer_windows_only-$vers.zip rm -f enhanced_tightvnc_viewer_windows_only-$vers.zip
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment