Improvements and comments in build scripts
This commit is contained in:
parent
4a49f6ead1
commit
cc507148fd
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# Just build all projects with msbuild
|
||||||
echo "Preparing to build MelonVPN"
|
echo "Preparing to build MelonVPN"
|
||||||
msbuild MelonVPN.sln -m /t:MelonVPNCore /t:MelonVPNConnectedClientUpdate /t:MelonVPNDaemon /t:MelonVPNClient /p:Configuration=Release /p:Platform=x86
|
msbuild MelonVPN.sln -m /t:MelonVPNCore /t:MelonVPNConnectedClientUpdate /t:MelonVPNDaemon /t:MelonVPNClient /p:Configuration=Release /p:Platform=x86
|
||||||
echo "Run \"./install\" to install all the components for MelonVPN"
|
|
||||||
|
@ -1,30 +1,56 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# new lib folder
|
||||||
sudo mkdir -p /usr/lib/melon-vpn/
|
sudo mkdir -p /usr/lib/melon-vpn/
|
||||||
|
|
||||||
|
# copying
|
||||||
sudo cp MelonVPNCore/bin/Release/MelonVPNCore.dll /usr/lib/melon-vpn/
|
sudo cp MelonVPNCore/bin/Release/MelonVPNCore.dll /usr/lib/melon-vpn/
|
||||||
|
sudo cp MelonVPNCore/bin/Release/Newtonsoft.Json.dll /usr/lib/melon-vpn/
|
||||||
sudo cp MelonVPNConnectedClientUpdate/bin/Release/MelonVPNConnectedClientUpdate.exe /usr/lib/melon-vpn/
|
sudo cp MelonVPNConnectedClientUpdate/bin/Release/MelonVPNConnectedClientUpdate.exe /usr/lib/melon-vpn/
|
||||||
sudo cp MelonVPNDaemon/bin/Release/MelonVPNDaemon.exe /usr/lib/melon-vpn/
|
sudo cp MelonVPNDaemon/bin/Release/MelonVPNDaemon.exe /usr/lib/melon-vpn/
|
||||||
|
|
||||||
|
# check if daemon service exists
|
||||||
if [ -f /etc/systemd/system/melonvpndaemon.service ]; then
|
if [ -f /etc/systemd/system/melonvpndaemon.service ]; then
|
||||||
echo "[info] Found daemon service at \"/etc/systemd/system/melonvpndaemon.service\" delete this to reinstall the default service"
|
echo "[info] Found daemon service at \"/etc/systemd/system/melonvpndaemon.service\" delete this to reinstall the default service"
|
||||||
else
|
else
|
||||||
sudo cp MelonVPNDaemon/bin/Release/melonvpndaemon.service /etc/systemd/system/
|
sudo cp MelonVPNDaemon/bin/Release/melonvpndaemon.service /etc/systemd/system/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# make client config folder
|
||||||
sudo mkdir -p /etc/melon-vpn/
|
sudo mkdir -p /etc/melon-vpn/
|
||||||
|
|
||||||
|
# check if client config exists
|
||||||
if [ -f /etc/melon-vpn/client.cfg ]; then
|
if [ -f /etc/melon-vpn/client.cfg ]; then
|
||||||
echo "[info] Found config at \"/etc/melon-vpn/client.cfg\" delete this to reinstall the default config"
|
echo "[info] Found config at \"/etc/melon-vpn/client.cfg\" delete this to reinstall the default config"
|
||||||
else
|
else
|
||||||
sudo cp MelonVPNDaemon/bin/Release/client.cfg /etc/melon-vpn/
|
sudo cp MelonVPNDaemon/bin/Release/client.cfg /etc/melon-vpn/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check if desktop file exists
|
||||||
if [ -f /usr/share/applications/melonvpn.desktop ]; then
|
if [ -f /usr/share/applications/melonvpn.desktop ]; then
|
||||||
echo "[info] Found desktop file at \"/usr/share/applications/melonvpn.desktop\" delete this to reinstall the default one"
|
echo "[info] Found desktop file at \"/usr/share/applications/melonvpn.desktop\" delete this to reinstall the default one"
|
||||||
else
|
else
|
||||||
sudo cp MelonVPNClient/bin/Release/melonvpn.desktop /usr/share/applications/
|
sudo cp MelonVPNClient/bin/Release/melonvpn.desktop /usr/share/applications/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# change client config to be owned by root
|
||||||
sudo chown root:root /etc/melon-vpn/client.cfg
|
sudo chown root:root /etc/melon-vpn/client.cfg
|
||||||
|
|
||||||
|
# copy more files
|
||||||
sudo cp MelonVPNClient/bin/Release/MelonVPNClient.exe /usr/lib/melon-vpn/
|
sudo cp MelonVPNClient/bin/Release/MelonVPNClient.exe /usr/lib/melon-vpn/
|
||||||
sudo cp MelonVPNClient/bin/Release/MelonVPNClient.exe.config /usr/lib/melon-vpn/
|
sudo cp MelonVPNClient/bin/Release/MelonVPNClient.exe.config /usr/lib/melon-vpn/
|
||||||
|
sudo cp MelonVPNClient/bin/Release/MiniMelonVPNIcon.png /usr/lib/melon-vpn/
|
||||||
|
sudo cp MelonVPNClient/bin/Release/MiniMelonVPNOnline.png /usr/lib/melon-vpn/
|
||||||
|
sudo cp MelonVPNClient/bin/Release/MelonVPNDesktopIcon.png /usr/lib/melon-vpn/
|
||||||
|
|
||||||
|
# make all exe files in melon vpn projects executable
|
||||||
|
sudo chmod +x /usr/lib/melon-vpn/*.exe
|
||||||
|
|
||||||
|
# so its on path now?
|
||||||
sudo cp MelonVPNClient/bin/Release/melonvpnclient /usr/bin/
|
sudo cp MelonVPNClient/bin/Release/melonvpnclient /usr/bin/
|
||||||
sudo chmod +x /usr/bin/melonvpnclient
|
sudo chmod +x /usr/bin/melonvpnclient
|
||||||
|
|
||||||
echo "[info] Restarting daemon"
|
echo "[info] Restarting daemon"
|
||||||
|
# cuz science
|
||||||
sudo systemctl stop melonvpndaemon
|
sudo systemctl stop melonvpndaemon
|
||||||
sudo systemctl disable melonvpndaemon
|
sudo systemctl disable melonvpndaemon
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
|
@ -1,16 +1,24 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# Check if golang exists by the output of "go version"
|
||||||
if [ "$(go version | head -c 13)" == "go version go" ]; then
|
if [ "$(go version | head -c 13)" == "go version go" ]; then
|
||||||
echo "Assuming go is installed"
|
echo "Assuming go is installed"
|
||||||
|
|
||||||
|
# Check location for simple vpn binary
|
||||||
if [ -f /usr/bin/simple-vpn ]; then
|
if [ -f /usr/bin/simple-vpn ]; then
|
||||||
echo "Found \"/usr/bin/simple-vpn\" assuming it is installed correctly"
|
echo "Found \"/usr/bin/simple-vpn\" assuming it is installed correctly"
|
||||||
else
|
else
|
||||||
|
# Clone github repo
|
||||||
echo "Cloning simple-vpn"
|
echo "Cloning simple-vpn"
|
||||||
git clone https://github.com/skx/simple-vpn
|
git clone https://codehub.onpointcoding.net/sean/simple-vpn.git
|
||||||
cd simple-vpn
|
cd simple-vpn
|
||||||
|
|
||||||
|
# Build and copy binary to bin directory
|
||||||
echo "Installing simple-vpn"
|
echo "Installing simple-vpn"
|
||||||
go build
|
go build
|
||||||
sudo cp ./simple-vpn /usr/bin/ -i
|
sudo cp ./simple-vpn /usr/bin/ -i
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
# Remove repository
|
||||||
echo "Cleaning up"
|
echo "Cleaning up"
|
||||||
rm simple-vpn -rf
|
rm simple-vpn -rf
|
||||||
echo "Components installed..."
|
echo "Components installed..."
|
||||||
@ -19,4 +27,3 @@ else
|
|||||||
echo "Please install golang before continuing"
|
echo "Please install golang before continuing"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
echo "Run \"./build\" to continue with installing MelonVPN"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user