Fix reviews
This commit is contained in:
1 parent
f8fa68b5b6
commit
792d589f2b
4 files changed
+39
-14
No files matched your search
@@ -13,25 +13,39 @@ if not exist "%dirpath%\env" (
|
|||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
REM Check if pyinstaller and pywin32 is installed in the virtual environment
|
REM Check if PyInstaller and pywin32 is installed in the virtual environment
|
||||||
if not exist "%dirpath%\env\scripts\pyinstaller.exe" (
|
if not exist "%dirpath%\env\scripts\pyinstaller.exe" (
|
||||||
|
echo Installing PyInstaller...
|
||||||
"%dirpath%\env\scripts\pip" install pyinstaller
|
"%dirpath%\env\scripts\pip" install pyinstaller
|
||||||
if errorlevel 1 (
|
if errorlevel 1 (
|
||||||
echo Failed to install pyinstaller.
|
echo:
|
||||||
|
echo Failed to install PyInstaller.
|
||||||
|
echo:
|
||||||
|
pause
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
"%dirpath%\env\scripts\python" "%dirpath%\env\scripts\pywin32_postinstall.py" -install -silent
|
"%dirpath%\env\scripts\python" "%dirpath%\env\scripts\pywin32_postinstall.py" -install -silent
|
||||||
if errorlevel 1 (
|
if errorlevel 1 (
|
||||||
|
echo:
|
||||||
echo Failed to run pywin32_postinstall.py.
|
echo Failed to run pywin32_postinstall.py.
|
||||||
|
echo:
|
||||||
|
pause
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
REM Run pyinstaller with the specified build spec file
|
REM Run PyInstaller with the specified build spec file
|
||||||
|
echo Building...
|
||||||
"%dirpath%\env\scripts\pyinstaller" "%dirpath%\build.spec"
|
"%dirpath%\env\scripts\pyinstaller" "%dirpath%\build.spec"
|
||||||
if errorlevel 1 (
|
if errorlevel 1 (
|
||||||
|
echo:
|
||||||
echo PyInstaller build failed.
|
echo PyInstaller build failed.
|
||||||
|
echo:
|
||||||
|
pause
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
echo:
|
||||||
echo Build completed successfully.
|
echo Build completed successfully.
|
||||||
|
echo:
|
||||||
|
pause
|
||||||
@@ -11,26 +11,33 @@ if [ ! -d "$dirpath/env" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if pyinstaller is installed in the virtual environment
|
# Check if PyInstaller is installed in the virtual environment
|
||||||
if [ ! -f "$dirpath/env/bin/pyinstaller" ]; then
|
if [ ! -f "$dirpath/env/bin/pyinstaller" ]; then
|
||||||
echo
|
echo
|
||||||
echo "Installing pyinstaller..."
|
echo "Installing PyInstaller..."
|
||||||
"$dirpath/env/bin/pip" install pyinstaller
|
"$dirpath/env/bin/pip" install pyinstaller
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to install pyinstaller."
|
echo
|
||||||
|
echo "Failed to install PyInstaller."
|
||||||
|
echo
|
||||||
|
read -p "Press any key to continue..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run pyinstaller with the specified build spec file
|
# Run PyInstaller with the specified build spec file
|
||||||
echo
|
echo
|
||||||
echo "Running pyinstaller..."
|
echo "Running PyInstaller..."
|
||||||
"$dirpath/env/bin/pyinstaller" "$dirpath/build.spec"
|
"$dirpath/env/bin/pyinstaller" "$dirpath/build.spec"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
echo
|
||||||
echo "PyInstaller build failed."
|
echo "PyInstaller build failed."
|
||||||
|
echo
|
||||||
|
read -p "Press any key to continue..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Build completed successfully."
|
echo "Build completed successfully."
|
||||||
|
echo
|
||||||
read -p "Press any key to continue..."
|
read -p "Press any key to continue..."
|
||||||
+5
-3
@@ -7,6 +7,7 @@ if "%dirpath:~-1%" == "\" set "dirpath=%dirpath:~0,-1%"
|
|||||||
REM Check if git is installed
|
REM Check if git is installed
|
||||||
git --version > nul 2>&1
|
git --version > nul 2>&1
|
||||||
if %errorlevel% NEQ 0 (
|
if %errorlevel% NEQ 0 (
|
||||||
|
echo:
|
||||||
echo No git executable found in PATH!
|
echo No git executable found in PATH!
|
||||||
echo:
|
echo:
|
||||||
pause
|
pause
|
||||||
@@ -31,16 +32,17 @@ REM Activate the virtual environment and install requirements
|
|||||||
echo:
|
echo:
|
||||||
echo Installing requirements.txt...
|
echo Installing requirements.txt...
|
||||||
"%dirpath%\env\scripts\python" -m pip install -U pip
|
"%dirpath%\env\scripts\python" -m pip install -U pip
|
||||||
|
|
||||||
"%dirpath%\env\scripts\pip" install wheel
|
"%dirpath%\env\scripts\pip" install wheel
|
||||||
|
|
||||||
"%dirpath%\env\scripts\pip" install -r "%dirpath%\requirements.txt"
|
"%dirpath%\env\scripts\pip" install -r "%dirpath%\requirements.txt"
|
||||||
if %errorlevel% NEQ 0 (
|
if %errorlevel% NEQ 0 (
|
||||||
|
echo:
|
||||||
echo Failed to install requirements.
|
echo Failed to install requirements.
|
||||||
|
echo:
|
||||||
|
pause
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
echo All done!
|
echo Environment setup completed successfully.
|
||||||
echo:
|
echo:
|
||||||
pause
|
pause
|
||||||
+5
-3
@@ -4,6 +4,7 @@ dirpath=$(dirname "$(readlink -f "$0")")
|
|||||||
|
|
||||||
# Check if git is installed
|
# Check if git is installed
|
||||||
if ! command -v git &> /dev/null; then
|
if ! command -v git &> /dev/null; then
|
||||||
|
echo
|
||||||
echo "No git executable found in PATH!"
|
echo "No git executable found in PATH!"
|
||||||
echo
|
echo
|
||||||
read -p "Press any key to continue..."
|
read -p "Press any key to continue..."
|
||||||
@@ -28,16 +29,17 @@ fi
|
|||||||
echo
|
echo
|
||||||
echo "Installing requirements.txt..."
|
echo "Installing requirements.txt..."
|
||||||
"$dirpath/env/bin/python" -m pip install -U pip
|
"$dirpath/env/bin/python" -m pip install -U pip
|
||||||
|
|
||||||
"$dirpath/env/bin/pip" install wheel
|
"$dirpath/env/bin/pip" install wheel
|
||||||
|
|
||||||
"$dirpath/env/bin/pip" install -r "$dirpath/requirements.txt"
|
"$dirpath/env/bin/pip" install -r "$dirpath/requirements.txt"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
echo
|
||||||
echo "Failed to install requirements."
|
echo "Failed to install requirements."
|
||||||
|
echo
|
||||||
|
read -p "Press any key to continue..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "All done!"
|
echo "Environment setup completed successfully."
|
||||||
echo
|
echo
|
||||||
read -p "Press any key to continue..."
|
read -p "Press any key to continue..."
|
||||||
Reference in new issue
Block a user