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
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
67 changes: 0 additions & 67 deletions Android.mk

This file was deleted.

47 changes: 0 additions & 47 deletions Android.mk.backup

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
74 changes: 67 additions & 7 deletions copy.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,70 @@
$NDKPath = Get-Content $PSScriptRoot/ndkpath.txt
Param(
[Parameter(Mandatory=$false)]
[Switch] $clean,

$buildScript = "$NDKPath/build/ndk-build"
if (-not ($PSVersionTable.PSEdition -eq "Core")) {
$buildScript += ".cmd"
[Parameter(Mandatory=$false)]
[Switch] $log,

[Parameter(Mandatory=$false)]
[Switch] $useDebug,

[Parameter(Mandatory=$false)]
[Switch] $self,

[Parameter(Mandatory=$false)]
[Switch] $all,

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

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

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

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

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"

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

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

exit
}

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

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

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

$modFiles = $modJson.modFiles

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
}
}

& $buildScript NDK_PROJECT_PATH=$PSScriptRoot APP_BUILD_SCRIPT=$PSScriptRoot/Android.mk NDK_APPLICATION_MK=$PSScriptRoot/Application.mk
& adb push libs/arm64-v8a/libRedBar_0_1_0.so /sdcard/Android/data/com.beatgames.beatsaber/files/mods/libRedBar_0_1_0.so
& adb shell am force-stop com.beatgames.beatsaber
& $PSScriptRoot/restart-game.ps1

if ($log -eq $true) {
& adb logcat -c
& $PSScriptRoot/start-logging.ps1 -self:$self -all:$all -custom:$custom -file:$file
}
13 changes: 0 additions & 13 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
1 change: 0 additions & 1 deletion default-config.json

This file was deleted.

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,11 +1,11 @@
{
"_QPVersion": "0.1.1",
"id": "RedBar",
"name": "RedBar",
"version": "1.13.0",
"name": "${mod_name}",
"id": "${mod_id}",
"version": "${version}",
"author": "ComputerElite",
"packageId": "com.beatgames.beatsaber",
"packageVersion": "1.27.0_3631150051",
"packageVersion": "1.28.0_4124311467",
"coverImage": "cover.png",
"modFiles": [
],
Expand Down
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": "RedBar",
"id": "RedBar",
"version": "1.13.0",
"version": "1.14.0",
"url": null,
"additionalData": {
"overrideSoName": "libRedBar.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