Skip to content

Commit

Permalink
logs\msg.log
Browse files Browse the repository at this point in the history
  • Loading branch information
dragoonDorise committed Jan 25, 2025
1 parent 1cc8a83 commit 21df8df
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions android/setup.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
function setMSGTemp($message){
$progressBarValue = Get-Content -Path "$env:APPDATA\EmuDeck\msg.log" -TotalCount 1 -ErrorAction SilentlyContinue
$progressBarValue = Get-Content -Path "$env:APPDATA\EmuDeck\logs\msg.log" -TotalCount 1 -ErrorAction SilentlyContinue
$progressBarUpdate=[int]$progressBarValue+1

#We prevent the UI to close if we have too much MSG, the classic eternal 99%
if ( $progressBarUpdate -eq 95 ){
$progressBarUpdate=90
}
"$progressBarUpdate" | Out-File -encoding ascii "$env:APPDATA\EmuDeck\msg.log"
"$progressBarUpdate" | Out-File -encoding ascii "$env:APPDATA\EmuDeck\logs\msg.log"
Write-Output $message
Add-Content "$env:APPDATA\EmuDeck\msg.log" "# $message" -NoNewline -Encoding UTF8
Add-Content "$env:APPDATA\EmuDeck\logs\msg.log" "# $message" -NoNewline -Encoding UTF8
Start-Sleep -Seconds 0.5
}
setMSGTemp 'Creating configuration files. please wait'
Expand Down
6 changes: 3 additions & 3 deletions functions/helperFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,17 @@ function changeLine($Keyword,$Replace,$File) {
}

function setMSG($message){
$progressBarValue = Get-Content -Path "$emudeckFolder\msg.log" -TotalCount 1 -ErrorAction SilentlyContinue
$progressBarValue = Get-Content -Path "$emudeckFolder\logs\msg.log" -TotalCount 1 -ErrorAction SilentlyContinue
if ($progressBarValue -match '^\d+$') {
$progressBarUpdate = [int]$progressBarValue + 5
}
#We prevent the UI to close if we have too much MSG, the classic eternal 99%
if ( $progressBarUpdate -eq 95 ){
$progressBarUpdate=90
}
"$progressBarUpdate" | Out-File -encoding ascii "$emudeckFolder\msg.log"
"$progressBarUpdate" | Out-File -encoding ascii "$emudeckFolder\logs\msg.log"
Write-Output $message
Add-Content "$emudeckFolder\msg.log" "# $message" -NoNewline -Encoding UTF8
Add-Content "$emudeckFolder\logs\msg.log" "# $message" -NoNewline -Encoding UTF8
Start-Sleep -Seconds 0.5
}

Expand Down
10 changes: 5 additions & 5 deletions setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ function setMSGTemp($message){
if ( $progressBarUpdate -eq 95 ){
$progressBarUpdate=90
}
"$progressBarUpdate" | Out-File -encoding ascii "$env:APPDATA\EmuDeck\msg.log"
"$progressBarUpdate" | Out-File -encoding ascii "$env:APPDATA\EmuDeck\logs\msg.log"
Write-Output $message
Add-Content "$env:APPDATA\EmuDeck\msg.log" "# $message" -NoNewline -Encoding UTF8
Add-Content "$env:APPDATA\EmuDeck\logs\msg.log" "# $message" -NoNewline -Encoding UTF8
Start-Sleep -Seconds 0.5
}
setMSGTemp 'Creating configuration files. please wait'

Write-Output "" > "$env:APPDATA\emudeck\logs\EmuDeckSetup.log"
Write-Output "" > "$env:APPDATA\EmuDeck\logs\EmuDeckSetup.log"

Start-Sleep -Seconds 1.5

Start-Transcript "$env:APPDATA\emudeck\logs\EmuDeckSetup.log"
Start-Transcript "$env:APPDATA\EmuDeck\logs\EmuDeckSetup.log"

# JSON Parsing to ps1 file
. "$env:APPDATA\EmuDeck\backend\functions\JSONtoPS1.ps1"
Expand All @@ -43,7 +43,7 @@ mkdir "$savesPath" -ErrorAction SilentlyContinue
#
#
#Clear old installation msg log
Remove-Item "$emudeckFolder\msg.log" -ErrorAction SilentlyContinue
Remove-Item "$emudeckFolder\logs\msg.log" -ErrorAction SilentlyContinue
Write-Output "Installing, please stand by..."
Write-Output ""

Expand Down

0 comments on commit 21df8df

Please sign in to comment.