Skip to content

Commit

Permalink
Merge pull request #48 from Francommit/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Francommit authored Aug 10, 2021
2 parents ce64755 + 3fccce1 commit b3394a0
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Build'

on:
push:
branches: [ master ]
branches: [ master, dev ]
schedule:
- cron: "0 0 * * *"

Expand Down
22 changes: 21 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
requirements
debug.log
debug.log
assets/*
*.dll
retroarch*
assets/
autoconfig/
bearer/
database/
filters/
iconengines/
imageformats/
info/
overlays/
platforms/
saves/
screenshots/
shaders/
states/
styles
system/
qt.conf
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.ignoreLimitWarning": true
}
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<img src="icon.png" align="right" />

EmulationStation configured for Windows 10
EmulationStation configured for Windows
======

![Script working](https://github.com/Francommit/win10_emulation_station/workflows/Build/badge.svg)

An auto-installer to set up Emulation Station correctly on a 64-bit version of Windows 10.
An auto-installer to set up Emulation Station correctly on a 64-bit version of Windows 10/11


Features
------
- Uses an up to date version of Emulation Station from the Raspberry Pi branch
- Auto populates emulators with public domain roms
- Adds exclusive Windows only Emulators and Themes for the Switch, Wii-U and PS3
- Auto installs a popular theme with support for adding 'Favorites'
- Adds multiple useful shortcuts to the user's Desktop
- Adds in a game content scraper which lives in (run %UserProfile%\\.emulationstation\roms\scraper.exe)
Expand All @@ -33,14 +35,15 @@ INFO: Setup completed
Troubleshooting
------
- If the controller is not working in game, configure Input in Retroarch (%UserProfile%\\.emulationstation\systems\retroarch\retroarch.exe)
- PSX and PS2 Homebrew Games won't load unless you acquire the bios's and add them to the bios folder (%UserProfile%\\.emulationstation\systems\epsxe\bios and %UserProfile%\\.emulationstation\systems\pcsx2\bios)
- PSX and PS2 also require manual configuration for controllers (%UserProfile%\\.emulationstation\systems\epsxe\ePSXe.exe and %UserProfile%\\.emulationstation\systems\pcsx2\pcsx2.exe)
- PSX, PS2 and PS3 Homebrew Games won't load unless you acquire the bios's and add them to the bios folder (%UserProfile%\\.emulationstation\systems\epsxe\bios and %UserProfile%\\.emulationstation\systems\pcsx2\bios)
- PSX, PS2 and PS3 also require manual configuration for controllers (%UserProfile%\\.emulationstation\systems\epsxe\ePSXe.exe and %UserProfile%\\.emulationstation\systems\pcsx2\pcsx2.exe and %UserProfile%\\scoop\apps\rpcs3\current)
- If the script fails for whatever reason delete the contents of %UserProfile%\\.emulationstation and try again.
- Emulation Station may crash when you return to it from a external progam, ensure your graphics drivers are up to date.
- Launching a Retroarch rom may return you to ES, you're probably on a 32-bit verison of Windows and need to acquire seperate cores.
- Powershell commands may fail, ensure your Powershell session is in Admin mode.
- If Powershell complains about syntax you're probably somehow running a Powershell version lower than 5. Run 'choco install powershell -y' to update.
- If you are using Xbox controllers and having trouble setting the guide button as hotkey, locate the file (%UserProfile%\\.emulationstation\es_input.cfg and change the line for hotkeyenable to ```<input id="5" name="hotkeyenable" type="button" value="10" />```
- The script is now re-runnable, so if anything fails, re-run it and it'll pick itself back up if your internet has died half-way through
- If you are unable to run script from context menu (right mouse button), revert default "Open with" to Notepad

#### Windowed Mode Execution:
Expand Down
14 changes: 11 additions & 3 deletions download_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
{
"file": "RetroArch.7z",
"url": "https://buildbot.libretro.com/stable/1.9.0/windows/x86_64/RetroArch.7z"
"url": "https://buildbot.libretro.com/stable/1.9.6/windows/x86_64/RetroArch.7z"
},
{
"file": "assimilate_full.zip",
Expand Down Expand Up @@ -123,6 +123,10 @@
{
"file": "C4.vpk",
"url": "https://dl.coolatoms.org/vitadb/C4.vpk"
},
{
"file": "UP0001-THATOPONG_00-0000000000000000-A0100-V0100-RE.pkg",
"url": "https://www.psx-place.com/resources/that-other-pong.479/download?version=645"
}
],
"releases": [
Expand All @@ -135,8 +139,8 @@
"repo": "Francommit/emulationstation"
},
{
"file": "recalbox-backport-v2.1.zip",
"repo": "fonic/recalbox-backport"
"file": "recalbox-backport-v2.2.zip",
"repo": "Francommit/recalbox-backport"
},
{
"file": "ccleste.3dsx",
Expand All @@ -149,6 +153,10 @@
{
"file": "windows-latest.zip",
"repo": "Vita3K/Vita3K"
},
{
"file": "xemu-win-release.zip",
"repo": "mborgerson/xemu"
}
],
"other_downloads": [
Expand Down
58 changes: 42 additions & 16 deletions prepare.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function DownloadFiles {

$url = $_.url
$file = $_.file
$output = "$requirementsFolder\$file"
$output = "$requirementsFolder\$file"

if(![System.IO.File]::Exists($output)){

Expand Down Expand Up @@ -68,8 +68,6 @@ function GithubReleaseFiles {
Write-Host $file "INFO: Already exists...Skipping download."
}

Get-ChildItem $requirementsFolder

}

}
Expand Down Expand Up @@ -108,10 +106,12 @@ Write-Host "INFO: Installing Citra Nightly"
scoop install citra-nightly
scoop install ppsspp
scoop install yuzu
scoop install rpcs3

$citraInstallDir = "$env:userprofile\scoop\apps\citra-nightly\current"
$ppssppInstallDir = "$env:userprofile\scoop\apps\ppsspp\current"
$yuzuInstallDir = "$env:userprofile\scoop\apps\yuzu\current"
$rpcs3InstallDir = "$env:userprofile\scoop\apps\rpcs3\current"

choco install 7zip --no-progress -y | Out-Null
choco install dolphin --pre --no-progress -y | Out-Null
Expand All @@ -125,13 +125,14 @@ DownloadFiles("other_downloads")
GithubReleaseFiles

# Install Emulation Station
Write-Host "INFO: Starting Emulation station to generate config"
Start-Process "$requirementsFolder\emulationstation_win32_latest.exe" -ArgumentList "/S" -Wait

# Generate Emulation Station config file
& "${env:ProgramFiles(x86)}\EmulationStation\emulationstation.exe"
while (!(Test-Path "$env:userprofile\.emulationstation\es_systems.cfg")) {
Write-Host "INFO: Checking for config file..."
Start-Sleep 5
Start-Sleep 10
}
Write-Host "INFO: Config file generated"
Stop-Process -Name "emulationstation"
Expand All @@ -142,7 +143,11 @@ $coresPath = "$retroArchPath\cores"
$retroArchBinary = "$requirementsFolder\RetroArch.7z"
if(Test-Path $retroArchBinary){
New-Item -ItemType Directory -Force -Path $retroArchPath | Out-Null
Expand-Archive -Path $retroArchBinary -Destination $retroArchPath | Out-Null
Expand-Archive -Path $retroArchBinary -Destination . | Out-Null
# TO-DO - add an Out-Null when this has been tested
Copy-Item -Path RetroArch-Win64\* -Destination $retroArchPath -recurse -Force
# New path - $retroArchPath\RetroArch-Win64

} else {
Write-Host "ERROR: $retroArchBinary not found."
exit -1
Expand Down Expand Up @@ -343,7 +348,7 @@ $pspPath = "$romPath\psp"
$pspRom = "$requirementsFolder\cube.elf"
if (Test-Path $pspRom) {
New-Item -ItemType Directory -Force -Path $pspPath | Out-Null
Move-Item -Path $pspRom -Destination $pspPath | Out-Null
Move-Item -Path $pspRom -Destination $pspPath -Force | Out-Null
}
else {
Write-Host "ERROR: $pspRom not found."
Expand All @@ -355,19 +360,31 @@ $switchPath = "$romPath\switch"
$switchRom = "$requirementsFolder\tetriswitch.nro"
if (Test-Path $switchRom) {
New-Item -ItemType Directory -Force -Path $switchPath | Out-Null
Move-Item -Path $switchRom -Destination $switchPath | Out-Null
Move-Item -Path $switchRom -Destination $switchPath -Force | Out-Null
}
else {
Write-Host "ERROR: $switchRom not found."
exit -1
}

Write-Host "INFO: Setup PS3"
$ps3Path = "$romPath\ps3"
$ps3Rom = "$requirementsFolder\UP0001-THATOPONG_00-0000000000000000-A0100-V0100-RE.pkg"
if (Test-Path $ps3Rom) {
New-Item -ItemType Directory -Force -Path $ps3Path | Out-Null
Move-Item -Path $ps3Rom -Destination $ps3Path | Out-Null
}
else {
Write-Host "ERROR: $ps3Rom not found."
exit -1
}

Write-Host "INFO: Setup PS Vita"
$vitaPath = "$romPath\vita"
$vitaRom = "$requirementsFolder\C4.vpk"
if (Test-Path $vitaRom) {
New-Item -ItemType Directory -Force -Path $vitaPath | Out-Null
Move-Item -Path $vitaRom -Destination $vitaPath | Out-Null
Move-Item -Path $vitaRom -Destination $vitaPath -Force | Out-Null
}
else {
Write-Host "ERROR: $vitaRom not found."
Expand All @@ -382,7 +399,7 @@ if(-not(Test-Path $vita3kInstallFolder)){

$vita3kLatestBuild = "$requirementsFolder\windows-latest.zip"
if(Test-Path $vita3kLatestBuild){
Expand-Archive -Path $vita3kLatestBuild -Destination $vita3kInstallFolder | Out-Null
Expand-Archive -Path $vita3kLatestBuild -Destination $vita3kInstallFolder -force | Out-Null
} else {
Write-Host "ERROR: $vita3kLatestBuild not found."
exit -1
Expand All @@ -393,7 +410,7 @@ $3dsPath = "$romPath\3ds"
$3dsRom = "$requirementsFolder\ccleste.3dsx"
if (Test-Path $3dsRom) {
New-Item -ItemType Directory -Force -Path $3dsPath | Out-Null
Move-Item -Path $3dsRom -Destination $3dsPath | Out-Null
Move-Item -Path $3dsRom -Destination $3dsPath -Force | Out-Null
}
else {
Write-Host "ERROR: $3dsRom not found."
Expand Down Expand Up @@ -597,7 +614,7 @@ $newConfig = "<systemList>
<command>C:\Program Files\Vita3k\Vita3K.exe --vpk-path %ROM%</command>
<platform>vita</platform>
<theme>vita</theme>
</system>
</system>
<system>
<name>switch</name>
<fullname>Switch</fullname>
Expand All @@ -607,7 +624,16 @@ $newConfig = "<systemList>
<platform>switch</platform>
<theme>switch</theme>
</system>
<system>
<system>
<name>ps3</name>
<fullname>PS3</fullname>
<path>$ps3Path</path>
<extension>.iso .ISO .zip .ZIP .7z .pkg .PKG</extension>
<command>$rpcs3InstallDir\yuzu.exe %ROM%</command>
<platform>ps3</platform>
<theme>ps3</theme>
</system>
<system>
<name>psp</name>
<fullname>Playstation Portable</fullname>
<path>$pspPath</path>
Expand Down Expand Up @@ -838,9 +864,9 @@ Set-Content $esConfigFile -Value $newConfig

Write-Host "INFO: Setting up Emulation Station theme recalbox-backport"
$themesPath = "$env:userprofile\.emulationstation\themes\recalbox-backport\"
$themesFile = "$requirementsFolder\recalbox-backport-v2.1.zip"
$themesFile = "$requirementsFolder\recalbox-backport-v2.2.zip"
if(Test-Path $themesFile){
Expand-Archive -Path $themesFile -Destination $requirementsFolder | Out-Null
Expand-Archive -Path $themesFile -Destination $requirementsFolder -Force | Out-Null
$themesFolder = "$requirementsFolder\recalbox-backport\"
robocopy $themesFolder $themesPath /E /NFL /NDL /NJH /NJS /nc /ns /np | Out-Null
} else {
Expand All @@ -852,7 +878,7 @@ Write-Host "INFO: Update EmulationStation binaries"
$emulationStationInstallFolder = "${env:ProgramFiles(x86)}\EmulationStation"
$updatedEmulationStatonBinaries = "$requirementsFolder\EmulationStation-Win32.zip"
if(Test-Path $updatedEmulationStatonBinaries){
Expand-Archive -Path $updatedEmulationStatonBinaries -Destination $emulationStationInstallFolder | Out-Null
Expand-Archive -Path $updatedEmulationStatonBinaries -Destination $emulationStationInstallFolder -Force | Out-Null
} else {
Write-Host "ERROR: $updatedEmulationStatonBinaries not found."
exit -1
Expand Down Expand Up @@ -1090,7 +1116,7 @@ AspectRatio = 1
Screensaver = 0
"
New-Item $dolphinConfigFolder -ItemType directory | Out-Null
New-Item $dolphinConfigFolder -ItemType directory -Force | Out-Null
Write-Output $dolphinConfigFileContent > $dolphinConfigFile

# TO-DO: Review if this is still needed or not
Expand Down

0 comments on commit b3394a0

Please sign in to comment.