mirror of https://github.com/oxen-io/lokinet
MacOS scripts to create package installer
This commit is contained in:
parent
c5c64731e7
commit
1344095a06
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<installer-gui-script minSpecVersion="1">
|
||||
<title>LokiNET</title>
|
||||
<organization>network.loki</organization>
|
||||
<domains enable_localSystem="true"/>
|
||||
<options customize="never" require-scripts="true" rootVolumeOnly="true" />
|
||||
<!-- Define documents displayed at various steps -->
|
||||
<welcome file="welcome.html" mime-type="text/html" />
|
||||
<license file="license.html" mime-type="text/html" />
|
||||
<conclusion file="conclusion.html" mime-type="text/html" />
|
||||
<!-- List all component packages -->
|
||||
<pkg-ref id="network.loki.lokinet"
|
||||
version="0.4"
|
||||
auth="root">lokinet.pkg</pkg-ref>
|
||||
<!-- List them again here. They can now be organized
|
||||
as a hierarchy if you want. -->
|
||||
<choices-outline>
|
||||
<line choice="network.loki.lokinet"/>
|
||||
</choices-outline>
|
||||
<!-- Define each choice above -->
|
||||
<choice
|
||||
id="network.loki.lokinet"
|
||||
visible="false"
|
||||
title="LokiNET"
|
||||
description="Anonymous network layer onion router"
|
||||
start_selected="true">
|
||||
<pkg-ref id="network.loki.lokinet"/>
|
||||
</choice>
|
||||
</installer-gui-script>
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
VERSION=$1
|
||||
|
||||
echo "Copying latest build"
|
||||
mkdir -p osx-pkg/usr/local/bin
|
||||
cp ../lokinet osx-pkg/usr/local/bin
|
||||
# just incase they want to switch networks later
|
||||
cp ../lokinet-bootstrap osx-pkg/usr/local/bin
|
||||
|
||||
echo "Building package $VERSION"
|
||||
mkdir -p pkg1
|
||||
rm pkg1/lokinet.pkg
|
||||
pkgbuild --root osx-pkg --scripts scripts --identifier network.loki.lokinet --version $VERSION pkg1/lokinet.pkg
|
||||
rm lokinet-v0.4.pkg
|
||||
productbuild --distribution distribution.xml --resources resources --package-path pkg1 --version $VERSION lokinet-v$VERSION.pkg
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
IRC or Discord is likely the best place for help with LokiNET
|
||||
|
||||
IRC: #llarp on irc.freenode.org
|
|
@ -0,0 +1,23 @@
|
|||
LokiNET is the reference implementation of LLARP (Low Latency Anonymous
|
||||
Routing Protocol) and is licensed under ZLIB license, however the protocol
|
||||
specifications are placed into the public domian using the CC0 License.
|
||||
|
||||
Copyright (c) 2018-2019 The Loki Project
|
||||
Copyright (c) 2018-2019 Jeff Becker
|
||||
Windows NT port and portions Copyright (c) 2018-2019 Rick V.
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
|
@ -0,0 +1,7 @@
|
|||
Hi, welcome to LokiNET public alpha!
|
||||
|
||||
LokiNET is a private, decentralized and Market based, Sybil resistant overlay network for the internet.
|
||||
|
||||
This package contains the reference implementation of LLARP.
|
||||
|
||||
This software is in a very early stage where there's much work to be done.
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
echo "Running postinstall" > /tmp/lokinet_postinstall.log
|
||||
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
rm $HOME/.lokinet/*.signed >> /tmp/lokinet_postinstall.log
|
||||
rm $HOME/.lokinet/*.key >> /tmp/lokinet_postinstall.log
|
||||
rm $HOME/.lokinet/*.private >> /tmp/lokinet_postinstall.log
|
||||
rm -fr $HOME/.lokinet/netdb >> /tmp/lokinet_postinstall.log
|
||||
|
||||
url="https://i2p.rocks/i2procks.signed"
|
||||
echo "downloading $url" >> /tmp/lokinet_postinstall.log
|
||||
echo "to $HOME/.lokinet/bootstrap.signed" >> /tmp/lokinet_postinstall.log
|
||||
|
||||
# use temp file to not overrwrite existing bootstrap file on fail
|
||||
tmp=/tmp/bootstrap.tmp
|
||||
|
||||
# MacOS does not have wget without homebrew but does have curl
|
||||
# Rick also had indicated most BSDs have curl too
|
||||
curl "$url" > "$tmp" && \
|
||||
(mv "$tmp" "$HOME/.lokinet/bootstrap.signed" && echo "${GREEN}lokinet successfully bootstrapped${NC}" >> /tmp/lokinet_postinstall.log) \
|
||||
|| echo "${RED}failed to download bootstrap from $url${NC}" >> /tmp/lokinet_postinstall.log
|
||||
rm -f "$tmp"
|
||||
|
||||
exit 0 # all good
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
echo "Running preinstall" > /tmp/lokinet_preinstall.log
|
||||
if [ ! -d "$HOME/.lokinet" ]
|
||||
then
|
||||
mkdir $HOME/.lokinet >> /tmp/lokinet_preinstall.log
|
||||
fi
|
||||
find $HOME/.lokinet >> /tmp/lokinet_preinstall.log
|
||||
exit 0 # all good
|
Loading…
Reference in New Issue