Compare commits

...

4 Commits

4 changed files with 105 additions and 40 deletions

View File

@ -43,5 +43,6 @@ If the issue is specific to a particular LTO version that you cannot test, pleas
If you have any questions or need further assistance, feel free to reach out: If you have any questions or need further assistance, feel free to reach out:
- **Email**: [maksym.sadovnychyy@gmail.com](mailto:maksym.sadovnychyy@gmail.com) - **Email**: [maksym.sadovnychyy@gmail.com](mailto:maksym.sadovnychyy@gmail.com)
- **Reddit**: [MaksIT.LTO.Backup: A Simplified CLI Tool for Windows LTO Tape Backups](https://www.reddit.com/r/MaksIT/comments/1ghgbx5/maksitltobackup_a_simplified_cli_tool_for_windows/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)
Thank you for considering contributing, and feel free to reach out if you have questions! Your support helps make MaksIT.LTO.Backup better for everyone. Thank you for considering contributing, and feel free to reach out if you have questions! Your support helps make MaksIT.LTO.Backup better for everyone.

View File

@ -25,8 +25,9 @@ A C# application designed to facilitate backup and restore operations to an LTO
``` ```
2. Ensure `.NET8 SDK` is installed on your system. 2. Ensure `.NET8 SDK` is installed on your system.
3. Prepare a `configuration.json` file in the application directory with the following structure: 3. Prepare a `configuration.json` file in the application directory with the following structure:
```json
{ ```json
{
"TapePath": "\\\\.\\Tape0", "TapePath": "\\\\.\\Tape0",
"WriteDelay": 100, "WriteDelay": 100,
"Backups": [ "Backups": [
@ -66,8 +67,8 @@ A C# application designed to facilitate backup and restore operations to an LTO
} }
} }
] ]
} }
``` ```
## Usage ## Usage
@ -150,6 +151,13 @@ Below is an example configuration setup for an LTO-6 tape generation backup oper
Errors during backup or restore are caught and logged to the console. Ensure that your `TapeDeviceHandler` is correctly configured and that the tape drive is accessible. Errors during backup or restore are caught and logged to the console. Ensure that your `TapeDeviceHandler` is correctly configured and that the tape drive is accessible.
## Contact
If you have any questions or need further assistance, feel free to reach out:
- **Email**: [maksym.sadovnychyy@gmail.com](mailto:maksym.sadovnychyy@gmail.com)
- **Reddit**: [MaksIT.LTO.Backup: A Simplified CLI Tool for Windows LTO Tape Backups](https://www.reddit.com/r/MaksIT/comments/1ghgbx5/maksitltobackup_a_simplified_cli_tool_for_windows/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)
## License ## License
This project is licensed under the terms of the GPLv2. See the [LICENSE](./LICENSE) file for full details. This project is licensed under the terms of the GPLv2. See the [LICENSE](./LICENSE) file for full details.

View File

@ -0,0 +1,17 @@
@echo off
:: Set PowerShell script path
set SCRIPT_PATH="%~dp0dotnet_build_script.ps1"
:: Check if PowerShell script exists
if not exist %SCRIPT_PATH% (
echo PowerShell script not found: %SCRIPT_PATH%
exit /b 1
)
:: Execute PowerShell script
PowerShell -NoProfile -ExecutionPolicy Bypass -File %SCRIPT_PATH%
:: Pause to keep the window open
echo.
pause

View File

@ -0,0 +1,39 @@
# Define project path
$projectPath = "./YourProject.csproj"
# List of runtime identifiers for self-contained deployments
$runtimes = @(
"win-x64"
)
# Define build configurations
$configurations = @(
"Release"
)
# Output directory
$outputDir = "./build_outputs"
# Clean output directory if exists, then recreate it
if (Test-Path -Path $outputDir) {
Remove-Item -Recurse -Force -Path $outputDir
}
New-Item -ItemType Directory -Path $outputDir
# Build "normal" binaries (framework-dependent)
foreach ($config in $configurations) {
$normalBinOutput = "$outputDir/normal/$config"
dotnet publish $projectPath -c $config -o $normalBinOutput --self-contained false
Write-Output "Built normal bin for configuration: $config"
}
# Build "self-contained" binaries for multiple runtimes
foreach ($config in $configurations) {
foreach ($runtime in $runtimes) {
$selfContainedOutput = "$outputDir/self-contained/$config/$runtime"
dotnet publish $projectPath -c $config -r $runtime --self-contained true -o $selfContainedOutput
Write-Output "Built self-contained bin for configuration: $config, runtime: $runtime"
}
}
Write-Output "Build process completed!"