mirror of
https://github.com/radareorg/radare2
synced 2026-08-22 20:23:32 -04:00
Add dist/winget for windows packaging
This commit is contained in:
parent
00e8255e09
commit
b586355efe
3 changed files with 81 additions and 0 deletions
33
dist/winget/README.md
vendored
Normal file
33
dist/winget/README.md
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Radare2 Winget Package
|
||||
|
||||
This directory contains the necessary files to build and package Radare2 for Windows using Winget.
|
||||
|
||||
## Building the Package
|
||||
|
||||
1. Run `preconfigure.bat` to set up the build environment.
|
||||
|
||||
2. Run `configure.bat` or `meson setup --buildtype release b` to configure the build.
|
||||
|
||||
3. Run `make.bat` in this directory to build Radare2 and create the zip package.
|
||||
|
||||
## Creating the Winget Manifest
|
||||
|
||||
1. Upload the generated `radare2-6.0.7-w64.zip` to a release on GitHub or another hosting service.
|
||||
|
||||
2. Calculate the SHA256 hash of the zip file: `certutil -hashfile radare2-6.0.7-w64.zip SHA256`
|
||||
|
||||
3. Update the `InstallerSha256` in `RadareOrg.Radare2.yaml` with the calculated hash.
|
||||
|
||||
4. Update the `InstallerUrl` if necessary.
|
||||
|
||||
## Submitting to Winget
|
||||
|
||||
1. Fork the [winget-pkgs](https://github.com/microsoft/winget-pkgs) repository.
|
||||
|
||||
2. Create the directory structure: `manifests/r/RadareOrg/Radare2/6.0.7/`
|
||||
|
||||
3. Place the `RadareOrg.Radare2.yaml` file in that directory.
|
||||
|
||||
4. Submit a pull request.
|
||||
|
||||
For more information, see the [Winget documentation](https://learn.microsoft.com/en-us/windows/package-manager/package/manifest).
|
||||
14
dist/winget/RadareOrg.Radare2.yaml
vendored
Normal file
14
dist/winget/RadareOrg.Radare2.yaml
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
PackageIdentifier: RadareOrg.Radare2
|
||||
PackageVersion: 6.0.7
|
||||
PackageLocale: en-US
|
||||
Publisher: RadareOrg
|
||||
PackageName: Radare2
|
||||
License: LGPL-3.0
|
||||
ShortDescription: Free and open-source reverse engineering framework
|
||||
Installers:
|
||||
- Architecture: x64
|
||||
InstallerType: zip
|
||||
InstallerUrl: https://github.com/radareorg/radare2/releases/download/6.0.7/radare2-6.0.7-w64.zip
|
||||
InstallerSha256: PLACEHOLDER_SHA256
|
||||
ManifestType: singleton
|
||||
ManifestVersion: 1.6.0
|
||||
34
dist/winget/make.bat
vendored
Normal file
34
dist/winget/make.bat
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
@echo off
|
||||
REM Build radare2 for Windows and create zip package for winget
|
||||
if "%*" == "clean" (
|
||||
rmdir /s /q b 2> NUL
|
||||
rmdir /s /q prefix 2> NUL
|
||||
del radare2-6.0.7-w64.zip 2> NUL
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
call ninja.exe --version > NUL 2> NUL && (
|
||||
if EXIST b (
|
||||
call ninja.exe -C b -j 2 && (
|
||||
echo Installing r2 in %CD%\prefix
|
||||
set DESTDIR=%CD%\prefix
|
||||
rmdir /q /s prefix 2> NUL
|
||||
call ninja -C b install > NUL
|
||||
copy /y C:\WINDOWS\System32\vcruntime140.dll %DESTDIR%\bin\vcruntime140.dll
|
||||
REM Create zip package
|
||||
if EXIST radare2-6.0.7-w64.zip del radare2-6.0.7-w64.zip
|
||||
powershell "Compress-Archive -Path prefix\* -DestinationPath radare2-6.0.7-w64.zip"
|
||||
echo Zip package created: radare2-6.0.7-w64.zip
|
||||
exit /b 0
|
||||
) || (
|
||||
echo Ninja compilation has failed
|
||||
exit /b 1
|
||||
)
|
||||
) else (
|
||||
echo Please run configure before make
|
||||
exit /b 1
|
||||
)
|
||||
) || (
|
||||
echo Cannot find the ninja. Please run preconfigure
|
||||
exit /b 1
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue