Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackburn29 committed Apr 13, 2023
0 parents commit 0701abd
Show file tree
Hide file tree
Showing 19 changed files with 665 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "build-lambda-package"
on:
push:
branches:
- master
- 'releases/*'

jobs:
units:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build installer
run: |
make
- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
name: pxsx2-installer-archive
path: build/*

21 changes: 21 additions & 0 deletions .github/workflows/package-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "package-release"
on:
release:
types: [published]

jobs:
units:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build final archive
run: |
make zip
- name: upload archive to release
uses: softprops/action-gh-release@v1
if: ${{startsWith(github.ref, 'refs/tags/') }}
with:
files: build/archive/PCSX2-Installer.zip
fail_on_unmatched_files: true

8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Idea
.idea

# build
build/**

# keep files
!.gitkeep
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
default: build

zip: build
mkdir -p build/archive/
cd build/ && zip -qr archive/PCSX2-Installer.zip * -x archive/

build: clean
@cd include/ && zip -qr ../build/include.zip * && cd -
cp -r bin/ install.bat build/

clean:
rm -rf build/*
75 changes: 75 additions & 0 deletions bin/setup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
Write-Host @"
____ _____ ____ _ __
/ __ \/ ___// __ \___ _ __(_)_______ ____/ /
/ /_/ /\__ \/ /_/ / _ \ | /| / / / ___/ _ \/ __ /
/ ____/___/ / _, _/ __/ |/ |/ / / / / __/ /_/ /
/_/ /____/_/ |_|\___/|__/|__/_/_/ \___/\__,_/
____ ____________ _____ ____ __ ____
/ __ \/ ____/ ___/ |/ /__ \ / _/___ _____/ /_____ _/ / /__ _____
/ /_/ / / \__ \| /__/ / / // __ \/ ___/ __/ __ `/ / / _ \/ ___/
/ ____/ /___ ___/ / |/ __/ _/ // / / (__ ) /_/ /_/ / / / __/ /
/_/ \____//____/_/|_/____/ /___/_/ /_/____/\__/\__,_/_/_/\___/_/
____________________________________________________________________________________
/_____/_____/_____/_____/_____/_____/_____/_____/_____/_____/_____/_____/_____/_____/
"@

$7zipPath = "$env:ProgramFiles\7-Zip\7z.exe"

if (-not (Test-Path -Path $7zipPath -PathType Leaf)) {
Write-Host -ForegroundColor Red -BackgroundColor Black "You are missing 7-Zip which is required. Please download and install it before running this script."
Exit 1
}

Set-Alias Start-SevenZip $7zipPath

$repo = "pcsx2/PCSX2"
$file = "PCSX2.7z"

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$releases = "https://api.github.com/repos/$repo/releases"

Write-Host Getting latest version of PCSX2...
$id = ((Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets | where { $_.name.EndsWith("windows-64bit-Qt.7z") })[0].id

$download = "https://api.github.com/repos/$repo/releases/assets/$id"

Write-Host Dowloading latest release:
Write-Host $download
$headers.Add("Accept", "application/octet-stream")
Invoke-WebRequest -Uri $download -Headers $headers -OutFile $file

Write-Host Extracting PCSX2 base install...
Start-SevenZip x "$file" -y > $null
Remove-Item "$file" -Force

Write-Host Creating necessary folders...
mkdir -Force hdd,games > $null

Write-Host Downloading and Installing PS2 HDD image...
$download = "http://patch.psrewired.com/hddimg/AllSocomMaps.zip"
Invoke-WebRequest -Uri $download -Headers $headers -OutFile hdd.zip
Expand-Archive hdd.zip -DestinationPath .\hdd
Remove-Item hdd.zip -Force

Write-Host Configuring PCSX2...
Expand-Archive include.zip -DestinationPath . -Force
Remove-Item include.zip -Force

Write-Host Cleaning up...
Remove-Item .\bin -Force -Recurse
Remove-Item install.bat -Force

Write-Host -ForegroundColor Green "Done!"

$helpText = @"
Some additional configuration for controllers and game patches may still be required!`n
-- You will need to source your games and PS2 BIOS yourself. --`n
The BIOS must be placed within the bios/ folder.`n`n
The emulator has been set up to auto-discover games in the games/ folder where you ran this script.
If you wish to use a different folder, you may do so within the PCSX2 settings.
`n`nFor additional guides and support, visit our website https://psrewired.com
"@

$Shell = New-Object -ComObject "WScript.Shell"
$Shell.Popup($helpText,0, "Installation Complete!", 0)
Empty file added build/.gitkeep
Empty file.
Binary file added include/covers/SCUS-97134.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added include/covers/SCUS-97275.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added include/covers/SCUS-97474.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added include/covers/SCUS-97545.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added include/games/r0004nodns.elf
Binary file not shown.
Binary file added include/games/r0004v002.elf
Binary file not shown.
2 changes: 2 additions & 0 deletions include/gamesettings/SCUS-97275_0F6FC6CF.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[EmuCore/Gamefixes]
VIF1StallHack = true
2 changes: 2 additions & 0 deletions include/gamesettings/SCUS-97474_75ED4282.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[EmuCore/Speedhacks]
EECycleRate = 3
2 changes: 2 additions & 0 deletions include/gamesettings/SCUS-97545_D7CFDCCF.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[EmuCore/Speedhacks]
EECycleRate = 3
Loading

0 comments on commit 0701abd

Please sign in to comment.