Skip to content

Commit dc8f719

Browse files
committed
Aggiunto Setup di installazione automatica
1 parent fce210d commit dc8f719

8 files changed

+37
-42
lines changed

Check and install Python.cmd 1_CheckPython.cmd

+16-19
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ python -V | find "Python" >NUL 2>NUL && (goto :PYTHON_DOES_EXIST)
1010
:PYTHON_DOES_NOT_EXIST
1111
@ echo Python non e' installato nel tuo sistema!
1212
@ echo Installero' per te python 3.8.0...
13-
14-
:: start "" "https://www.python.org/downloads/windows/"
15-
16-
/quiet InstallAllUsers=1 PrependPath=1 Include_test=0
1713
@ set dir=%~dp0
1814
@ set ps1="%TMP%\%~n0-%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.ps1"
1915
@ copy /b /y "%~f0" %ps1% >nul
2016
@ powershell -NoProfile -ExecutionPolicy Bypass -File %ps1% %*
2117
@ del /f %ps1%
22-
23-
@ PAUSE
2418
@ goto :EOF
2519

2620
:PYTHON_DOES_EXIST
2721
:: This will retrieve Python 3.8.0 for example.
2822
@ for /f "delims=" %%V in ('python -V') do @set ver=%%V
2923
@ echo Congratulazioni, %ver% e' installato correttamente !
30-
31-
@ PAUSE
24+
@ for /F "tokens=1,2 delims= " %%a in ('python -V') do (
25+
@ echo %%a
26+
@ echo %%b
27+
@ if /i %%b GEQ 3.7 echo YES
28+
@ if /i %%b LSS 3.7 (
29+
@ echo NO
30+
@ goto :PYTHON_DOES_NOT_EXIST)
31+
)
3232
@ goto :eof
3333
#>
3434

@@ -37,9 +37,13 @@ python -V | find "Python" >NUL 2>NUL && (goto :PYTHON_DOES_EXIST)
3737
# In this example, all arguments are echoed.
3838
$Args | % { 'arg #{0}: [{1}]' -f ++$i, $_ }
3939

40-
# This is the link to download Python 3.8.0 from Python.org
41-
# See https://www.python.org/downloads/
42-
$pythonUrl = "https://www.python.org/ftp/python/3.8.0/python-3.8.0-amd64.exe"
40+
$OSVersion = [Environment]::Is64BitOperatingSystem
41+
if($OSVersion){
42+
$pythonUrl = "https://www.python.org/ftp/python/3.8.0/python-3.8.0-amd64.exe"
43+
}else{
44+
$pythonUrl = "https://www.python.org/ftp/python/3.8.0/python-3.8.0.exe"
45+
}
46+
4347

4448
# This is the directory that the exe is downloaded to
4549
$tempDirectory = "C:\temp_provision\"
@@ -178,11 +182,4 @@ Param (
178182

179183
Add-EnvExtension '.PY'
180184
Add-EnvExtension '.PYW'
181-
Add-EnvPath 'C:\Python38\'
182-
183-
184-
185-
186-
187-
188-
185+
Add-EnvPath 'C:\Python38\'

2_InstallLibraries.cmd

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@ECHO OFF
2+
pip3 install -r requirements.txt
3+
EXIT /B

3_runLogsManager.cmd

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
title MyBatch
2+
nircmd.exe win hide ititle "MyBatch" cmdwait 0
3+
@ECHO OFF
4+
FOR /f %%p in ('where pythonw') do (
5+
@ %%p "main.py"
6+
)
7+
EXIT /B

LogsManager - noConsole.vbs

-3
This file was deleted.

LogsManager - wConsole.bat

-8
This file was deleted.

README.md

+11-12
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ in addiction, it can allow merge two log files using a key (column name) at the
4343
Python 3.5.3 or higher (tested on 3.7 64bit)
4444
pandas~=1.0.3 [python 3.5.3+]
4545
PyQt5~=5.15.1 [python 3.5+]
46-
xlrd
47-
openpyxl
46+
xlrd~=1.2.0
47+
et-xmlfile~=1.0.1
48+
jdcal~=1.2.1
49+
openpyxl~=3.0.5
4850
```
4951

5052
**Resources for dependencies required** <br>
@@ -56,18 +58,15 @@ PyQt5: [**pypi.org/project/PyQt5**](https://pypi.org/project/PyQt5/) <br>
5658

5759
## Quick Start
5860

59-
**Stand alone app (No Python required)**<br>
60-
0 - Download this repository <br>
61-
1 - Execute "LogsManager.exe"<br>
62-
1 ALTERNATIVE - Execute "LogsManager_noConsole.vbs" (in the same dir of LogsManager.exe)<br>
61+
**Automatic Setup installer with Python :**<br>
62+
1 - Download and Install "Setup - Logs Manager.exe" <br>
6363
2 - Good work with **Logs Manager** <br>
64+
NB: Internet Connection required
6465
___
65-
**With Python interpreter :**<br>
66-
0 - Download this repository <br>
67-
2 - Execute "Check and Install Python.cmd"<br>
68-
3 - Execute "LogsManager - noConsole.vbs"<br>
69-
3 ALTERNATIVE - Execute "LogsManager - wConsole.bat"<br>
70-
4 - Good work with **Logs Manager** <br>
66+
**Portable app (No Python required)**<br>
67+
1 - Download and Execute "LogsManager.exe"<br>
68+
1 ALTERNATIVE - Execute "LogsManager_noConsole.vbs" (in the same dir of LogsManager.exe)<br>
69+
2 - Good work with **Logs Manager** <br>
7170

7271

7372
</li>

buildSetup/Setup - Logs Manager .exe

1.98 MB
Binary file not shown.

nircmd.exe

44.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)