-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathinstall.bat
More file actions
executable file
·65 lines (55 loc) · 2.23 KB
/
install.bat
File metadata and controls
executable file
·65 lines (55 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
::
:: SysML 2 Pilot Implementation
:: Copyright (C) 2020 California Institute of Technology ("Caltech")
:: Copyright (C) 2021 Twingineer LLC
:: Copyright (C) 2023 Model Driven Solutions, Inc.
::
:: This program is free software: you can redistribute it and/or modify
:: it under the terms of the GNU Lesser General Public License as published by
:: the Free Software Foundation, either version 3 of the License, or
:: (at your option) any later version.
::
:: This program is distributed in the hope that it will be useful,
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
:: GNU Lesser General Public License for more details.
:: You should have received a copy of the GNU Lesser General Public License
:: along with this program. If not, see <https://www.gnu.org/licenses/>.
::
:: @license LGPL-3.0-or-later <http://spdx.org/licenses/LGPL-3.0-or-later>
::
@echo off
set SYSML_VERSION="${project.version.unqualified}"
echo --- Step 1: Testing Conda installation ---
where conda
if errorlevel 1 (
echo Conda is not installed. Please install Conda and re-run.
goto :error
)
call conda --version || goto :error
echo --- Step 2: Testing Java installation ---
where java
if errorlevel 1 (
echo Java is not installed. Please install Java and re-run.
goto :error
)
call java -version || goto :error
echo --- Step 3: Installing Jupyter SysML kernel and dependencies ---
call jupyter kernelspec remove sysml -f >nul 2>&1
call conda install "jupyter-sysml-kernel=%SYSML_VERSION%" python=3.* jupyterlab=4.* graphviz=2.* nodejs -c conda-forge -y || goto:error
echo --- Step 4: Installing JupyterLab SysML extension ---
call jupyter labextension uninstall @systems-modeling/jupyterlab-sysml
call jupyter labextension install "@systems-modeling/jupyterlab-sysml@%SYSML_VERSION%" || goto:error
echo --- Step 5: Customizing JupyterLab ---
call python "%~dp0\install.py" || goto:error
echo --- Step 6: Running Jupyter environment ---
echo To launch JupyterLab you can now run ^"jupyter lab^" from Command Prompt.
echo Re-running this script is not necessary and will re-install the environment.
echo(
echo(
cmd /k
goto :EOF
:error
echo Failed with error #%errorlevel%.
pause
exit /b %errorlevel%