Skip to content

Commit

Permalink
cleanup for release
Browse files Browse the repository at this point in the history
  • Loading branch information
mattieb committed Oct 16, 2024
1 parent 774613e commit b68e0d6
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"mkhl.shfmt",
"timonwong.shellcheck"
]
}
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Changes

## Unreleased
## 1.0.0 - 2024-10-15

This is the first actual release. Before this point, windows-esd-to-iso was a rolling repository. All changes here are from the original version.

1. Replaced status messages with nicer, easier-to-read messages in color.

2. Added error checking for presence of wimlib tools and ESD image before starting.

3. Added error checking to image count check.

4. Various improvements to code quality.
21 changes: 17 additions & 4 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
Copyright (c) 2023 Mattie Behrens.
Copyright (c) 2023, 2024 Mattie Behrens.

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:
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 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.
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.
45 changes: 39 additions & 6 deletions windows-esd-to-iso
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
#!/bin/sh
#
# Copyright (c) 2023, 2024 Mattie Behrens.
#
# 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.
#

# Color support from portable-color <https://mattiebee.dev/portable-color>

Expand Down Expand Up @@ -77,20 +99,31 @@ print_subtask "Exporting image 1"
wimapply "${esd}" 1 "${tmpdir}"

print_subtask "Exporting image 2"
wimexport "${esd}" 2 "${tmpdir}/sources/boot.wim" --compress=LZX --chunk-size=32K
wimexport "${esd}" 2 \
"${tmpdir}/sources/boot.wim" \
--compress=LZX --chunk-size=32K

print_subtask "Exporting image 3"
wimexport "${esd}" 3 "${tmpdir}/sources/boot.wim" --compress=LZX --chunk-size=32K --boot
wimexport "${esd}" 3 \
"${tmpdir}/sources/boot.wim" \
--compress=LZX --chunk-size=32K --boot

for index in $(seq 4 "${image_count}")
do
for index in $(seq 4 "${image_count}"); do
print_subtask "Exporting image ${index}"
wimexport "${esd}" "${index}" "${tmpdir}/sources/install.esd" --compress=LZMS --chunk-size 128K --recompress
wimexport "${esd}" "${index}" \
"${tmpdir}/sources/install.esd" \
--compress=LZMS --chunk-size 128K --recompress
done

basename="$(basename "${esd}" .esd)"
iso="${basename}.iso"

rm -f "${iso}"
print_task "Creating ${iso}"
hdiutil makehybrid -o "${iso}" -iso -udf -hard-disk-boot -eltorito-boot "${tmpdir}/efi/microsoft/boot/efisys.bin" -iso-volume-name ESD_ISO -udf-volume-name ESD-ISO "${tmpdir}"
hdiutil makehybrid \
-o "${iso}" \
-iso -udf \
-hard-disk-boot -eltorito-boot "${tmpdir}/efi/microsoft/boot/efisys.bin" \
-iso-volume-name ESD_ISO \
-udf-volume-name ESD-ISO \
"${tmpdir}"

0 comments on commit b68e0d6

Please sign in to comment.