Skip to content

Commit

Permalink
Windows: Remove obsolete support for OMF/DMC/Optlink toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed May 25, 2024
1 parent c3b8d4e commit b137929
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 82 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/build_release_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,24 +227,9 @@ jobs:
# Determine installed LDC version
LDC=$(head -n 1 < <(ldc2 --version) | cut -d'(' -f2 | cut -d')' -f1)
# WINDOWS: Fetch additional DM tools
# Windows: set LDC_VSDIR
if [[ "${{ matrix.target }}" == "windows" ]]
then
# Fetch DMC (incl. DM make and sppn.exe)
curl https://downloads.dlang.org/other/dm857c.zip -o dmc.zip
7z x dmc.zip
curl http://ftp.digitalmars.com/sppn.zip -o sppn.zip
7z x -odm/bin sppn.zip
# Fetch implib
curl http://ftp.digitalmars.com/bup.zip -o bup.zip
7z x bup.zip dm/bin/implib.exe
# Add DM binaries to the path
export PATH="$PWD/dm/bin;$PATH"
# Export VS dir
export LDC_VSDIR='C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise'
fi
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,6 @@ jobs:
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 }"
7z x ldc.7z
mv ldc2-$HOST_LDC_VERSION-windows-multilib ldc2
powershell -command "& { iwr https://downloads.dlang.org/other/dm857c.zip -OutFile dmc.zip }"
7z x dmc.zip
powershell -command "& { iwr http://ftp.digitalmars.com/sppn.zip -OutFile sppn.zip }"
7z x -odm/bin sppn.zip
powershell -command "& { iwr http://ftp.digitalmars.com/bup.zip -OutFile bup.zip }"
7z x bup.zip dm/bin/implib.exe
powershell -command "& { iwr https://nsis.sourceforge.io/mediawiki/images/c/c9/Inetc.zip -OutFile inetc.zip }"
7z x inetc.zip -y -bb1 '-oc:\Program Files (x86)\NSIS'
- name: Unzip docs
Expand Down
10 changes: 0 additions & 10 deletions create_dmd_release/build_all.d
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,6 @@ int main(string[] args)
immutable isPreRelease = isBranch || !verMatch.captures[4].empty;
immutable dubTag = isBranch ? gitTag : getDubTag(isPreRelease);

enum optlink = "optlink.zip";
enum libC = "snn.lib";
enum libCurl = "libcurl-7.68.0-WinSSL-zlib-x86-x64.zip";
enum mingwtag = "mingw-libs-8.0.0";
enum mingwlibs = mingwtag ~ ".zip"; enum mingw_sha = hexString!"8c1619234ca8370b742a08a30b13bf9bdb333f842ed0ea02cafe9054c68adc97";
Expand All @@ -599,8 +597,6 @@ int main(string[] args)
const hasWindows = platforms.any!(p => p.os == OS.windows);
if (hasWindows)
{
fetchFile("http://ftp.digitalmars.com/"~optlink, cacheDir~"/"~optlink);
fetchFile("http://ftp.digitalmars.com/"~libC, cacheDir~"/"~libC);
fetchFile("https://downloads.dlang.org/other/"~libCurl, cacheDir~"/"~libCurl, verifySignature);
fetchFile("https://downloads.dlang.org/other/"~lld, cacheDir~"/"~lld, verifySignature, lld_sha);
fetchFile("https://downloads.dlang.org/other/"~lld64, cacheDir~"/"~lld64, verifySignature, lld64_sha);
Expand Down Expand Up @@ -628,12 +624,6 @@ int main(string[] args)

if (hasWindows)
{
// add latest optlink
extract(cacheDir~"/"~optlink, workDir~"/windows/extraBins/dmd2/windows/bin/");
if (exists(workDir~"/windows/extraBins/dmd2/windows/bin/link.exe"))
remove(workDir~"/windows/extraBins/dmd2/windows/bin/link.exe");
// add latest dmc libC (snn.lib)
copyFile(cacheDir~"/"~libC, workDir~"/windows/extraBins/dmd2/windows/lib/"~libC);
// add libcurl build for windows
extract(cacheDir~"/"~libCurl, workDir~"/windows/extraBins/");
// add mingw coff libraries
Expand Down
13 changes: 3 additions & 10 deletions create_dmd_release/create_dmd_release.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@ Prerequisites to Run:
- Git
- Posix: Working gcc toolchain, including GNU make which is not installed on
FreeBSD by default. On OSX, you can install the gcc toolchain through Xcode.
- Windows: Working DMC (incl. sppn.exe and implib.exe) and 32/64-bit MSVC
toolchains. dmc.exe, DM lib.exe, sppn.exe and implib.exe must be found in PATH,
so it's recommended to set the DMC bin dir as *first* dir in PATH.
Also, this environment variable must be set:
- Windows: Working 32/64-bit MSVC toolchains. Also, this environment variable
must be set:
LDC_VSDIR: Visual Studio directory containing the MSVC toolchains
Examples:
set LDC_VSDIR="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\"
- Windows: A GNU make, found in PATH as mingw32-make (to avoid DM make.exe bundled with DMC).
- Windows: A version of OPTLINK with the /LA[RGEADDRESSAWARE] flag:
<https://github.com/DigitalMars/optlink/commit/475bc5c1fa28eaf899ba4ac1dcfe2ab415db16c6>
- Windows: Microsoft's HTML Help Workshop on the PATH.
Typical Usage:
Expand Down Expand Up @@ -525,10 +521,7 @@ void createRelease(string branch)
copyFile(cloneDir~"/dmd/generated/"~osDirName~"/release/64/dmd"~exe, releaseBin64Dir~"/dmd"~exe);
version(Windows)
{
// patch sc.ini to point to optlink.exe in bin folder
auto sc_ini = cast(string)std.file.read(cloneDir~"/dmd/compiler/ini/windows/bin/sc.ini");
sc_ini = sc_ini.replace(`%@P%\optlink.exe`, `%@P%\..\bin\optlink.exe`);
std.file.write(releaseBin64Dir~"/sc.ini", sc_ini);
copyFile(cloneDir~"/dmd/compiler/ini/windows/bin/sc.ini", releaseBin64Dir~"/sc.ini");
}
copyDir(cloneDir~"/tools/generated/"~osDirName~"/64", releaseBin64Dir, file => !file.endsWith(obj));
copyFile(cloneDir~"/dub/bin/dub64"~exe, releaseBin64Dir~"/dub"~exe);
Expand Down
21 changes: 0 additions & 21 deletions create_dmd_release/extras/all/dmd2/README.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,3 @@
Digital Mars D Compiler Package
-------------------------------

Windows Programmers:
--------------------

Be sure and also download and install the Digital Mars C/C++ compiler
toolset ftp://ftp.digitalmars.com/dmc.zip, which contains the linker
and necessary libraries.

Linux Programmers:
------------------

You may need to install libstdc++.so.5.

Fedora 6+:

You can get libstdc++.so.5 by installing the 'compat-libstdc++-<XX>' package,
where '<XX>' varies by distribution but is usually '33'.

Ubuntu 6.06+:

You can get libstdc++.so.5 by installing 'libstdc++5'.

2 changes: 0 additions & 2 deletions create_dmd_release/extras/windows/dmd2/windows/bin/README.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ dustmite.exe D source code minimizer https://github.com/CyberShadow/DustMite
lib.exe Librarian http://www.digitalmars.com/ctg/lib.html
libcurl.dll Curl Library https://curl.haxx.se/
lld-link.exe LLVM Linker https://lld.llvm.org/
make.exe Make program http://www.digitalmars.com/ctg/make.html
optlink.exe Linker http://www.digitalmars.com/ctg/optlink.html
rdmd.exe Run D program as a script http://dlang.org/rdmd.html
replace.exe Find/replace text in file(s)
shell.exe Test script runner http://www.digitalmars.com/ctg/shell.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Windows Libraries
-----------------
phobos.lib D runtime library
snn.lib Digital Mars C/C++ runtime library

Windows System API Libraries
----------------------------
Expand Down
2 changes: 0 additions & 2 deletions windows/d2-installer-descriptions.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ LangString DESC_SMShortcuts ${LANG_ENGLISH} "Add Shortcuts to the Start Menu to
LangString DESC_AddD2ToPath ${LANG_ENGLISH} "Modify the PATH environment variable so DMD can be used from any command prompt"

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)"
LangString DESC_DmcDownload ${LANG_ENGLISH} "Digital Mars C/C++ compiler"


; Shortcuts
Expand All @@ -23,5 +22,4 @@ LangString SHORTCUT_Uninstall ${LANG_ENGLISH} "Uninstall"
!insertmacro MUI_DESCRIPTION_TEXT ${StartMenuShortcuts} $(DESC_SMShortcuts)
!insertmacro MUI_DESCRIPTION_TEXT ${AddD2ToPath} $(DESC_AddD2ToPath)
!insertmacro MUI_DESCRIPTION_TEXT ${VisualDDownload} $(DESC_VisualDDownload)
!insertmacro MUI_DESCRIPTION_TEXT ${DmcDownload} $(DESC_DmcDownload)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
14 changes: 0 additions & 14 deletions windows/d2-installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,10 @@
; Visual D
!define VersionVisualD "1.3.1"

; DMC
!define VersionDMC "857"

; Update Rarely Needed
; --------------------
; Files
!define VisualDFilename "VisualD-v${VersionVisualD}.exe"
!define DmcFilename "dmc-${VersionDMC}.exe"
!define VS2013Filename "vs_community2013.exe"
!define VS2017Filename "vs_community2017.exe"
!define VS2017BTFilename "vs_BuildTools2017.exe"
Expand All @@ -58,15 +54,10 @@
!define VCRedistx64Filename "vcredist_x64.exe"

; URLs
!define BaseURL "https://downloads.dlang.org"
!define BaseURLAlt "http://ftp.digitalmars.com"
!define VisualDBaseURL "https://github.com/dlang/visuald/releases/download"

!define VisualDUrl "${VisualDBaseURL}/v${VersionVisualD}/${VisualDFilename}"

!define DmcUrl "${BaseURL}/other/${DmcFilename}"
!define DmcAltUrl "${BaseURLAlt}/${DmcFilename}"

!define VS2013Url "http://go.microsoft.com/fwlink/?LinkId=517284"
!define VS2017Url "https://download.visualstudio.microsoft.com/download/pr/100404311/045b56eb413191d03850ecc425172a7d/vs_Community.exe"
!define VS2017BuildToolsUrl "https://download.visualstudio.microsoft.com/download/pr/100404314/e64d79b40219aea618ce2fe10ebd5f0d/vs_BuildTools.exe"
Expand Down Expand Up @@ -317,11 +308,6 @@ SectionGroup /e "Extras"
Section /o "Download Visual D" VisualDDownload
!insertmacro DownloadAndRun ${VisualDFilename} ${VisualDUrl} ""
SectionEnd


Section /o "Download DMC" DmcDownload
!insertmacro DownloadAndRun ${DmcFilename} ${DmcUrl} ${DmcAltUrl}
SectionEnd
SectionGroupEnd

;--------------------------------------------------------
Expand Down

0 comments on commit b137929

Please sign in to comment.