From ec3214bbfeda64be73e5a4ffba56c81a15f5538e Mon Sep 17 00:00:00 2001 From: Gustave Monce Date: Sat, 7 Sep 2024 23:19:53 +0200 Subject: [PATCH] Add docs, ci, and scripts --- .github/workflows/ci.yml | 63 ++++++++++++++++++++++++++++++++++++++++ license.md | 21 ++++++++++++++ publish_win_arm64.cmd | 3 ++ publish_win_x64.cmd | 3 ++ readme.md | 23 +++++++++++++++ 5 files changed, 113 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 license.md create mode 100644 publish_win_arm64.cmd create mode 100644 publish_win_x64.cmd create mode 100644 readme.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5c57355 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,63 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + strategy: + matrix: + target: [win-x86,win-x64,win-arm64] + include: + - target: win-x86 + platform: win + architecture: x86 + - target: win-x64 + platform: win + architecture: x64 + - target: win-arm64 + platform: win + architecture: arm64 + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + + - name: Install .NET SDK + uses: actions/setup-dotnet@v4.0.0 + with: + dotnet-version: "8.0.x" + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v1.3.1 + + - name: Build utilities + shell: pwsh + run: | + msbuild /m /t:restore,ffu2vhdx:publish /p:Platform=${{ matrix.architecture }} /p:RuntimeIdentifier=${{ matrix.platform }}-${{ matrix.architecture }} /p:PublishDir=${{ github.workspace }}/artifacts/${{ matrix.platform }}-${{ matrix.architecture }} /p:PublishSingleFile=true /p:PublishTrimmed=false /p:Configuration=Release Ffu2Vhdx.sln + + - name: Create PDB Output Directory + shell: pwsh + run: | + mkdir ${{ github.workspace }}\artifacts\${{ matrix.platform }}-${{ matrix.architecture }}\PDBs + + - name: Move PDBs + shell: pwsh + run: | + move ${{ github.workspace }}\artifacts\${{ matrix.platform }}-${{ matrix.architecture }}\*.pdb ${{ github.workspace }}\artifacts\${{ matrix.platform }}-${{ matrix.architecture }}\PDBs\ + + - name: Upload artifact (Binaries) + uses: actions/upload-artifact@v3.1.3 + with: + name: ${{ matrix.platform }}-${{ matrix.architecture }}-binaries + path: ${{ github.workspace }}/artifacts/${{ matrix.platform }}-${{ matrix.architecture }} + + - name: Upload artifact (Symbols) + uses: actions/upload-artifact@v3.1.3 + with: + name: ${{ matrix.platform }}-${{ matrix.architecture }}-symbols + path: ${{ github.workspace }}/artifacts/${{ matrix.platform }}-${{ matrix.architecture }}\PDBs \ No newline at end of file diff --git a/license.md b/license.md new file mode 100644 index 0000000..8d200e2 --- /dev/null +++ b/license.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024, Gustave Monce - gus33000.me - @gus33000 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/publish_win_arm64.cmd b/publish_win_arm64.cmd new file mode 100644 index 0000000..030d7ae --- /dev/null +++ b/publish_win_arm64.cmd @@ -0,0 +1,3 @@ +@echo off + +msbuild /m /t:restore,ffu2vhdx:publish /p:Platform=arm64 /p:RuntimeIdentifier=win-arm64 /p:PublishDir="%CD%\publish\artifacts\win-arm64\CLI" /p:PublishSingleFile=true /p:PublishTrimmed=false /p:Configuration=Release Ffu2Vhdx.sln \ No newline at end of file diff --git a/publish_win_x64.cmd b/publish_win_x64.cmd new file mode 100644 index 0000000..4f50ce2 --- /dev/null +++ b/publish_win_x64.cmd @@ -0,0 +1,3 @@ +@echo off + +msbuild /m /t:restore,ffu2vhdx:publish /p:Platform=x64 /p:RuntimeIdentifier=win-x64 /p:PublishDir="%CD%\publish\artifacts\win-x64\CLI" /p:PublishSingleFile=true /p:PublishTrimmed=false /p:Configuration=Release Ffu2Vhdx.sln \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..cecf5e3 --- /dev/null +++ b/readme.md @@ -0,0 +1,23 @@ +# Ffu2Vhdx - Converts any FFU into VHDX file(s) + +## Copyright + +Copyright (c) 2024, Gustave Monce - gus33000.me - @gus33000 + +This software is released under the MIT license, for more information please see LICENSE.md + +## Description + +This tool enables converting Full Flash Update files (FFUs) into VHDX file(s). + +It notably supports every known FFU file format to date, that is: + +- Version 1 +- Version 1.1 (With added compression support) +- Version 2 (With added multi store support) + +For Version 1 FFUs, the tool will create only one VHDX file. + +For Version 1.1 FFUs, conversion is only possible currently on Windows hosts and the tool will create only one VHDX file. + +For Version 2 FFUs, the tool will create more than one VHDX File. \ No newline at end of file