Commit dedb333 1 parent e85f96f commit dedb333 Copy full SHA for dedb333
File tree 3 files changed +35
-4
lines changed
3 files changed +35
-4
lines changed Original file line number Diff line number Diff line change 24
24
25
25
26
26
def install_dependencies (minifi_options : MinifiOptions , package_manager : PackageManager ) -> bool :
27
- return install_required (minifi_options , package_manager )
28
-
27
+ res = install_required (minifi_options , package_manager )
28
+ print ("Installation went smoothly" if res else "There were some error during installation" )
29
+ return False
29
30
30
31
def run_cmake (minifi_options : MinifiOptions , package_manager : PackageManager ):
31
32
if not os .path .exists (minifi_options .build_dir ):
32
33
os .mkdir (minifi_options .build_dir )
33
34
cmake_cmd = f"cmake -G Ninja { minifi_options .create_cmake_options_str ()} { minifi_options .source_dir } -B { minifi_options .build_dir } "
34
- return package_manager .run_cmd (cmake_cmd )
35
+ res = package_manager .run_cmd (cmake_cmd )
36
+ print ("CMake command run successfully" if res else "CMake command run unsuccessfully" )
37
+ return False
35
38
36
39
37
40
def do_build (minifi_options : MinifiOptions , package_manager : PackageManager ):
38
41
build_cmd = f"cmake --build { str (minifi_options .build_dir )} "
39
- return package_manager .run_cmd (build_cmd )
42
+ res = package_manager .run_cmd (build_cmd )
43
+ print ("Build was successful" if res else "Build was unsuccessful" )
44
+ return res
40
45
41
46
42
47
def do_one_click_build (minifi_options : MinifiOptions , package_manager : PackageManager ) -> bool :
Original file line number Diff line number Diff line change 1
1
@ echo off
2
2
3
+ REM Check if Python is installed
4
+ where python > nul 2 >& 1
5
+ if %errorlevel% neq 0 (
6
+ echo Python is not installed
7
+ exit /b 1
8
+ )
9
+
10
+ REM Check if venv module is available
11
+ python -m venv --help > nul 2 >& 1
12
+ if %errorlevel% neq 0 (
13
+ echo venv module is not available
14
+ exit /b 1
15
+ )
16
+
3
17
set " SCRIPT_DIR = %~dp0 "
4
18
set " VENV_DIR = %SCRIPT_DIR% venv"
5
19
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ # Check if Python is installed
4
+ if ! command -v python3 & > /dev/null; then
5
+ echo " Python is not installed"
6
+ exit 1
7
+ fi
8
+
9
+ # Check if virtualenv is installed
10
+ if ! command -v virtualenv & > /dev/null; then
11
+ echo " virtualenv is not installed"
12
+ exit 1
13
+ fi
14
+
3
15
SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
4
16
VENV_DIR=" $SCRIPT_DIR /venv"
5
17
You can’t perform that action at this time.
0 commit comments