# Part of JoeyLib, Copyright (c) 2026 Scott Duensing, under the MIT License. # See LICENSE.md for license information. # SPDX-License-Identifier: MIT # # CWSDPMI r7: the DPMI host embedded into every DOS executable # (make/support/dos/embed-dpmi.sh prepends CWSDSTUB.EXE), so programs run # without a separate CWSDPMI.EXE. compDescription="DOS DPMI host: CWSDPMI r7 (embedded into each .EXE)" compGroups="toolchain:dos" compRequires="host" compHostDeps="unzip" compUrl="https://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip" compSha256="deacda0488e1cdd7c4a9f32fab45662b34c0ed6b2d7d4d13bc07041b62004a8c" compPin="$compSha256" compInstall() { local zip zip="$(fetchFile "$compUrl" "$compSha256")" rm -rf "$compDir" # The zip holds bin/ and src/ trees; bin/ is what the build uses. extractArchive "$zip" "$compDir" } compInstalled() { [ -f "$compDir/bin/CWSDSTUB.EXE" ] && [ -f "$compDir/bin/CWSDPMI.EXE" ] } compVerify() { [ "$(head -c 2 "$compDir/bin/CWSDSTUB.EXE")" = "MZ" ] } compEnv() { envVar DOS_CWSDPMI "$compDir/bin" envVar DOS_CWSDSTUB "$compDir/bin/CWSDSTUB.EXE" }