Skip to content

Commit

Permalink
fixes bigpemu
Browse files Browse the repository at this point in the history
  • Loading branch information
dragoonDorise committed Jan 25, 2025
1 parent 1b221d9 commit 3eb7618
Showing 1 changed file with 11 additions and 27 deletions.
38 changes: 11 additions & 27 deletions functions/EmuScripts/emuDeckBigPemu.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$BigPEmu_configFile="$emusPath/BigPEmu/BigPEmuConfig.bigpcfg"

$BigPEmu_appData="$emusPath/BigPEmu/UserData"
function BigPEmu_install(){
setMSG "Downloading BigPEmu"
$url_BigPEmu = "https://www.richwhitehouse.com/jaguar/builds/BigPEmu_v117.zip"
Expand All @@ -9,8 +9,7 @@ function BigPEmu_install(){
}

function BigPEmu_init(){
$destination="$emusPath\BigPEmu"
copyFromTo "$env:APPDATA\EmuDeck\backend\configs\bigpemu" "$destination"
copyFromTo "$env:APPDATA\EmuDeck\backend\configs\bigpemu" "$BigPEmu_appData"
BigPEmu_setEmulationFolder
BigPEmu_setupSaves
BigPEmu_setupStorage
Expand All @@ -27,41 +26,26 @@ function BigPEmu_setEmulationFolder(){

function BigPEmu_setupSaves(){

mkdir "$savesPath/BigPEmu/saves" -ErrorAction SilentlyContinue
mkdir "$savesPath/BigPEmu/states" -ErrorAction SilentlyContinue
setMSG "BigPEmu - Saves Links"

$savesLinkPath = "$env:APPDATA\BigPEmu"
$emuSavePath = "$emulationPath\saves\BigPEmu\saves"
mkdir $BigPEmu_appData -ErrorAction SilentlyContinue

if (Test-Path $savesLinkPath) {
Write-Host "The symbolic link for 'saves' already exists. Removing it..."
Remove-Item $savesLinkPath -Force -Recurse
}
$simLinkPath = "$BigPEmu_appData\saves"
$emuSavePath = "$emulationPath\saves\BigPEmu\saves"
createSaveLink $simLinkPath $emuSavePath

New-Item -ItemType SymbolicLink -Path $savesLinkPath -Target $emuSavePath

$savesLinkPath = "$env:APPDATA\BigPEmu"
$simLinkPath = "$BigPEmu_appData\states"
$emuSavePath = "$emulationPath\saves\BigPEmu\states"

if (Test-Path $savesLinkPath) {
Write-Host "The symbolic link for 'states' already exists. Removing it..."
Remove-Item $savesLinkPath -Force -Recurse
}

New-Item -ItemType SymbolicLink -Path $savesLinkPath -Target $emuSavePath
createSaveLink $simLinkPath $emuSavePath

}

function BigPEmu_setupStorage {

$screenshotsLinkPath = "$emulationPath\storage\BigPEmu"
if (Test-Path $screenshotsLinkPath) {
Write-Host "The symbolic link for 'storage' already exists. Removing it..."
Remove-Item $screenshotsLinkPath -Force
}
mkdir "$storagePath/BigPEmu/screenshots" -ErrorAction SilentlyContinue
createSymlink "$BigPEmu_appData" "$storagePath/BigPEmu/screenshots"

$screenshotsTargetPath = "$env:APPDATA\BigPEmu"
New-Item -ItemType SymbolicLink -Path $screenshotsLinkPath -Target $screenshotsTargetPath
}


Expand Down

0 comments on commit 3eb7618

Please sign in to comment.