Project restart
This commit is contained in:
30
scripts/build_env.sh
Executable file
30
scripts/build_env.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z $PY_VENV_DIR ]; then
|
||||
echo "PY_VENV_DIR must be defined"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ -z $REQ_PATH ]; then
|
||||
echo "REQ_PATH must be defined"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ "$1" == "clean" ]; then
|
||||
rm -Rf "$PY_VENV_DIR"
|
||||
fi
|
||||
|
||||
# Check if venv is installed
|
||||
python3 -c "import venv"
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "venv must be installed on the host distribution."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Install the virtual environment if needed
|
||||
if [ ! -d "$PY_VENV_DIR" ]; then
|
||||
echo "Creation of the virtual environment"
|
||||
python3 -m venv "$PY_VENV_DIR"
|
||||
source "$PY_VENV_DIR/bin/activate"
|
||||
pip install --extra-index-url https://pypi.python.org/pypi -r $REQ_PATH
|
||||
fi
|
||||
32
scripts/qt_generate.sh
Executable file
32
scripts/qt_generate.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR=$(realpath $( dirname "$0"))
|
||||
MAIN_DIR=${SCRIPT_DIR}/../src/testium
|
||||
|
||||
EXE_UI=pyside6-uic
|
||||
EXE_RCC=pyside6-rcc
|
||||
|
||||
UIFILES="main_win/testium_core_win.ui"
|
||||
UIFILES+=" main_win/about_win/about_win.ui"
|
||||
UIFILES+=" main_win/preference_win/preference_core_win.ui"
|
||||
UIFILES+=" main_win/f1_win/f1_win_core.ui"
|
||||
UIFILES+=" interpreter/test_items/dialog_choices_files/choices_dialog_win.ui"
|
||||
UIFILES+=" interpreter/test_items/dialog_image_files/dialog_image_win.ui"
|
||||
UIFILES+=" interpreter/test_items/dialog_note_files/dialog_note_win.ui"
|
||||
UIFILES+=" interpreter/test_items/dialog_sleep_files/dialog_sleep_win.ui"
|
||||
UIFILES+=" interpreter/test_items/dialog_value_files/dialog_value_win.ui"
|
||||
UIFILES+=" interpreter/test_items/tested_references_files/tested_refs_win.ui"
|
||||
|
||||
RCFILES="main_win/resources/testium_core_win.qrc"
|
||||
RCFILES+=" main_win/resources/about_win.qrc"
|
||||
RCFILES+=" main_win/resources/f1_win.qrc"
|
||||
|
||||
for f in ${UIFILES}
|
||||
do
|
||||
${EXE_UI} "${MAIN_DIR}/$f" > "${MAIN_DIR}/${f%.*}.py"
|
||||
done
|
||||
|
||||
for f in ${RCFILES}
|
||||
do
|
||||
${EXE_RCC} "${MAIN_DIR}/$f" > "${MAIN_DIR}/${f%.*}_rc.py"
|
||||
done
|
||||
8
scripts/set_env.sh
Executable file
8
scripts/set_env.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z $PY_VENV_DIR ]; then
|
||||
echo "PY_VENV_NAME must be defined"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
source "$PY_VENV_DIR/bin/activate"
|
||||
Reference in New Issue
Block a user