mirror of
https://github.com/dlang/dmd.git
synced 2025-04-25 20:50:41 +03:00
Fix building the Dub frontend package on Windows
The Dub package was unconditionally running the `config.sh` shell script to generate the `VERSION` file. A Bash shell script will not work on Windows. Therefore the `config.sh` script has been ported to D, which will work on both Windows and Posix.
This commit is contained in:
parent
927de2e31a
commit
71e2660171
4 changed files with 96 additions and 21 deletions
6
dub.sdl
6
dub.sdl
|
@ -29,7 +29,8 @@ subPackage {
|
|||
"src/dmd/tokens.d" \
|
||||
"src/dmd/utf.d"
|
||||
|
||||
preGenerateCommands `cd "$${DUB_PACKAGE_DIR}" && ./config.sh generated/dub VERSION /etc`
|
||||
preGenerateCommands `"$${DC}" -run "$${DUB_PACKAGE_DIR}/config.d" "$${DUB_PACKAGE_DIR}/generated/dub" "$${DUB_PACKAGE_DIR}/VERSION" /etc` platform="posix"
|
||||
preGenerateCommands `"%DC%" -run "%DUB_PACKAGE_DIR%/config.d" "%DUB_PACKAGE_DIR%/generated/dub" "%DUB_PACKAGE_DIR%/VERSION"` platform="windows"
|
||||
stringImportPaths "generated/dub"
|
||||
|
||||
dependency "dmd:root" version="*"
|
||||
|
@ -53,7 +54,8 @@ subPackage {
|
|||
subPackage {
|
||||
name "frontend"
|
||||
targetType "library"
|
||||
preGenerateCommands `cd "$${DUB_PACKAGE_DIR}" && ./config.sh generated/dub VERSION /etc`
|
||||
preGenerateCommands `"$${DC}" -run "$${DUB_PACKAGE_DIR}/config.d" "$${DUB_PACKAGE_DIR}/generated/dub" "$${DUB_PACKAGE_DIR}/VERSION" /etc` platform="posix"
|
||||
preGenerateCommands `"%DC%" -run "%DUB_PACKAGE_DIR%/config.d" "%DUB_PACKAGE_DIR%/generated/dub" "%DUB_PACKAGE_DIR%/VERSION"` platform="windows"
|
||||
stringImportPaths "generated/dub"
|
||||
stringImportPaths "res"
|
||||
versions "NoBackend"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue