Work on scripts.

master
Dominik Deák 4 years ago
parent 295a4ed79f
commit fb937dfe51
No known key found for this signature in database
GPG Key ID: 85514EC0CCE7007C
  1. 0
      Documentation/BuildDarwin.md
  2. 36
      Scripts/Install/InstallDarwin.sh
  3. 35
      Scripts/Install/InstallLinux.sh
  4. 48
      Scripts/Install/InstallWindows.ps1
  5. 26
      Scripts/Install/PackageListAPT.txt
  6. 7
      Scripts/Install/PackageListChoco.config
  7. 0
      Scripts/Install/PackageListPython.txt
  8. 11
      Scripts/Tools/InstallToolsDarwin.sh
  9. 9
      Scripts/Tools/InstallToolsLinux.sh
  10. 23
      Scripts/Tools/InstallToolsWindows.ps1
  11. 7
      Scripts/Tools/UpdateToolsDarwin.sh
  12. 5
      Scripts/Tools/UpdateToolsLinux.sh
  13. 14
      Scripts/Tools/UpdateToolsWindows.ps1
  14. 2
      Scripts/build.py
  15. 44
      Scripts/install.py
  16. 30
      Scripts/update.py
  17. 2
      readme.md

@ -0,0 +1,36 @@
#!/bin/sh
install() {
sudo xcode-select --install || exit 1
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" || exit 1
brew install python git cmake libsodium openssl || exit 1
sudo pip3 install -r "${installToolsPath}/PackageListPython.txt" || exit 1
}
upgrade() {
brew upgrade || exit 1
sudo pip3 install -r "${installToolsPath}/PackageListPython.txt" --upgrade || exit 1
}
set -o nounset
installToolsPath="$(cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)"
if [ "${1}" = "--upgrade" ] || [ "${1}" = "-u" ]; then
upgrade
elif [ -z "${1}" ]; then
install
else
echo "error: Invalid argument. Use '--upgrade' switch to upgrade packages, or none to install packages."
exit 1
fi
exit 0

@ -0,0 +1,35 @@
#!/bin/sh
install() {
cat "${installToolsPath}/PackageListAPT.txt" | xargs sudo apt-get install -y || exit 1
sudo pip3 install -r "${installToolsPath}/PackageListPython.txt" || exit 1
}
upgrade() {
sudo apt-get upgrade
cat "${installToolsPath}/PackageListAPT.txt" | xargs sudo apt-get upgrade -y || exit 1
sudo pip3 install -r "${installToolsPath}/PackageListPython.txt" --upgrade || exit 1
}
set -o nounset
installToolsPath="$(cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)"
if [ "${1}" = "--upgrade" ] || [ "${1}" = "-u" ]; then
upgrade
elif [ -z "${1}" ]; then
install
else
echo "error: Invalid argument. Use '--upgrade' switch to upgrade packages, or none to install packages."
exit 1
fi
exit 0

@ -0,0 +1,48 @@
param( [ parameter( mandatory = $false ) ] [ switch ] $upgrade )
$installBlock =
{
param( [ string ] $installToolsPath )
Set-ExecutionPolicy Bypass -Scope Process -Force
[ System.Net.ServicePointManager ]::SecurityProtocol = [ System.Net.ServicePointManager ]::SecurityProtocol -bor 3072
iex ( ( New-Object System.Net.WebClient ).DownloadString( 'https://chocolatey.org/install.ps1' ) )
$packageListChocoPath = Join-Path -Path $installToolsPath -ChildPath "PackageListChoco.config"
choco install "$packageListChocoPath"
refreshenv
$packageListPythonPath = Join-Path -Path $installToolsPath -ChildPath "PackageListPython.txt"
pip3 install -r "$packageListPythonPath"
refreshenv
Write-Host "`nPress any key to continue..."
[ void ][ System.Console ]::ReadKey( $true )
}
$upgradeBlock =
{
param( [ string ] $installToolsPath )
$packageListChocoPath = Join-Path -Path $installToolsPath -ChildPath "PackageListChoco.config"
choco upgrade all
refreshenv
$packageListPythonPath = Join-Path -Path $installToolsPath -ChildPath "PackageListPython.txt"
pip3 install -r "$packageListPythonPath" --upgrade
refreshenv
Write-Host "`nPress any key to continue..."
[ void ][ System.Console ]::ReadKey( $true )
}
if ( $upgrade )
{
Start-Process powershell -Verb runAs -ArgumentList "-command & {$upgradeBlock} '$PSScriptRoot'"
}
else
{
Start-Process powershell -Verb runAs -ArgumentList "-command & {$installBlock} '$PSScriptRoot'"
}
exit 0

@ -0,0 +1,26 @@
alien
build-essential
build-essential
cmake
cmake
devscripts
g++
git
libavahi-compat-libdnssd-dev
libcurl4-openssl-dev
libegl1-mesa
libgl1-mesa-glx
libqt5svg5-dev
libsodium-dev
libssl-dev
libsystemd-dev
libx11-dev
make
python3
python3-pip
python3-setuptools
qtbase5-dev
qtcreator
qtdeclarative5-dev
qttools5-dev
xorg-dev

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="git" />
<package id="python3" />
<package id="cmake" installArguments="ADD_CMAKE_TO_PATH=System" />
</packages>

@ -1,11 +0,0 @@
#!/bin/sh
scriptPath="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install python git cmake libsodium openssl
sudo pip3 install -r "${scriptPath}/ToolRequirements.txt"

@ -1,9 +0,0 @@
#!/bin/sh
scriptPath="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
sudo apt-get update
sudo apt-get install -y build-essential python3 python3-pip python3-setuptools git cmake build-essential devscripts alien
sudo pip3 install -r "${scriptPath}/ToolRequirements.txt"

@ -1,23 +0,0 @@
$scriptBlock =
{
Write-Host "Installing tool..."
Set-ExecutionPolicy Bypass -Scope Process -Force
[ System.Net.ServicePointManager ]::SecurityProtocol = [ System.Net.ServicePointManager ]::SecurityProtocol -bor 3072
iex ( ( New-Object System.Net.WebClient ).DownloadString( 'https://chocolatey.org/install.ps1' ) )
choco install python3 git
choco install cmake.install --installargs '"ADD_CMAKE_TO_PATH=System"'
refreshenv
pip3 install -r ToolRequirements.txt
refreshenv
Write-Host "`nPress any key to continue..."
[ void ][ System.Console ]::ReadKey( $true )
}
Start-Process powershell -Verb runAs -ArgumentList $scriptBlock
# Start-Process powershell -ArgumentList $scriptBlock -NoNewWindow

@ -1,7 +0,0 @@
#!/bin/sh
scriptPath="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
brew upgrade
sudo pip3 install -r "${scriptPath}/ToolRequirements.txt" --upgrade

@ -1,5 +0,0 @@
#!/bin/sh
scriptPath="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
sudo pip3 install -r "${scriptPath}/ToolRequirements.txt" --upgrade

@ -1,14 +0,0 @@
$scriptBlock =
{
choco upgrade all
pip3 install -r ToolRequirements.txt --upgrade
refreshenv
Write-Host "`nPress any key to continue..."
[ void ][ System.Console ]::ReadKey( $true )
}
Start-Process powershell -Verb runAs -ArgumentList $scriptBlock
# Start-Process powershell -ArgumentList $scriptBlock -NoNewWindow

@ -48,7 +48,7 @@ def buildProducts():
scripts = {
"Darwin" : "Scripts/Build/BuildDarwin.sh",
"Linux" : "Scripts/Build/BuildLinux.sh",
"Windows" : "Scripts/Build/BuildWindows.cmd",
"Windows" : "Scripts\\Build\\BuildWindows.cmd",
}
scriptPath = utility.joinPath( config.toplevelPath, scripts[ platform.system() ] )

@ -1,30 +1,36 @@
#!/usr/bin/env python3
import os, platform
import os, platform, sys
print( "Installing tools for platform " + platform.system() )
arguments = ""
toolsPath = os.path.join( os.path.dirname( os.path.realpath( __file__ ) ), "Tools" )
if len( sys.argv ) > 1:
if sys.argv[ 1 ] == "--upgrade":
arguments += "--upgrade"
elif sys.argv[ 1 ] == "-u":
arguments += "--upgrade"
else:
print( "error: Invalid argument. Use '--upgrade' switch to upgrade packages, or none to install packages." )
raise SystemExit( 1 )
if ( platform.system() == "Darwin" ):
basePath = os.path.dirname( os.path.realpath( __file__ ) )
command = os.path.join( toolsPath, "InstallToolsDarwin.sh" )
scripts = {
"Darwin" : "Install/InstallDarwin.sh",
"Linux" : "Install/InstallLinux.sh",
"Windows" : "Install\\InstallWindows.ps1",
}
os.system( command )
command = '"' + os.path.join( basePath, scripts[ platform.system() ] ) + '"'
elif ( platform.system() == "Linux" ):
if platform.system() == "Windows":
command = "powershell.exe -File " + command
arguments = arguments.replace( "--", "-" )
command = os.path.join( toolsPath, "InstallToolsLinux.sh" )
command += ' ' + arguments
os.system( command )
print( command )
elif ( platform.system() == "Windows" ):
command = os.path.join( toolsPath, "InstallToolsWindows.ps1" )
os.system( "powershell " + command )
else:
print( "Unrecognised platform: " + platform.system() )
raise SystemExit( 1 )
if os.system( command ) != 0:
print( "Command exited with error." )
raise SystemExit( 1 )

@ -1,30 +0,0 @@
#!/usr/bin/env python3
import os, platform
print( "Updating tools for platform " + platform.system() )
toolsPath = os.path.join( os.path.dirname( os.path.realpath( __file__ ) ), "Tools" )
if ( platform.system() == "Darwin" ):
command = os.path.join( toolsPath, "UpdateToolsDarwin.sh" )
os.system( command )
elif ( platform.system() == "Linux" ):
command = os.path.join( toolsPath, "UpdateToolsLinux.sh" )
os.system( command )
elif ( platform.system() == "Windows" ):
command = os.path.join( toolsPath, "UpdateToolsWindows.ps1" )
os.system( "powershell " + command )
else:
print( "Unrecognised platform: " + platform.system() )
raise SystemExit( 1 )

@ -29,7 +29,7 @@ The information presented here is based on the [official wiki pages](https://git
3. Building the Binaries
* [Building on Linux Mint / Ubuntu](./Documentation/BuildLinux.md)
* [Building on macOS](./Documentation/BuildMacOS.md)
* [Building on macOS](./Documentation/BuildDarwin.md)
* [Building on Windows](./Documentation/BuildWindows.md)
## Disclaimers and Legal

Loading…
Cancel
Save