Showing with 56 additions and 25 deletions.
  1. +4 −4 bootstrap/bootstrap-dmd.bat
  2. +1 −1 create_dmd_release/build_all.d
  3. +2 −2 create_dmd_release/patches/dlang.org.patch
  4. +3 −5 linux/dmd_deb.sh
  5. +2 −2 linux/dmd_phobos.sh
  6. +43 −10 script/install.sh
  7. +1 −1 windows/d2-installer.nsi
8 changes: 4 additions & 4 deletions bootstrap/bootstrap-dmd.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ set DMD_BRANCH=%1
set WORK_DIR=bootstrap-dmd-%DMD_BRANCH%
set SCRAP_DIR=%WORK_DIR%\scrap
set DMC_URL=http://ftp.digitalmars.com/Digital_Mars_C++/Patch/dm856c.zip
set DMD_GITHUB=https://github.com/D-Programming-Language/dmd
set DMD_DRUNTIME_GITHUB=https://github.com/D-Programming-Language/druntime
set DMD_PHOBOS_GITHUB=https://github.com/D-Programming-Language/phobos
set DMD_TOOLS_GITHUB=https://github.com/D-Programming-Language/tools
set DMD_GITHUB=https://github.com/dlang/dmd
set DMD_DRUNTIME_GITHUB=https://github.com/dlang/druntime
set DMD_PHOBOS_GITHUB=https://github.com/dlang/phobos
set DMD_TOOLS_GITHUB=https://github.com/dlang/tools
set UNZIP_URL=http://semitwist.com/download/app/unz600xn.exe

rem Internal configuration
Expand Down
2 changes: 1 addition & 1 deletion create_dmd_release/build_all.d
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void runBuild(ref Box box, string ver, bool isBranch, bool skipDocs)

void cloneSources(string gitTag, string tgtDir)
{
auto prefix = "https://github.com/D-Programming-Language/";
auto prefix = "https://github.com/dlang/";
auto fmt = "git clone --depth 1 -b "~gitTag~" "~prefix~"%1$s.git "~tgtDir~"/%1$s";
foreach (proj; allProjects)
run(fmt.format(proj));
Expand Down
4 changes: 2 additions & 2 deletions create_dmd_release/patches/dlang.org.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/dlang.org.ddoc b/dlang.org.ddoc
index 77c550d..9b63dcf 100644
index b8d73b2..cb99bf0 100644
--- a/dlang.org.ddoc
+++ b/dlang.org.ddoc
@@ -212,7 +212,6 @@ $(DIVID cssmenu, $(UL
Expand All @@ -11,7 +11,7 @@ index 77c550d..9b63dcf 100644
$(MENU_W_SUBMENU_LINK $(ROOT_DIR)community.html, Community)
$(NAVIGATION_COMMUNITY)
diff --git a/posix.mak b/posix.mak
index 0cdc097..a8dcd07 100644
index 5f9061a..86243e6 100644
--- a/posix.mak
+++ b/posix.mak
@@ -232,7 +232,7 @@ $(DOC_OUTPUT_DIR)/dmd-%.verbatim : %.ddoc dcompiler.dd verbatim.ddoc $(DMD)
Expand Down
8 changes: 3 additions & 5 deletions linux/dmd_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ else
sed -i ':a;$!{N;ba};s/^\( .\s*\n\)*\|\(\s*\n .\)*$//g' $I"_tmp"
done
echo 'Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/D-Programming-Language
Source: https://github.com/dlang
Files: usr/bin/*
Copyright: 1999-'$(date +%Y)' by Digital Mars written by Walter Bright
Expand Down Expand Up @@ -345,8 +345,7 @@ else

# set deb package dependencies
DEPENDS="libc6, libc6-dev, gcc, libgcc1, libstdc++6, xdg-utils, libcurl3"
RECOMMENDS="gcc-multilib"
SUGGESTS="libcurl4-openssl-dev"
SUGGESTS="libcurl4-openssl-dev, gcc-multilib"


# create control file
Expand All @@ -356,9 +355,8 @@ else
Maintainer: '$MAINTAINER'
Installed-Size: '$(du -ks usr/ | awk '{print $1}')'
Depends: '$DEPENDS'
Recommends: '$RECOMMENDS'
Suggests: '$SUGGESTS'
Provides: '$UNZIPDIR-$MINOR'
Provides: '$UNZIPDIR-$MINOR', d-compiler
Section: devel
Priority: optional
Homepage: http://dlang.org/
Expand Down
4 changes: 2 additions & 2 deletions linux/dmd_phobos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ else
fi
sed -i ':a;$!{N;ba};s/^\( .\s*\n\)*\|\(\s*\n .\)*$//g' $I"_tmp"
echo 'Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/D-Programming-Language
Source: https://github.com/dlang
Files: usr/lib/*
Copyright: 1999-'$(date +%Y)' by Digital Mars written by Walter Bright
Expand All @@ -194,7 +194,7 @@ else


# create changelog
echo "See: https://github.com/D-Programming-Language/phobos/commits/master" > usr/share/doc/$PHOBOSPKG/changelog
echo "See: https://github.com/dlang/phobos/commits/master" > usr/share/doc/$PHOBOSPKG/changelog


# create shlibs file
Expand Down
53 changes: 43 additions & 10 deletions script/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@ set -ueo pipefail

# ------------------------------------------------------------------------------

log() {
log_() {
echo "${@//$HOME/\~}"
}

log() {
if [ "$verbosity" -gt 0 ]; then
log_ "$@"
fi
}

logV() {
if [ ! -z "$verbose" ]; then
log "$@";
if [ "$verbosity" -gt 1 ]; then
log_ "$@"
fi
}

logE() {
log "$@" >&2
log_ "$@" >&2
}

fatal() {
Expand All @@ -29,15 +35,19 @@ fatal() {
}

curl() {
: ${curl_user_agent:="installer/install.sh $(command curl --version | head -n 1)"}
command curl -f#L --retry 3 -A "${curl_user_agent}" "$@"
: ${CURL_USER_AGENT:="installer/install.sh $(command curl --version | head -n 1)"}
if [ "$verbosity" -gt 0 ]; then
command curl -f#L --retry 3 -A "$CURL_USER_AGENT" "$@"
else
command curl -fsSL --retry 3 -A "$CURL_USER_AGENT" "$@"
fi
}

# ------------------------------------------------------------------------------

command=
compiler=
verbose=
verbosity=1
path=~/dlang
case $(uname -s) in
Darwin) os=osx;;
Expand All @@ -57,7 +67,9 @@ esac

check_tools() {
while [[ $# > 0 ]]; do
if ! command -v $1 &>/dev/null; then
if ! command -v $1 &>/dev/null &&
# detect OSX' liblzma support in libarchive
! { [ $os-$1 == osx-xz ] && otool -L /usr/lib/libarchive.*.dylib | grep -qF liblzma; }; then
fatal "Required tool $1 not found, please install it."
fi
shift
Expand Down Expand Up @@ -122,6 +134,10 @@ Description
Download and install a D compiler.
Options
-a --activate Only print the path to the activate script
Examples
install.sh install dmd
Expand Down Expand Up @@ -177,6 +193,7 @@ Description

parse_args() {
local _help=
local _activate=

while [[ $# > 0 ]]; do
case "$1" in
Expand All @@ -192,7 +209,11 @@ parse_args() {
;;

-v | --verbose)
verbose=1
verbosity=2
;;

-a | --activate)
_activate=1
;;

use | install | uninstall | list | update)
Expand All @@ -214,6 +235,14 @@ parse_args() {
[ -z "$command" ] && usage || command_help $command
exit 0
fi
if [ -n "$_activate" ]; then
if [ "${command:-install}" == "install" ]; then
verbosity=0
else
[ -z "$command" ] && usage || command_help $command
exit 1
fi
fi
}

# ------------------------------------------------------------------------------
Expand All @@ -240,10 +269,14 @@ run_command() {
if [ $(basename $SHELL) = fish ]; then
local suffix=.fish
fi
log "
if [ "$verbosity" -eq 0 ]; then
echo "$path/$2/activate${suffix:-}"
else
log "
Run \`source $path/$2/activate${suffix:-}\` in your shell to use $2.
This will setup PATH, LIBRARY_PATH, LD_LIBRARY_PATH, DMD, DC, and PS1 accordingly.
Run \`deactivate\` later on to restore your environment."
fi
;;

uninstall)
Expand Down
2 changes: 1 addition & 1 deletion windows/d2-installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
; URLs
!define BaseURL "http://downloads.dlang.org"
!define BaseURLAlt "http://ftp.digitalmars.com"
!define VisualDBaseURL "https://github.com/D-Programming-Language/visuald/releases/download"
!define VisualDBaseURL "https://github.com/dlang/visuald/releases/download"

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

Expand Down