From bf7c97d125bbbc3d189e697db9610659c1cb5333 Mon Sep 17 00:00:00 2001 From: OleSTEEP Date: Sat, 4 May 2024 23:51:40 +0300 Subject: [PATCH] Add venv creation message --- build.bat | 6 ++++++ build.sh | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/build.bat b/build.bat index def90d6..237c7e3 100644 --- a/build.bat +++ b/build.bat @@ -1,4 +1,6 @@ @Echo off +if not defined VIRTUAL_ENV goto :venv_error + mkdir output mkdir output\bin python -m pip install -r FFMpeg-Compressor\requirements.txt || goto :exit @@ -12,6 +14,10 @@ move /Y output\rendroid-unpack.exe output\bin python -m nuitka --jobs=%NUMBER_OF_PROCESSORS% --output-dir=output --follow-imports --onefile --output-filename=vnds2renpy VNDS-to-RenPy/convert.py || goto :exit move /Y output\vnds2renpy.exe output\bin +:venv_error +echo "Please create and activate venv before running this script: python -m venv .\venv && .\venv\Scripts\activate.bat" +goto :exit + :exit pause exit /b %exitlevel% \ No newline at end of file diff --git a/build.sh b/build.sh index 53caada..7e21bbf 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,11 @@ -#!/bin/bash +#!/usr/bin/env bash set -e +if [[ "$VIRTUAL_ENV" == "" ]] +then + echo -e "Please create and activate venv before running this script: \033[100mpython3 -m venv venv && source ./venv/bin/activate\033[49m" + exit +fi + mkdir -p output mkdir -p output/bin python3 -m pip install -r FFMpeg-Compressor/requirements.txt