Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Android.mk.backup
[Ee]xtern/
*.qmod
mod.json
qpm_defines.cmake
qpm.shared.json
![Cc][Mm]ake[Ll]ists.txt

Expand All @@ -64,5 +65,4 @@ cmake-build-*/
extern.cmake

# QMOD Schema
mod.json.schema
ndkpath.txt
mod.json.schema
2 changes: 1 addition & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"defines": [
"MOD_ID=\"#{id}\"",
"VERSION=\"0.1.0\"",
"VERSION=\"#{version}\"",
"__GNUC__",
"__aarch64__"
],
Expand Down
68 changes: 0 additions & 68 deletions Android.mk

This file was deleted.

5 changes: 0 additions & 5 deletions Application.mk

This file was deleted.

23 changes: 0 additions & 23 deletions bmbfmod.json

This file was deleted.

23 changes: 9 additions & 14 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,25 @@ Param(
)

if ($help -eq $true) {
echo "`"Build`" - Copiles your mod into a `".so`" or a `".a`" library"
echo "`n-- Arguments --`n"
Write-Output "`"Build`" - Copiles your mod into a `".so`" or a `".a`" library"
Write-Output "`n-- Arguments --`n"

echo "-Clean `t`t Deletes the `"build`" folder, so that the entire library is rebuilt"
Write-Output "-Clean `t`t Deletes the `"build`" folder, so that the entire library is rebuilt"

exit
}

# if user specified clean, remove all build files
if ($clean.IsPresent)
{
if (Test-Path -Path "build")
{
if ($clean.IsPresent) {
if (Test-Path -Path "build") {
remove-item build -R
}
}


if (($clean.IsPresent) -or (-not (Test-Path -Path "build")))
{
$out = new-item -Path build -ItemType Directory
if (($clean.IsPresent) -or (-not (Test-Path -Path "build"))) {
new-item -Path build -ItemType Directory
}

cd build
& cmake -G "Ninja" -DCMAKE_BUILD_TYPE="RelWithDebInfo" ../
& cmake --build .
cd ..
& cmake -G "Ninja" -DCMAKE_BUILD_TYPE="RelWithDebInfo" -B build
& cmake --build ./build
41 changes: 26 additions & 15 deletions copy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ Param(
[String] $custom="",

[Parameter(Mandatory=$false)]
[Switch] $file,
[String] $file="",

[Parameter(Mandatory=$false)]
[Switch] $help
)

if ($help -eq $true) {
echo "`"Copy`" - Builds and copies your mod to your quest, and also starts Beat Saber with optional logging"
echo "`n-- Arguments --`n"
Write-Output "`"Copy`" - Builds and copies your mod to your quest, and also starts Beat Saber with optional logging"
Write-Output "`n-- Arguments --`n"

echo "-Clean `t`t Performs a clean build (equvilant to running `"Build -clean`")"
echo "-UseDebug `t Copied the debug version of the mod to your quest"
echo "-Log `t`t Logs Beat Saber using the `"Start-Logging`" command"
Write-Output "-Clean `t`t Performs a clean build (equvilant to running `"build -clean`")"
Write-Output "-UseDebug `t Copies the debug version of the mod to your quest"
Write-Output "-Log `t`t Logs Beat Saber using the `"Start-Logging`" command"

echo "`n-- Logging Arguments --`n"
Write-Output "`n-- Logging Arguments --`n"

& $PSScriptRoot/start-logging.ps1 -help -excludeHeader

Expand All @@ -42,18 +42,29 @@ if ($help -eq $true) {
& $PSScriptRoot/build.ps1 -clean:$clean

if ($LASTEXITCODE -ne 0) {
echo "Failed to build, exiting..."
Write-Output "Failed to build, exiting..."
exit $LASTEXITCODE
}

if ($useDebug -eq $true) {
$fileName = Get-ChildItem lib*.so -Path "build/debug" -Name
} else {
$fileName = Get-ChildItem lib*.so -Path "build/" -Name
}
# & $PSScriptRoot/validate-modjson.ps1
# if ($LASTEXITCODE -ne 0) {
# exit $LASTEXITCODE
# }
$modJson = Get-Content "./mod.json" -Raw | ConvertFrom-Json

$modFiles = $modJson.modFiles

& adb push build/$fileName /sdcard/Android/data/com.beatgames.beatsaber/files/mods/$fileName
foreach ($fileName in $modFiles) {
if ($useDebug -eq $true) {
& adb push build/debug/$fileName /sdcard/Android/data/com.beatgames.beatsaber/files/mods/$fileName
} else {
& adb push build/$fileName /sdcard/Android/data/com.beatgames.beatsaber/files/mods/$fileName
}
}

& $PSScriptRoot/restart-game.ps1

if ($log -eq $true) { & $PSScriptRoot/start-logging.ps1 -self:$self -all:$all -custom:$custom -file:$file }
if ($log -eq $true) {
& adb logcat -c
& $PSScriptRoot/start-logging.ps1 -self:$self -all:$all -custom:$custom -file:$file
}
17 changes: 2 additions & 15 deletions createqmod.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,6 @@ if ($help -eq $true) {

$mod = "./mod.json"

& $PSScriptRoot/build.ps1 -clean:$clean

if ($LASTEXITCODE -ne 0) {
echo "Failed to build, exiting..."
exit $LASTEXITCODE
}

& qpm-rust qmod build

& $PSScriptRoot/validate-modjson.ps1
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
$modJson = Get-Content $mod -Raw | ConvertFrom-Json

if ($qmodName -eq "") {
Expand Down Expand Up @@ -67,8 +54,8 @@ foreach ($lib in $modJson.libraryFiles) {
$filelist += $path
}

$zip = "Play3rdPer.zip"
$qmod = "Play3rdPer.qmod"
$zip = $qmodName + ".zip"
$qmod = $qmodName + ".qmod"

Compress-Archive -Path $filelist -DestinationPath $zip -Update
Move-Item $zip $qmod -Force
35 changes: 0 additions & 35 deletions mod.json

This file was deleted.

8 changes: 4 additions & 4 deletions mod.template.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"_QPVersion": "0.1.1",
"id": "Play3rdPer",
"name": "Third Person mod",
"version": "0.11.0",
"name": "${mod_name}",
"id": "${mod_id}",
"version": "${version}",
"coverImage": "cover.png",
"author": "ComputerElite",
"packageId": "com.beatgames.beatsaber",
"packageVersion": "1.27.0_3631150051",
"packageVersion": "1.28.0_4124311467",
"modFiles": [
],
"libraryFiles": [
Expand Down
1 change: 0 additions & 1 deletion ndkpath.txt

This file was deleted.

8 changes: 4 additions & 4 deletions qpm.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"info": {
"name": "Third Person Mod",
"id": "Play3rdPer",
"version": "0.11.0",
"version": "0.12.0",
"url": null,
"additionalData": {
"overrideSoName": "libPlay3rdPer.so"
Expand All @@ -23,7 +23,7 @@
},
{
"id": "custom-types",
"versionRange": "^0.15.22",
"versionRange": "^0.15.23",
"additionalData": {}
},
{
Expand All @@ -33,12 +33,12 @@
},
{
"id": "codegen",
"versionRange": "^0.32.0",
"versionRange": "^0.33.0",
"additionalData": {}
},
{
"id": "questui",
"versionRange": "^0.17.10",
"versionRange": "^0.17.11",
"additionalData": {}
}
]
Expand Down
Loading