refactor: Initial release

This commit is contained in:
Mira 2025-01-27 17:17:53 +01:00
commit 9505750e29
Signed by untrusted user who does not match committer: Xorog
GPG key ID: 983798ED9C3E7C36
447 changed files with 41522 additions and 0 deletions

@ -0,0 +1 @@
Subproject commit 03899f8e5bc3d3b2807be7f90a518c28a830a0bb

1
OfficialPlugins/Music Submodule

@ -0,0 +1 @@
Subproject commit 79e7cffb4e38d68d2af71d321d8698fd799b3e59

@ -0,0 +1 @@
Subproject commit b0318f5602b29482638a71dae7184b075bc58b5a

@ -0,0 +1 @@
Subproject commit 4e795fddc75a59f2512243f59c02de3d0823cdd2

@ -0,0 +1 @@
Subproject commit ea04fd278535c33a3b78d056adf6c25a5cb687bc

View file

@ -0,0 +1,29 @@
@echo off
set "current_dir=%CD%"
call update_deps.cmd
cd /d "%current_dir%"
del /q *.pmpl
for /D %%i in (*) do (
if /I "%%i" neq "deps" (
if /I "%%i" neq "Example" (
if exist "%%i\.build.cmd" (
pushd "%%i"
echo Running .build.cmd in %%i
call .\.build.cmd
popd
rem Move pmpl files to parent directory
move "%%i\*.pmpl" .
)
)
)
)
rmdir /s /q trusted_manifests
mkdir trusted_manifests
cd deps
dotnet ProjectMakoto.dll --build-manifests .. --output-manifests ../trusted_manifests

View file

@ -0,0 +1,44 @@
#!/bin/bash
current_dir=$(pwd)
./update_deps.sh
if [ "$1" -ne 1 ]; then
./update_deps.sh
fi
if [ $? -ne 0 ]; then
echo "Error: update_deps.sh script failed. Exiting."
exit 1
fi
cd "$current_dir"
rm -f *.pmpl
for i in */; do
# Exclude 'deps' and 'Example' directories
if [ "$i" != "deps/" ] && [ "$i" != "Example/" ]; then
# Check if .build.sh file exists and is executable
if [ -x "$i.build.sh" ]; then
cd "$i"
echo "Running .build.sh in $i"
./.build.sh
if [ $? -ne 0 ]; then
echo "Error: Build failed."
exit 1
fi
cd ..
# Move pmpl files to parent directory
mv "$i"/*.pmpl .
fi
fi
done
rm -rf trusted_manifests
mkdir trusted_manifests
cd deps
dotnet ProjectMakoto.dll --build-manifests .. --output-manifests ../trusted_manifests

View file

@ -0,0 +1,7 @@
@echo off
echo Cleaning up old versions..
rmdir \s \q "..\ProjectMakoto\bin\x64\Debug\net8.0\Plugins\"
mkdir "..\ProjectMakoto\bin\x64\Debug\net8.0\Plugins\"
echo Moving new plugins..
move "*.pmpl" "..\ProjectMakoto\bin\x64\Debug\net8.0\Plugins\"

View file

@ -0,0 +1,7 @@
#!/bin/bash
echo "Cleaning up old versions.."
rm -rf "../ProjectMakoto/bin/x64/Debug/net8.0/Plugins/"
mkdir -p "../ProjectMakoto/bin/x64/Debug/net8.0/Plugins/"
echo "Moving new plugins.."
mv *.pmpl "../ProjectMakoto/bin/x64/Debug/net8.0/Plugins/"

View file

@ -0,0 +1,34 @@
@echo off
rmdir /S /Q deps
dotnet publish ..\ProjectMakoto\ProjectMakoto.csproj --configuration RELEASE --runtime linux-x64 --no-self-contained --property:PublishDir="deps" --framework net9.0
move ..\ProjectMakoto\deps deps
set "original_dir=%CD%"
cd /d "..\Dependencies"
for /d /r %%i in (*deps*) do (
rd /s /q "%%i"
)
cd /d "%original_dir%"
git submodule update --init --depth 0
for /D %%i in (*) do (
if /I "%%i" neq "deps" (
if exist "%%i\.build.cmd" (
echo Creating symlink in %%i to deps
if not exist "%%i\deps" (
mklink /d "%%i\deps" "..\deps"
)
cd "%%i"
echo Syncing git submodules in %%i
git submodule update --init --depth 0
cd ..
)
)
)

View file

@ -0,0 +1,55 @@
#!/bin/bash
# Remove existing deps directory
rm -rf deps
# Publish ProjectMakoto
dotnet publish ../ProjectMakoto/ProjectMakoto.csproj --configuration RELEASE --runtime linux-x64 --no-self-contained --property:PublishDir="deps" --framework net9.0
mv ../ProjectMakoto/deps deps
# Change to Dependencies directory
original_dir=$(pwd)
cd ../Dependencies
# Remove all directories with "*deps*" recursively
find . -type d -name "*deps*" -exec rm -rf {} \;
# Change back to the original directory
cd "$original_dir"
# Update git submodules in the current directory
git submodule update --init --depth 0
# Iterate over subdirectories
for i in */; do
# Exclude 'deps' directory
if [ "$i" != "deps/" ]; then
# Check if .build.cmd file exists
if [ -f "$i.build.cmd" ]; then
echo "Creating symlink in $i to deps"
# Create symlink to deps directory
if [ ! -e "$i/deps" ]; then
# Check the operating system type
if [[ "$OSTYPE" == "msys" ]]; then
# MSYS (Git Bash) system
echo "mklink /d \"$i\\deps\" \"..\\deps\"" > temp.bat
c:/windows/system32/cmd.exe //c temp.bat
rm temp.bat
else
# Assume Linux
ln -s "../deps" "$i/deps"
fi
fi
# Change to subdirectory
cd "$i"
echo "Syncing git submodules in $i"
git submodule update --init --depth 0
# Change back to the original directory
cd "$original_dir"
fi
fi
done