Fix for windows
This commit is contained in:
parent
1457064423
commit
6c5b5a91c2
@ -3,7 +3,7 @@ list=ozon, black, dushanbe_city_bank
|
|||||||
|
|
||||||
[common]
|
[common]
|
||||||
currencies=USD, ARS, RUB, TJS
|
currencies=USD, ARS, RUB, TJS
|
||||||
version=0.0.9
|
version=1.0.63
|
||||||
|
|
||||||
[db]
|
[db]
|
||||||
dbPath=./database/app_data.db
|
dbPath=./database/app_data.db
|
||||||
@ -43,4 +43,4 @@ currency=TJS
|
|||||||
country=tajikistan
|
country=tajikistan
|
||||||
name=Dushanbe City
|
name=Dushanbe City
|
||||||
phone_code=992
|
phone_code=992
|
||||||
app_version=3.2.33
|
app_version=3.2.34
|
||||||
|
|||||||
@ -13,19 +13,4 @@ foreach ($_c in $_configCandidates) {
|
|||||||
if (-not $_configPath) { Write-Host "ERROR: config.ini not found" -ForegroundColor Red; exit 1 }
|
if (-not $_configPath) { Write-Host "ERROR: config.ini not found" -ForegroundColor Red; exit 1 }
|
||||||
$_configArg = @("--config", $_configPath)
|
$_configArg = @("--config", $_configPath)
|
||||||
Write-Host "Config: $_configPath" -ForegroundColor Gray
|
Write-Host "Config: $_configPath" -ForegroundColor Gray
|
||||||
$_pythonExe = $null
|
& "C:\Users\User\AppData\Local\Programs\Python\Python312-arm64\python.exe" "$PSScriptRoot\gen_fetch_transactions.py" @_configArg @args
|
||||||
foreach ($_cmd in (Get-Command python, python3, py -ErrorAction SilentlyContinue)) {
|
|
||||||
if ($_cmd.Source -notlike "*WindowsApps*") { $_pythonExe = $_cmd.Source; break }
|
|
||||||
}
|
|
||||||
if (-not $_pythonExe) {
|
|
||||||
$_pythonExe = (Get-ChildItem "$env:LOCALAPPDATA\Programs\Python\*\python.exe",
|
|
||||||
"C:\Users\*\AppData\Local\Programs\Python\*\python.exe",
|
|
||||||
"C:\Program Files\Python*\python.exe",
|
|
||||||
"C:\Python*\python.exe" -ErrorAction SilentlyContinue |
|
|
||||||
Select-Object -First 1).FullName
|
|
||||||
}
|
|
||||||
if (-not $_pythonExe) {
|
|
||||||
Write-Host "ERROR: python not found. Install Python or add it to PATH." -ForegroundColor Red; exit 1
|
|
||||||
}
|
|
||||||
Write-Host "Python: $_pythonExe" -ForegroundColor Gray
|
|
||||||
& $_pythonExe "$PSScriptRoot\gen_fetch_transactions.py" @_configArg @args
|
|
||||||
Loading…
Reference in New Issue
Block a user