Skip to content

Commit ff722ae

Browse files
committed
Merge remote-tracking branch 'upstream/master' into stable
2 parents bd13bfa + 764e4d9 commit ff722ae

File tree

11 files changed

+44
-216
lines changed

11 files changed

+44
-216
lines changed

.github/workflows/build_release_template.yml

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
for REPO in dmd phobos
110110
do
111111
REV=$( git -C $REPO rev-parse HEAD )
112-
echo "::set-output name=$REPO-revision::$REV"
112+
echo "$REPO-revision=$REV" >> $GITHUB_OUTPUT
113113
done
114114
115115
runs-on: ubuntu-latest
@@ -217,7 +217,7 @@ jobs:
217217
set -euox pipefail
218218
219219
# Fetch GPG key used to sign the generated binaries
220-
curl https://dlang.org/d-keyring.gpg -o d-keyring.gpg
220+
curl -fsS https://dlang.org/d-keyring.gpg -o d-keyring.gpg
221221
gpg --import d-keyring.gpg
222222
223223
# Compile release builder
@@ -227,40 +227,33 @@ jobs:
227227
# Determine installed LDC version
228228
LDC=$(head -n 1 < <(ldc2 --version) | cut -d'(' -f2 | cut -d')' -f1)
229229
230-
# WINDOWS: Fetch additional DM tools
230+
# Windows: set LDC_VSDIR
231231
if [[ "${{ matrix.target }}" == "windows" ]]
232232
then
233-
234-
# Fetch DMC (incl. DM make and sppn.exe)
235-
curl https://downloads.dlang.org/other/dm857c.zip -o dmc.zip
236-
7z x dmc.zip
237-
curl http://ftp.digitalmars.com/sppn.zip -o sppn.zip
238-
7z x -odm/bin sppn.zip
239-
240-
# Fetch implib
241-
curl http://ftp.digitalmars.com/bup.zip -o bup.zip
242-
7z x bup.zip dm/bin/implib.exe
243-
244-
# Add DM binaries to the path
245-
export PATH="$PWD/dm/bin;$PATH"
246-
247-
# Export VS dir
248233
export LDC_VSDIR='C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise'
249234
fi
250235
251-
# Workaround: Provide ldmd2 as dmd replacement as some tools assume DMD is present:
252-
mkdir .pathext
253-
ln -s "$(which ldmd2)" .pathext/dmd
254-
if [[ "${{ matrix.target }}" == "windows" ]]
255-
then
256-
PATH="$PATH;$PWD/.pathext"
257-
else
258-
PATH="$PATH:$PWD/.pathext"
259-
fi
260-
261236
# Build the release
262237
./build_all --targets=${{ matrix.target }} "v$LDC" ${{ inputs.release_branch }}
263238
239+
- name: 'Windows: Build NSIS installer'
240+
if: matrix.target == 'windows'
241+
shell: cmd
242+
run: |
243+
:: install NSIS plugin from https://nsis.sourceforge.io/Inetc_plug-in
244+
curl -fsSL https://nsis.sourceforge.io/mediawiki/images/c/c9/Inetc.zip -o inetc.zip || exit /b
245+
7z x inetc.zip -y -bb1 "-oc:\Program Files (x86)\NSIS" || exit /b
246+
247+
:: unpack release .7z generated in previous step
248+
7z x create_dmd_release\build\dmd.${{ inputs.release_branch }}.windows.7z -odmd.windows || exit /b
249+
250+
@echo on
251+
"c:\Program Files (x86)\NSIS\makensis" /version
252+
for /f %%v in (dmd.windows\dmd2\src\VERSION) do set ver=%%v
253+
cd windows || exit /b
254+
"c:\Program Files (x86)\NSIS\makensis" /DVersion2=%ver% /DEmbedD2Dir=..\dmd.windows\dmd2 d2-installer.nsi || exit /b
255+
copy dmd-*.exe ..\create_dmd_release\build || exit /b
256+
264257
#################################################################
265258
# FREEBSD: Build for the current target using build_all.d from installer
266259
#
@@ -280,11 +273,11 @@ jobs:
280273
sudo pkg install -y curl curlpp git gmake pkgconf gnupg rsync llvm
281274
282275
# Import key used to sign binaries
283-
curl https://dlang.org/d-keyring.gpg -o d-keyring.gpg
276+
curl -fsS https://dlang.org/d-keyring.gpg -o d-keyring.gpg
284277
gpg d-keyring.gpg
285278
286279
# Install ldc
287-
curl https://dlang.org/install.sh -o install.sh
280+
curl -fsS https://dlang.org/install.sh -o install.sh
288281
bash install.sh ldc -p .
289282
290283
# Use absolute paths because activate doesn't work correctly
@@ -310,8 +303,8 @@ jobs:
310303
with:
311304
name: dmd-release-${{ matrix.target }}
312305
path: |
313-
${{ github.workspace }}/create_dmd_release/build/*
314-
!${{ github.workspace }}/create_dmd_release/build/*.zip
306+
create_dmd_release/build/*
307+
!create_dmd_release/build/*.zip
315308
retention-days: 1
316309
if-no-files-found: error
317310

.github/workflows/build_windows.yml

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -72,97 +72,3 @@ jobs:
7272
with:
7373
name: curl
7474
path: artifacts/
75-
76-
build_docs:
77-
name: Build docs
78-
runs-on: ubuntu-20.04
79-
timeout-minutes: 120
80-
steps:
81-
- uses: actions/checkout@v4
82-
with:
83-
fetch-depth: 1
84-
- name: Clone repos
85-
run: |
86-
set -eux
87-
git clone --branch $BRANCH https://github.com/dlang/dlang.org.git work/dlang.org
88-
git clone --branch $BRANCH https://github.com/dlang/dmd.git work/dmd
89-
git clone --branch $BRANCH https://github.com/dlang/phobos.git work/phobos
90-
- name: Build docs
91-
run: make -C work/dlang.org -f posix.mak release
92-
- name: Zip
93-
run: |
94-
set -eux
95-
mkdir -p work/docs
96-
zip -r work/docs/docs.zip work/dlang.org/web
97-
- uses: actions/upload-artifact@v4
98-
with:
99-
name: docs
100-
path: work/docs
101-
102-
build_release:
103-
name: Build release
104-
runs-on: windows-2019
105-
timeout-minutes: 120
106-
needs: build_docs
107-
env:
108-
LDC_VSDIR: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\
109-
HOST_LDC_VERSION: 1.23.0
110-
steps:
111-
- uses: actions/checkout@v4
112-
with:
113-
fetch-depth: 1
114-
- name: Download docs artifact
115-
uses: actions/download-artifact@v4
116-
with:
117-
name: docs
118-
path: docs/
119-
- name: Install prerequisites
120-
shell: bash
121-
run: |
122-
set -eux
123-
powershell -command "& { iwr https://github.com/ldc-developers/ldc/releases/download/v$HOST_LDC_VERSION/ldc2-$HOST_LDC_VERSION-windows-multilib.7z -OutFile ldc.7z }"
124-
7z x ldc.7z
125-
mv ldc2-$HOST_LDC_VERSION-windows-multilib ldc2
126-
powershell -command "& { iwr https://downloads.dlang.org/other/dm857c.zip -OutFile dmc.zip }"
127-
7z x dmc.zip
128-
powershell -command "& { iwr http://ftp.digitalmars.com/sppn.zip -OutFile sppn.zip }"
129-
7z x -odm/bin sppn.zip
130-
powershell -command "& { iwr http://ftp.digitalmars.com/bup.zip -OutFile bup.zip }"
131-
7z x bup.zip dm/bin/implib.exe
132-
powershell -command "& { iwr https://nsis.sourceforge.io/mediawiki/images/c/c9/Inetc.zip -OutFile inetc.zip }"
133-
7z x inetc.zip -y -bb1 '-oc:\Program Files (x86)\NSIS'
134-
- name: Unzip docs
135-
shell: bash
136-
run: |
137-
set -eux
138-
unzip docs/docs.zip
139-
mv work/dlang.org/web create_dmd_release/docs
140-
- name: Build release
141-
shell: bash
142-
run: |
143-
set -eux
144-
powershell -command "& { iwr https://dlang.org/d-keyring.gpg -OutFile d-keyring.gpg }"
145-
gpg --import d-keyring.gpg
146-
export PATH="$PWD/dm/bin:$PATH"
147-
cd create_dmd_release
148-
../ldc2/bin/ldmd2 -g build_all.d common.d -version=NoVagrant
149-
cp ../ldc2/bin/libcurl.dll .
150-
./build_all v$HOST_LDC_VERSION $BRANCH
151-
- name: Unzip build
152-
shell: bash
153-
run: 7z x create_dmd_release/build/dmd.$BRANCH.windows.zip -odmd.$BRANCH.windows
154-
- name: Build installer
155-
shell: cmd
156-
run: |
157-
@echo on
158-
"c:\Program Files (x86)\NSIS\makensis" /version
159-
for /f %%v in (dmd.%BRANCH%.windows\dmd2\src\version) do set ver=%%v
160-
cd windows || exit /b
161-
"c:\Program Files (x86)\NSIS\makensis" /DVersion2=%ver% /DEmbedD2Dir=..\dmd.%BRANCH%.windows\dmd2 d2-installer.nsi || exit /b
162-
cd .. || exit /b
163-
mkdir artifacts || exit /b
164-
copy windows\*.exe artifacts || exit /b
165-
- uses: actions/upload-artifact@v4
166-
with:
167-
name: win_release
168-
path: artifacts/

create_dmd_release/build_all.d

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,6 @@ int main(string[] args)
574574
immutable isPreRelease = isBranch || !verMatch.captures[4].empty;
575575
immutable dubTag = isBranch ? gitTag : getDubTag(isPreRelease);
576576

577-
enum libC = "snn.lib";
578577
enum libCurl = "libcurl-7.68.0-WinSSL-zlib-x86-x64.zip";
579578
enum mingwtag = "mingw-libs-8.0.0";
580579
enum mingwlibs = mingwtag ~ ".zip"; enum mingw_sha = hexString!"8c1619234ca8370b742a08a30b13bf9bdb333f842ed0ea02cafe9054c68adc97";
@@ -598,7 +597,6 @@ int main(string[] args)
598597
const hasWindows = platforms.any!(p => p.os == OS.windows);
599598
if (hasWindows)
600599
{
601-
fetchFile("http://ftp.digitalmars.com/"~libC, cacheDir~"/"~libC);
602600
fetchFile("https://downloads.dlang.org/other/"~libCurl, cacheDir~"/"~libCurl, verifySignature);
603601
fetchFile("https://downloads.dlang.org/other/"~lld, cacheDir~"/"~lld, verifySignature, lld_sha);
604602
fetchFile("https://downloads.dlang.org/other/"~lld64, cacheDir~"/"~lld64, verifySignature, lld64_sha);
@@ -626,10 +624,6 @@ int main(string[] args)
626624

627625
if (hasWindows)
628626
{
629-
if (exists(workDir~"/windows/extraBins/dmd2/windows/bin/link.exe"))
630-
remove(workDir~"/windows/extraBins/dmd2/windows/bin/link.exe");
631-
// add latest dmc libC (snn.lib)
632-
copyFile(cacheDir~"/"~libC, workDir~"/windows/extraBins/dmd2/windows/lib/"~libC);
633627
// add libcurl build for windows
634628
extract(cacheDir~"/"~libCurl, workDir~"/windows/extraBins/");
635629
// add mingw coff libraries
@@ -656,7 +650,7 @@ int main(string[] args)
656650
scp(toCopy, "default:");
657651
if (os != OS.linux && !skipDocs) scp(workDir~"/docs", "default:");
658652
// copy create_dmd_release.d and dependencies
659-
scp("create_dmd_release.d common.d", "default:");
653+
scp("create_dmd_release.d common.d extras", "default:");
660654
version (CodeSign) if (!isBranch)
661655
scp(workDir~"/codesign codesign", "default:");
662656

create_dmd_release/create_dmd_release.d

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ Prerequisites to Run:
88
- Git
99
- Posix: Working gcc toolchain, including GNU make which is not installed on
1010
FreeBSD by default. On OSX, you can install the gcc toolchain through Xcode.
11-
- Windows: Working DMC (incl. sppn.exe and implib.exe) and 32/64-bit MSVC
12-
toolchains. dmc.exe, DM lib.exe, sppn.exe and implib.exe must be found in PATH,
13-
so it's recommended to set the DMC bin dir as *first* dir in PATH.
14-
Also, this environment variable must be set:
11+
- Windows: Working 32/64-bit MSVC toolchains. Also, this environment variable
12+
must be set:
1513
LDC_VSDIR: Visual Studio directory containing the MSVC toolchains
1614
Examples:
1715
set LDC_VSDIR="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\"
@@ -277,8 +275,8 @@ void init(string branch)
277275
releaseLib32Dir = osDir ~ "/lib" ~ suffix32;
278276
releaseBin64Dir = osDir ~ "/bin" ~ suffix64;
279277
releaseLib64Dir = osDir ~ "/lib" ~ suffix64;
280-
allExtrasDir = cloneDir ~ "/installer/create_dmd_release/extras/all";
281-
osExtrasDir = cloneDir ~ "/installer/create_dmd_release/extras/" ~ osDirName;
278+
allExtrasDir = origDir ~ "/extras/all";
279+
osExtrasDir = origDir ~ "/extras/" ~ osDirName;
282280
}
283281

284282
void cleanAll(string branch)
@@ -510,6 +508,8 @@ void createRelease(string branch)
510508
if(do32Bit)
511509
{
512510
copyFile(cloneDir~"/dmd/generated/"~osDirName~"/release/32/dmd"~exe, releaseBin32Dir~"/dmd"~exe);
511+
version(Windows)
512+
copyFile(cloneDir~"/dmd/compiler/ini/windows/bin/sc.ini", releaseBin32Dir~"/sc.ini");
513513
copyDir(cloneDir~"/tools/generated/"~osDirName~"/32", releaseBin32Dir, file => !file.endsWith(obj));
514514
copyFile(cloneDir~"/dub/bin/dub32"~exe, releaseBin32Dir~"/dub"~exe);
515515
if (codesign)

create_dmd_release/extras/all/dmd2/README.TXT

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,3 @@
22
Digital Mars D Compiler Package
33
-------------------------------
44

5-
Windows Programmers:
6-
--------------------
7-
8-
Be sure and also download and install the Digital Mars C/C++ compiler
9-
toolset ftp://ftp.digitalmars.com/dmc.zip, which contains the linker
10-
and necessary libraries.
11-
12-
Linux Programmers:
13-
------------------
14-
15-
You may need to install libstdc++.so.5.
16-
17-
Fedora 6+:
18-
19-
You can get libstdc++.so.5 by installing the 'compat-libstdc++-<XX>' package,
20-
where '<XX>' varies by distribution but is usually '33'.
21-
22-
Ubuntu 6.06+:
23-
24-
You can get libstdc++.so.5 by installing 'libstdc++5'.
25-

create_dmd_release/extras/windows/dmd2/windows/bin/README.TXT

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ sc.ini D compiler configuration file http://dlang.org/dmd-windows.html#sc_ini
77
ddemangle.exe D symbol demangler
88
dub.exe D's package manager https://github.com/dlang/dub
99
dustmite.exe D source code minimizer https://github.com/CyberShadow/DustMite
10-
lib.exe Librarian http://www.digitalmars.com/ctg/lib.html
1110
libcurl.dll Curl Library https://curl.haxx.se/
1211
lld-link.exe LLVM Linker https://lld.llvm.org/
13-
make.exe Make program http://www.digitalmars.com/ctg/make.html
1412
rdmd.exe Run D program as a script http://dlang.org/rdmd.html
15-
replace.exe Find/replace text in file(s)
16-
shell.exe Test script runner http://www.digitalmars.com/ctg/shell.html

create_dmd_release/extras/windows/dmd2/windows/bin/sc.ini

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
Win64 files
3+
-----------
4+
5+
dmd.exe D compiler http://dlang.org/dmd-windows.html
6+
sc.ini D compiler configuration file http://dlang.org/dmd-windows.html#sc_ini
7+
ddemangle.exe D symbol demangler
8+
dub.exe D's package manager https://github.com/dlang/dub
9+
dustmite.exe D source code minimizer https://github.com/CyberShadow/DustMite
10+
libcurl.dll Curl Library https://curl.haxx.se/
11+
lld-link.exe LLVM Linker https://lld.llvm.org/
12+
rdmd.exe Run D program as a script http://dlang.org/rdmd.html

create_dmd_release/extras/windows/dmd2/windows/lib/README.TXT

Lines changed: 0 additions & 26 deletions
This file was deleted.

windows/d2-installer-descriptions.nsh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ LangString DESC_SMShortcuts ${LANG_ENGLISH} "Add Shortcuts to the Start Menu to
88
LangString DESC_AddD2ToPath ${LANG_ENGLISH} "Modify the PATH environment variable so DMD can be used from any command prompt"
99

1010
LangString DESC_VisualDDownload ${LANG_ENGLISH} "Visual Studio package providing both project management and language services. It works with Visual Studio 2008-2017 (and the free VS Shells)"
11-
LangString DESC_DmcDownload ${LANG_ENGLISH} "Digital Mars C/C++ compiler"
1211

1312

1413
; Shortcuts
@@ -23,5 +22,4 @@ LangString SHORTCUT_Uninstall ${LANG_ENGLISH} "Uninstall"
2322
!insertmacro MUI_DESCRIPTION_TEXT ${StartMenuShortcuts} $(DESC_SMShortcuts)
2423
!insertmacro MUI_DESCRIPTION_TEXT ${AddD2ToPath} $(DESC_AddD2ToPath)
2524
!insertmacro MUI_DESCRIPTION_TEXT ${VisualDDownload} $(DESC_VisualDDownload)
26-
!insertmacro MUI_DESCRIPTION_TEXT ${DmcDownload} $(DESC_DmcDownload)
2725
!insertmacro MUI_FUNCTION_DESCRIPTION_END

0 commit comments

Comments
 (0)