Skip to content

Commit 6043d42

Browse files
authored
Merge pull request #737 from ibuclaw/merge_master
Merge master
2 parents 14737e9 + 65c7449 commit 6043d42

8 files changed

Lines changed: 40 additions & 85 deletions

File tree

‎.github/workflows/build_release_template.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,23 @@ jobs:
5555
with:
5656
repository: 'dlang/dmd'
5757
ref: ${{ inputs.release_branch }}
58+
fetch-depth: 0
5859
path: 'dmd'
5960

6061
- name: Clone phobos
6162
uses: actions/checkout@v4
6263
with:
6364
repository: 'dlang/phobos'
6465
ref: ${{ inputs.release_branch }}
66+
fetch-depth: 0
6567
path: 'phobos'
6668

6769
- name: Clone dlang.org
6870
uses: actions/checkout@v4
6971
with:
7072
repository: 'dlang/dlang.org'
7173
ref: ${{ inputs.release_branch }}
74+
fetch-depth: 0
7275
path: 'dlang.org'
7376

7477
# Fetch host compiler
@@ -126,7 +129,7 @@ jobs:
126129
include:
127130
- os: ubuntu-22.04
128131
target: linux
129-
- os: macos-13
132+
- os: macos-14
130133
target: osx
131134
- os: windows-2022
132135
target: windows

‎create_dmd_release/build_all.d‎

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ struct Box
138138
{
139139
if (src.startsWith("default:"))
140140
src = _tmpdir ~ "/" ~ src[8..$];
141+
else if (src.startsWith("'default:"))
142+
src = "'" ~ _tmpdir ~ "/" ~ src[9..$];
141143
if (tgt.startsWith("default:"))
142144
tgt = _tmpdir ~ "/" ~ tgt[8..$];
143145

@@ -329,18 +331,25 @@ void runBuild(ref Box box, string ver, bool isBranch, bool skipDocs, string ldcV
329331
break;
330332

331333
case OS.windows:
332-
with (box.shell())
334+
version (NoVagrant)
335+
{
336+
// Migrated to GHA build_release_template.yml
337+
}
338+
else
333339
{
334-
cmd(`cd clones\installer\windows`);
335-
cmd(`&'C:\Program Files (x86)\NSIS\makensis'`~
336-
` '/DEmbedD2Dir=C:\Users\vagrant\dmd.`~ver~`.windows\dmd2'`~
337-
` '/DVersion2=`~ver~`' d2-installer.nsi`);
338-
cmd(`move dmd-`~ver~`.exe C:\Users\vagrant\dmd-`~ver~`.exe`);
339-
// sign installer
340-
version (CodeSign)
341-
cmd(`&C:\Users\vagrant\codesign\sign.ps1 C:\Users\vagrant\codesign\win.pfx C:\Users\vagrant\codesign\win.fingerprint C:\Users\vagrant\codesign\win.pass C:\Users\vagrant\dmd-`~ver~`.exe`);
340+
with (box.shell())
341+
{
342+
cmd(`cd clones\installer\windows`);
343+
cmd(`&'C:\Program Files (x86)\NSIS\makensis'`~
344+
` '/DEmbedD2Dir=C:\Users\vagrant\dmd.`~ver~`.windows\dmd2'`~
345+
` '/DVersion2=`~ver~`' d2-installer.nsi`);
346+
cmd(`move dmd-`~ver~`.exe C:\Users\vagrant\dmd-`~ver~`.exe`);
347+
// sign installer
348+
version (CodeSign)
349+
cmd(`&C:\Users\vagrant\codesign\sign.ps1 C:\Users\vagrant\codesign\win.pfx C:\Users\vagrant\codesign\win.fingerprint C:\Users\vagrant\codesign\win.pass C:\Users\vagrant\dmd-`~ver~`.exe`);
350+
}
351+
box.scp("default:dmd-"~ver~".exe", "build/");
342352
}
343-
box.scp("default:dmd-"~ver~".exe", "build/");
344353
break;
345354

346355
case OS.osx:
@@ -636,9 +645,12 @@ int main(string[] args)
636645
immutable ver = gitTag.chompPrefix("v");
637646
mkdirRecurse("build");
638647

639-
version (NoVagrant) version(linux) {} else
640-
if (!skipDocs)
648+
version (NoVagrant)
649+
{
650+
version(linux) {}
651+
else if (!skipDocs)
641652
copyDirectory("docs", workDir);
653+
}
642654

643655
foreach (p; platforms)
644656
{

‎osx/Makefile‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ TARGET_DIR=data
1818
# TARGET_SITE=erdani.com
1919
# TARGET_DIR=d
2020

21-
MAKER:=$(shell \
22-
if [ -f /Developer/usr/bin/packagemaker ];\
23-
then echo /Developer/usr/bin/packagemaker;\
24-
else echo /Applications/PackageMaker.app/Contents/MacOS/PackageMaker;\
25-
fi)
26-
2721
all: dmd.${VERSION}.dmg
2822
rsync -az $< ${TARGET_SITE}:${TARGET_DIR}/dmd.${VERSION}.dmg
2923

@@ -37,7 +31,10 @@ dmd.${VERSION}.dmg: dmd.${VERSION}.osx.zip
3731
rm -rf dmg/
3832
mkdir -p dmg/DMD2
3933
cp uninstall.command dmg/DMD2/
40-
${MAKER} -d dmd.pmdoc -o dmg/DMD2/DMD2.pkg --target 10.5
34+
pkgbuild --root dmd/ \
35+
--version ${VERSION} --identifier org.dlang.dmd.dmd2 \
36+
--install-location /Library/D/dmd --scripts scripts/ \
37+
--min-os-version 10.5 dmg/DMD2/DMD2.pkg
4138
hdiutil create -srcfolder dmg/DMD2 $@
4239

4340
clean:

‎osx/dmd.pmdoc/01dmd-contents.xml‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎osx/dmd.pmdoc/01dmd.xml‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎osx/dmd.pmdoc/index.xml‎

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

‎osx/readme.txt‎

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,14 @@ The it will copy the dmd.conf or dmd2.conf file into dmd/bin, this is
3333
needed because the installer will create symlinks and the dmd.conf
3434
need to have hard coded paths.
3535

36-
Then it will run packagemaker to create the installer, it will use
37-
dmd.pmdoc or dmd2.pmdoc, it contains the GUI for the installer and
38-
what and how to install. packagemaker will also pack post-install.sh,
39-
it creates symlinks. It will also package the contents of the dmd
40-
directory into the .pkg file it will create. The .pkg file will be
41-
saved in dmg/DMD then the uninstall.command file will be copied here
42-
to, it's a regular shell script that uninstalls everything, it has
43-
".command" as the file extension because then you can double click on
44-
it in Finder and it will launch a terminal and run the script.
36+
Then it will run pkgbuild to create the installer. pkgbuild will
37+
also pack scripts/postinstall, it creates symlinks. It will also
38+
package the contents of the dmd directory into the .pkg file it
39+
will create. The .pkg file will be saved in dmg/DMD then the
40+
uninstall.command file will be copied here to, it's a regular shell
41+
script that uninstalls everything, it has ".command" as the file
42+
extension because then you can double click on it in Finder and it
43+
will launch a terminal and run the script.
4544

4645
After the installer is created it will run hdiutil on the dmg
4746
directory and create a .dmg file with the name you gave with the -o
@@ -59,9 +58,5 @@ graphical user interface. It's very easy to enable vnc: Apple Menu ->
5958
System Preferences -> Sharing -> enable Screen Sharing -> Computer
6059
Settings... -> VNC viewers ...
6160

62-
You will need the GUI to run PackageMaker and look at the pmdoc files,
63-
if you don't want to read xml.
64-
65-
6661
/Jacob Carlborg
6762

0 commit comments

Comments
 (0)