Merge pull request #5 from abbodi1406/master

This commit is contained in:
awuctl 2020-10-21 08:08:59 +02:00 committed by GitHub
commit 1b8b845285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 15 deletions

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
scriptName="UUP Converter v0.6.0" scriptName="UUP Converter v0.6.2"
UUP_CONVERTER_SCRIPT=1 UUP_CONVERTER_SCRIPT=1
if [ -f `dirname $0`/convert_ve_plugin ]; then if [ -f `dirname $0`/convert_ve_plugin ]; then
@ -39,8 +39,12 @@ enterprises
enterpriseseval enterpriseseval
enterprisesn enterprisesn
enterprisesneval enterprisesneval
holographic
iotenterprise
iotenterprises
iotuap iotuap
onecoreupdateos onecoreupdateos
ppipro
professional professional
professionalcountryspecific professionalcountryspecific
professionaleducation professionaleducation
@ -55,6 +59,8 @@ serverazurecor
serverazurecorcore serverazurecorcore
serverazurenano serverazurenano
serverazurenanocore serverazurenanocore
serverazurestackhcicor
serverazurestackhcicorcore
servercloudstorage servercloudstorage
servercloudstoragecore servercloudstoragecore
serverdatacenter serverdatacenter
@ -94,6 +100,10 @@ serverstorageworkgroup
serverstorageworkgroupcore serverstorageworkgroupcore
serverstorageworkgroupeval serverstorageworkgroupeval
serverstorageworkgroupevalcore serverstorageworkgroupevalcore
serverturbine
serverturbinecor
serverturbinecorcore
serverturbinecore
serverweb serverweb
serverwebcore serverwebcore
starter starter
@ -124,6 +134,8 @@ sources/appraiser.dll
sources/ARUNIMG.dll sources/ARUNIMG.dll
sources/arunres.dll sources/arunres.dll
sources/autorun.dll sources/autorun.dll
sources/bcd.dll
sources/bootsvc.dll
sources/cmisetup.dll sources/cmisetup.dll
sources/compatctrl.dll sources/compatctrl.dll
sources/compatprovider.dll sources/compatprovider.dll
@ -143,8 +155,8 @@ sources/hwcompat.dll
sources/hwcompat.txt sources/hwcompat.txt
sources/hwexclude.txt sources/hwexclude.txt
sources/idwbinfo.txt sources/idwbinfo.txt
sources/imagelib.dll
sources/imagingprovider.dll sources/imagingprovider.dll
sources/inf/setup.cfg
sources/input.dll sources/input.dll
sources/lang.ini sources/lang.ini
sources/locale.nls sources/locale.nls
@ -161,6 +173,7 @@ sources/reagent.xml
sources/rollback.exe sources/rollback.exe
sources/schema.dat sources/schema.dat
sources/segoeui.ttf sources/segoeui.ttf
sources/ServicingCommon.dll
sources/setup.exe sources/setup.exe
sources/setupcompat.dll sources/setupcompat.dll
sources/SetupCore.dll sources/SetupCore.dll
@ -195,6 +208,7 @@ sources/wdscsl.dll
sources/wdsimage.dll sources/wdsimage.dll
sources/wdstptc.dll sources/wdstptc.dll
sources/wdsutil.dll sources/wdsutil.dll
sources/wimgapi.dll
sources/wimprovider.dll sources/wimprovider.dll
sources/win32ui.dll sources/win32ui.dll
sources/WinDlp.dll sources/WinDlp.dll
@ -221,11 +235,11 @@ sources/..-.*/reagent.adml
sources/..-.*/reagent.dll.mui sources/..-.*/reagent.dll.mui
sources/..-.*/rollback.exe.mui sources/..-.*/rollback.exe.mui
sources/..-.*/setup.exe.mui sources/..-.*/setup.exe.mui
sources/..-.*/setup_help_upgrade_or_custom.rtf
sources/..-.*/setupcompat.dll.mui sources/..-.*/setupcompat.dll.mui
sources/..-.*/SetupCore.dll.mui sources/..-.*/SetupCore.dll.mui
sources/..-.*/setupplatform.exe.mui sources/..-.*/setupplatform.exe.mui
sources/..-.*/SetupPrep.exe.mui sources/..-.*/SetupPrep.exe.mui
sources/..-.*/setup_help_upgrade_or_custom.rtf
sources/..-.*/smiengine.dll.mui sources/..-.*/smiengine.dll.mui
sources/..-.*/spwizres.dll.mui sources/..-.*/spwizres.dll.mui
sources/..-.*/upgloader.dll.mui sources/..-.*/upgloader.dll.mui
@ -236,6 +250,7 @@ sources/..-.*/vofflps_server.rtf
sources/..-.*/w32uires.dll.mui sources/..-.*/w32uires.dll.mui
sources/..-.*/wdsclient.dll.mui sources/..-.*/wdsclient.dll.mui
sources/..-.*/wdsimage.dll.mui sources/..-.*/wdsimage.dll.mui
sources/..-.*/wimgapi.dll.mui
sources/..-.*/wimprovider.dll.mui sources/..-.*/wimprovider.dll.mui
sources/..-.*/WinDlp.dll.mui sources/..-.*/WinDlp.dll.mui
sources/..-.*/winsetup.dll.mui' sources/..-.*/winsetup.dll.mui'
@ -381,7 +396,8 @@ if [ $runVirtualEditions -eq 1 ] && [ "$VIRTUAL_EDITIONS_PLUGIN_LOADED" != "1" ]
runVirtualEditions=0 runVirtualEditions=0
fi fi
for file in `find "$uupDir" -type f -iname "*.cab"`; do reffiles=0
for file in `find "$uupDir" -type f -iname "*.cab" -not -iname "*windows10.0-kb*.cab"`; do
fileName=`basename $file .cab` fileName=`basename $file .cab`
echo -e "$infoColor""CAB -> ESD:""$resetColor"" $fileName" echo -e "$infoColor""CAB -> ESD:""$resetColor"" $fileName"
@ -392,6 +408,8 @@ for file in `find "$uupDir" -type f -iname "*.cab"`; do
wimlib-imagex capture "$extractDir" "$tempDir/$fileName.esd" >/dev/null wimlib-imagex capture "$extractDir" "$tempDir/$fileName.esd" >/dev/null
errorHandler $? "Failed to create $fileName.esd" errorHandler $? "Failed to create $fileName.esd"
let reffiles++
rm -rf "$extractDir" rm -rf "$extractDir"
done done
@ -420,7 +438,7 @@ echo ""
echo -e "$infoColor""Creating boot.wim...""$resetColor" echo -e "$infoColor""Creating boot.wim...""$resetColor"
cp "$tempDir/winre.wim" ISODIR/sources/boot.wim cp "$tempDir/winre.wim" ISODIR/sources/boot.wim
wimlib-imagex info ISODIR/sources/boot.wim 1 "Microsoft Windows PE" \ wimlib-imagex info ISODIR/sources/boot.wim 1 "Microsoft Windows PE" "Microsoft Windows PE" \
--image-property FLAGS=9 >/dev/null --image-property FLAGS=9 >/dev/null
wimlib-imagex extract ISODIR/sources/boot.wim 1 --dest-dir="$tempDir" \ wimlib-imagex extract ISODIR/sources/boot.wim 1 --dest-dir="$tempDir" \
@ -449,7 +467,7 @@ wimlib-imagex update ISODIR/sources/boot.wim 1 \
--command "delete /Windows/System32/winpeshl.ini" >/dev/null --command "delete /Windows/System32/winpeshl.ini" >/dev/null
wimlib-imagex export "$tempDir/winre.wim" 1 \ wimlib-imagex export "$tempDir/winre.wim" 1 \
ISODIR/sources/boot.wim "Microsoft Windows Setup" ISODIR/sources/boot.wim "Microsoft Windows Setup" "Microsoft Windows Setup"
errorHandler $? "Failed to create second index of boot.wim" errorHandler $? "Failed to create second index of boot.wim"
@ -469,6 +487,7 @@ list=
echo "delete /Windows/System32/winpeshl.ini" >"$tempDir/update.txt" echo "delete /Windows/System32/winpeshl.ini" >"$tempDir/update.txt"
echo "add ISODIR/setup.exe /setup.exe" >>"$tempDir/update.txt" echo "add ISODIR/setup.exe /setup.exe" >>"$tempDir/update.txt"
echo "add ISODIR/sources/inf/setup.cfg /sources/inf/setup.cfg" >>"$tempDir/update.txt"
echo "add ISODIR/sources/background_cli.bmp /sources/background.bmp" >>"$tempDir/update.txt" echo "add ISODIR/sources/background_cli.bmp /sources/background.bmp" >>"$tempDir/update.txt"
echo "add ISODIR/sources/background_cli.bmp /Windows/system32/winre.jpg" >>"$tempDir/update.txt" echo "add ISODIR/sources/background_cli.bmp /Windows/system32/winre.jpg" >>"$tempDir/update.txt"
for i in $files; do for i in $files; do
@ -491,13 +510,21 @@ for metadata in $metadataFiles; do
echo -e "$infoColor""Exporting $editionName to install.$type...""$resetColor" echo -e "$infoColor""Exporting $editionName to install.$type...""$resetColor"
if [ $reffiles -ge 1 ]; then
wimlib-imagex export "$metadata" 3 ISODIR/sources/install.$type \ wimlib-imagex export "$metadata" 3 ISODIR/sources/install.$type \
"$editionName" $compressParam --ref="$uupDir/*.esd" --ref "$tempDir/*.esd" "$editionName" $compressParam --ref="$uupDir/*.esd" --ref "$tempDir/*.esd"
else
wimlib-imagex export "$metadata" 3 ISODIR/sources/install.$type \
"$editionName" $compressParam --ref="$uupDir/*.esd"
fi
errorHandler $? "Failed to export $editionName to install.$type""$resetColor" errorHandler $? "Failed to export $editionName to install.$type""$resetColor"
let indexesExported++ let indexesExported++
wimlib-imagex info ISODIR/sources/install.$type $indexesExported \
--image-property FLAGS="$currentEdition" >/dev/null
echo "" echo ""
echo -e "$infoColor""Adding winre.wim for $editionName...""$resetColor" echo -e "$infoColor""Adding winre.wim for $editionName...""$resetColor"
wimlib-imagex update ISODIR/sources/install.$type $indexesExported \ wimlib-imagex update ISODIR/sources/install.$type $indexesExported \
@ -547,14 +574,17 @@ if [ -e "$isoName" ]; then
rm "$isoName" rm "$isoName"
fi fi
echo -e "$infoColor""Optimizing install.$type...""$resetColor" if [ $addedVirtualEditions -ge 1 ]; then
wimlib-imagex optimize ISODIR/sources/install.$type echo -e "$infoColor""Optimizing install.$type...""$resetColor"
echo "" wimlib-imagex optimize ISODIR/sources/install.$type
echo ""
fi
if [ $build -ge 18890 ]; then if [ $build -ge 18890 ]; then
wimlib-imagex extract "$firstMetadata" 3 "/Windows/Boot/Fonts" \ wimlib-imagex extract "$firstMetadata" 3 "/Windows/Boot/Fonts" \
--no-acls --dest-dir="ISODIR/boot" >/dev/null --no-acls --dest-dir="ISODIR/boot" >/dev/null
mv -f ISODIR/boot/Fonts/* ISODIR/boot/fonts mv -f ISODIR/boot/Fonts/* ISODIR/boot/fonts
cp ISODIR/boot/fonts/* ISODIR/efi/microsoft/boot/fonts
rm -r ISODIR/boot/Fonts rm -r ISODIR/boot/Fonts
fi fi
@ -567,9 +597,14 @@ if [ -z "$genisoimage" ]; then
genisoimage="$(command -v mkisofs)" genisoimage="$(command -v mkisofs)"
fi fi
"$genisoimage" -b "boot/etfsboot.com" --no-emul-boot \ if [ "$arch" == "arm64" ]; then
"$genisoimage" -b "efi/microsoft/boot/efisys.bin" --no-emul-boot \
--udf --hide "*" -V "$isoLabel" -o "$isoName" ISODIR
else
"$genisoimage" -b "boot/etfsboot.com" --no-emul-boot \
--eltorito-alt-boot -b "efi/microsoft/boot/efisys.bin" --no-emul-boot \ --eltorito-alt-boot -b "efi/microsoft/boot/efisys.bin" --no-emul-boot \
--udf --hide "*" -V "$isoLabel" -o "$isoName" ISODIR --udf --hide "*" -V "$isoLabel" -o "$isoName" ISODIR
fi
errorHandler $? "Failed to create ISO image""$resetColor" errorHandler $? "Failed to create ISO image""$resetColor"

View File

@ -1425,7 +1425,10 @@ function createVirtualEdition() {
wimlib-imagex info ISODIR/sources/install.$type "$newName" \ wimlib-imagex info ISODIR/sources/install.$type "$newName" \
--image-property DESCRIPTION="$description" \ --image-property DESCRIPTION="$description" \
--image-property WINDOWS/EDITIONID=$edition --image-property DISPLAYNAME="$description" \
--image-property DISPLAYDESCRIPTION="$description" \
--image-property WINDOWS/EDITIONID=$edition \
--image-property FLAGS=$edition
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo "Failed to update information for $edition." echo "Failed to update information for $edition."