mirror of
https://github.com/YuzuZensai/RaftHostUtils.git
synced 2026-01-31 14:58:06 +00:00
First upload
This commit is contained in:
20
build.bat
Normal file
20
build.bat
Normal file
@@ -0,0 +1,20 @@
|
||||
:: RML Mod Build Script by TeKGameR
|
||||
|
||||
:: Disabling echoing
|
||||
@echo off
|
||||
:: Defining the window title
|
||||
title RML Mod Build Script
|
||||
:: Retrieving the current folder name
|
||||
for %%* in (.) do set foldername=%%~n*
|
||||
:: Creating a folder to contain temporary files for the build
|
||||
mkdir "build"
|
||||
:: Copying the solution directory in the "build" folder except ".csproj, .rmod" files and "bin, obj" folders.
|
||||
robocopy "%foldername%" "build" /E /XF *.csproj *.rmod /XD bin obj
|
||||
:: Checking if a .rmod with the same name already exists and if it does, delete it.
|
||||
if exist "%foldername%.rmod" ( del "%foldername%.rmod" )
|
||||
:: Zipping the "build" folder. (.rmod are just zipped files)
|
||||
powershell "[System.Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem');[System.IO.Compression.ZipFile]::CreateFromDirectory(\"build\", \"%foldername%.rmod\", 0, 0)"
|
||||
:: Deleting the "build" folder
|
||||
rmdir /s /q "build"
|
||||
:: Build succeeded!
|
||||
EXIT
|
||||
Reference in New Issue
Block a user