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 authored and thewilsonator committed May 26, 2024
1 parent 2f3a832 commit 3122ab8
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 109 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
6 changes: 0 additions & 6 deletions create_dmd_release/build_all.d
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,6 @@ int main(string[] args)
immutable isPreRelease = isBranch || !verMatch.captures[4].empty;
immutable dubTag = isBranch ? gitTag : getDubTag(isPreRelease);

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 @@ -598,7 +597,6 @@ int main(string[] args)
const hasWindows = platforms.any!(p => p.os == OS.windows);
if (hasWindows)
{
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 @@ -626,10 +624,6 @@ int main(string[] args)

if (hasWindows)
{
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
8 changes: 4 additions & 4 deletions create_dmd_release/create_dmd_release.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ 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\"
Expand Down Expand Up @@ -510,6 +508,8 @@ void createRelease(string branch)
if(do32Bit)
{
copyFile(cloneDir~"/dmd/generated/"~osDirName~"/release/32/dmd"~exe, releaseBin32Dir~"/dmd"~exe);
version(Windows)
copyFile(cloneDir~"/dmd/compiler/ini/windows/bin/sc.ini", releaseBin32Dir~"/sc.ini");
copyDir(cloneDir~"/tools/generated/"~osDirName~"/32", releaseBin32Dir, file => !file.endsWith(obj));
copyFile(cloneDir~"/dub/bin/dub32"~exe, releaseBin32Dir~"/dub"~exe);
if (codesign)
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'.

4 changes: 0 additions & 4 deletions create_dmd_release/extras/windows/dmd2/windows/bin/README.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ sc.ini D compiler configuration file http://dlang.org/dmd-windows.html#sc_ini
ddemangle.exe D symbol demangler
dub.exe D's package manager https://github.com/dlang/dub
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
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
10 changes: 0 additions & 10 deletions create_dmd_release/extras/windows/dmd2/windows/bin/sc.ini

This file was deleted.

12 changes: 12 additions & 0 deletions create_dmd_release/extras/windows/dmd2/windows/bin64/README.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

Win64 files
-----------

dmd.exe D compiler http://dlang.org/dmd-windows.html
sc.ini D compiler configuration file http://dlang.org/dmd-windows.html#sc_ini
ddemangle.exe D symbol demangler
dub.exe D's package manager https://github.com/dlang/dub
dustmite.exe D source code minimizer https://github.com/CyberShadow/DustMite
libcurl.dll Curl Library https://curl.haxx.se/
lld-link.exe LLVM Linker https://lld.llvm.org/
rdmd.exe Run D program as a script http://dlang.org/rdmd.html
26 changes: 0 additions & 26 deletions create_dmd_release/extras/windows/dmd2/windows/lib/README.TXT

This file was deleted.

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 3122ab8

Please sign in to comment.