source: installer/resources/postinstall.sh @ 2c0e6a3

Last change on this file since 2c0e6a3 was b2e8d3c, checked in by kytv <kytv@…>, 9 years ago

Here is the long awaited upgrade of the wrapper.

The aging v3.1.x of the java wrapper is being replaced in this
checkin with the latest (current) stable release, 3.5.9.

There is now only one copy of wrapper.jar, located in wrapper/all.
The build.xml scripts have been changed to reflect this new path.

All binaries—with the exception of solaris (I don't have
SPARC hardware)—have been stripped.

FreeBSD x64 is being included in this release.

I have only included the x86 macosx wrapper due to not having a
system to test the x64 code on. On the plus side, the wrapper is
universal (a FAT powerpc & Intel Mac) binary. No more prompting
to install Rosetta!

  • Property mode set to 100644
File size: 2.0 KB
Line 
1#!/bin/sh
2
3# I2P Installer - Installs and pre-configures I2P.
4#
5# postinstall
6# 2004 The I2P Project
7# http://www.i2p2.de/
8# This code is public domain.
9#
10# author: hypercubus
11#
12# Installs the appropriate set of Java Service Wrapper support files for the
13# user's OS then launches the I2P router as a background service.
14
15if [ ! "X$1" = "X" ]; then
16    cd $1
17fi
18
19chmod 755 ./i2prouter
20# chmod 755 ./install_i2p_service_unix
21chmod 755 ./osid
22chmod 755 ./runplain.sh
23# chmod 755 ./uninstall_i2p_service_unix
24
25ERROR_MSG="Cannot determine operating system type. From the subdirectory in lib/wrapper matching your operating system, please move i2psvc to your base I2P directory, and move the remaining two files to the lib directory."
26
27HOST_OS=`./osid`
28
29if [ "X$HOST_OS" = "X" -o $HOST_OS = "unknown" ]; then
30    echo "$ERROR_MSG"
31    exit 1
32fi
33
34OS_ARCH=`uname -m`
35X86_64=`echo "${OS_ARCH}" | grep x86_64`
36
37case $HOST_OS in
38    debian | fedora | gentoo | linux | mandrake | redhat | suse )
39        if [ "X$X86_64" = "X" ]; then
40            wrapperpath="./lib/wrapper/linux"
41            cp ${wrapperpath}/libwrapper.so ./lib/
42        else
43            wrapperpath="./lib/wrapper/linux64"
44            cp ${wrapperpath}/libwrapper.so ./lib
45        fi
46        ;;
47    freebsd )
48        if [ ! `uname -m |grep amd64` ]; then
49            wrapperpath="./lib/wrapper/freebsd"
50            cp ${wrapperpath}/libwrapper.so ./lib/
51        else
52            wrapperpath="./lib/wrapper/freebsd64"
53            cp ${wrapperpath}/libwrapper.so ./lib/
54        fi
55        ;;
56    osx )
57        wrapperpath="./lib/wrapper/macosx"
58        cp ${wrapperpath}/libwrapper.jnilib ./lib/
59        ;;
60    solaris )
61        wrapperpath="./lib/wrapper/solaris"
62        cp ${wrapperpath}/libwrapper.so ./lib/
63        ;;
64    * )
65        echo "${ERROR_MSG}"
66        exit 1
67        ;;
68esac
69
70#cp $wrapperpath/wrapper.jar ./lib/
71cp $wrapperpath/i2psvc .
72chmod 755 ./eepget
73chmod 755 ./i2psvc
74rm -rf ./icons
75rm -rf ./lib/wrapper
76rm -f ./lib/*.dll
77rm -f ./*.bat
78rm -f ./*.exe
79rm -rf ./installer
80# no, let's not start the router from the install script any more
81# ./i2prouter start
82exit 0
83
Note: See TracBrowser for help on using the repository browser.