Skip to content
Snippets Groups Projects
Commit f442b624 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Added Windows setup tool

parent 24820926
No related branches found
No related tags found
No related merge requests found
# Helper setup tool to automatically build aidge_core on Windows.
# Requirements
################################################################################
# You have either VS BuildTools or VS Community already present on your
# system, with the build tools installed.
# If not, download Visual Studio Community here:
# https://visualstudio.microsoft.com/fr/vs/community/
# Make sure to install the "Desktop Development with C++" workload.
# Run this script in a Powershell console with Administrator rights in order to
# automatically install the dependencies, or just execute the second part if you
# already have all the dependencies satisfied.
# Enable or disable automatic installation of requirements
# Run .\setup.ps1 -install_reqs:$false to disable it
param ([bool]$install_reqs=$true)
# Default install path is .\install_cpp
if (-not $env:AIDGE_INSTALL_PATH)
{
$env:AIDGE_INSTALL_PATH = $(Join-Path $pwd install_cpp)
}
# 1. Setup environment
################################################################################
if ($install_reqs)
{
# Install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# Install dependencies
choco install cmake.install --installargs '"ADD_CMAKE_TO_PATH=System"' -Y
choco install git -Y
choco install python -Y
# Update PATH
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
}
# 2. Compile & install aidge_core
################################################################################
md -Force build_cpp
md -Force $env:AIDGE_INSTALL_PATH
cd build_cpp
cmake -DCMAKE_INSTALL_PREFIX:PATH=$env:AIDGE_INSTALL_PATH -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . -j2
cmake --install . --config Debug
# Optional: run the unit tests
ctest --output-on-failure
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment