This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$file_name = ($args[0] -replace '\W', '_').ToLower() | |
$file_bytes = [System.IO.File]::ReadAllBytes($args[0]) | |
$hex_array = New-Object string[] $file_bytes.Length | |
for ($i = 0; $i -lt $file_bytes.Length; $i++) { | |
$hex_array[$i] = '0x{0:x2}' -f $file_bytes[$i] | |
} | |
$hex_string = [string]::Join(', ', $hex_array) | |
"unsigned char $file_name[] = { $hex_string };" | |
"unsigned int ${file_name}_len = $($file_bytes.Length);" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
net session 1>NUL 2>NUL || goto :not_admin | |
cd C:\ | |
echo INFO: Installing latest OpenJDK 21 LTS from Microsoft at C:\open-jdk... | |
curl -LO https://aka.ms/download-jdk/microsoft-jdk-21.0.5-windows-x64.zip | |
tar -xf microsoft-jdk-21.0.5-windows-x64.zip | |
del -f microsoft-jdk-21.0.5-windows-x64.zip |