Commit 8420f444 by Csók Tamás

client: corrected the problematic situation where python was installed without easy_install

parent 088e890b
......@@ -27,6 +27,8 @@ IF NOT "%3"=="" (
)
)
SET "32PythonOn64=False"
:BatchCheckElevated
:-------------------------------------
REM --> Check for permissions
......@@ -72,6 +74,7 @@ SET index=8
if "!architecture!"=="64" (
if "%python_registry%"=="" (
SET "python_registry=Wow6432Node\"
SET "32PythonOn64=True"
GOTO PYTHON_CHECK
) else (
GOTO NOPYTHON
......@@ -97,14 +100,14 @@ IF NOT "!output_on_screen!"=="False" (
IF NOT "!output_on_screen!"=="False" (
@echo 64 bit system detected, commencing the install
)
start /WAIT ^"%running_directory%x64^\python-2.7.7.amd64.msi^"
start "Phyton Installer" /WAIT ^"%running_directory%x64^\python-2.7.7.amd64.msi^"
GOTO NOWHASPYTHON
)
if "!architecture!"=="32" (
IF NOT "!output_on_screen!"=="False" (
@echo 32 bit system detected, commencing the install
)
start /WAIT ^"%running_directory%x86^\python-2.7.7.msi^"
start "Phyton Installer" /WAIT ^"%running_directory%x86^\python-2.7.7.msi^"
GOTO NOWHASPYTHON
)
GOTO ERR
......@@ -162,22 +165,30 @@ IF NOT "!output_on_screen!"=="False" (
goto loop
) else (
set test=%install_path:~0,-1%
call ^"%running_directory%inPath^" ^"test^" && (IF NOT "!output_on_screen!"=="False" (@echo %test% is already in PATH)) || (call ^"%running_directory%addPath^" ^"test^" & setx>nul PATH "%PATH%;%test%" /m & IF NOT "!output_on_screen!"=="False" ( @echo %test% set to PATH))
call ^"%running_directory%inPath^" ^"test^" && (IF NOT "!output_on_screen!"=="False" (@echo !test! is already in PATH)) || (call ^"%running_directory%addPath^" ^"test^" & setx>nul PATH "%PATH%;!test!" /m & IF NOT "!output_on_screen!"=="False" ( @echo !test! set to PATH))
set test=%install_path%Scripts
call ^"%running_directory%inPath^" ^"test^" && (IF NOT "!output_on_screen!"=="False" (@echo %test% is already in PATH)) || (call ^"%running_directory%addPath^" ^"test^" & setx>nul PATH "%PATH%;%test%" /m & IF NOT "!output_on_screen!"=="False" ( @echo %test% set to PATH))
call ^"%running_directory%inPath^" ^"test^" && (IF NOT "!output_on_screen!"=="False" (@echo !test! is already in PATH)) || (call ^"%running_directory%addPath^" ^"test^" & setx>nul PATH "%PATH%;!test!" /m & IF NOT "!output_on_screen!"=="False" ( @echo !test! set to PATH))
)
GOTO PIP_INSTALL
:INSTALL_EASY_INSTALL
IF NOT "!output_on_screen!"=="False" (
@echo Failed. Commencing installation of easy_install
CALL python ^"%running_directory%ez_setup.py^" >nul 2>&1
) else (
CALL python ^"%running_directory%ez_setup.py^" >nul 2>&1
)
@echo Done.
GOTO PIP_INSTALL
:PIP_INSTALL
IF NOT "!output_on_screen!"=="False" (
@echo Commencing PIP reinstall to solve compatibility issues
)
IF NOT "!output_on_screen!"=="False" (
CALL easy_install pip
) else (
CALL easy_install pip >nul 2>&1
)
IF ERRORLEVEL 1 GOTO INSTALL_EASY_INSTALL
SET "pip_program=requirements.txt"
IF NOT "!output_on_screen!"=="False" (
@echo Installing python modules
......@@ -209,9 +220,9 @@ IF NOT "!output_on_screen!"=="False" (
call python %running_directory%pywin_installer.py
) else (
IF NOT "!output_on_screen!"=="False" (
call python -m pip install -r requirements.txt
call python -m pip install -r !pip_program!
) else (
call python -m pip install -r requirements.txt >nul 2>&1
call python -m pip install -r !pip_program! >nul 2>&1
)
)
goto CHECK_PACKAGE_LIST
......@@ -428,7 +439,6 @@ IF NOT "!output_on_screen!"=="False" (
xcopy>nul "%running_directory%windowsclasses.py" "%install_location%\" /y
xcopy>nul "%running_directory%nxkey.py" "%install_location%\" /y
xcopy>nul "%running_directory%OrderedDict.py" "%install_location%\" /y
xcopy>nul "%running_directory%cloud.ico" "%install_location%\" /y
xcopy>nul "%running_directory%putty.exe" "%install_location%\" /y
IF NOT "!output_on_screen!"=="False" (
@echo Done
......@@ -446,9 +456,9 @@ if NOT "!browserToUse!"=="" (
SET "selenium_driver= -d !browserToUse!"
)
IF NOT "!output_on_screen!"=="False" (
call python ^"%running_directory%win_install.py!selenium_driver!^" ^-l "%install_location%\\"!create_url_icon!!website!
call python ^"%running_directory%win_install.py^"!selenium_driver! ^-l "%install_location%\\"!create_url_icon!!website!
) else (
call python ^"%running_directory%win_install.py!selenium_driver!^" ^-l "%install_location%\\"!create_url_icon!!website! >nul 2>&1
call python ^"%running_directory%win_install.py^"!selenium_driver! ^-l "%install_location%\\"!create_url_icon!!website! >nul 2>&1
)
IF NOT "!output_on_screen!"=="False" (
@echo Done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment