diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1ad3e4f8..7c64eb8d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,14 +21,13 @@ release:
GIT_SUBMODULE_STRATEGY: normal
before_script:
- apt-get update -y
- - apt-get install -y dpkg
- apt-get install -y rpm
- apt-get install -y git
- apt-get install -y zip
- apt-get install -y libcurl4-openssl-dev
- - curl -JLO https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.0.6/fpc-laz_3.0.4-1_amd64.deb/download && apt install -y ./fpc-laz_3.0.4-1_amd64.deb
- - curl -JLO https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.0.6/fpc-src_3.0.4-2_amd64.deb/download && apt install -y ./fpc-src_3.0.4-2_amd64.deb
- - curl -JLO https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.0.6/lazarus-project_2.0.6-0_amd64.deb/download && apt install -y ./lazarus-project_2.0.6-0_amd64.deb
+ - curl -JLO https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.0.8/fpc-laz_3.0.4-1_amd64.deb/download && apt install -y ./fpc-laz_3.0.4-1_amd64.deb
+ - curl -JLO https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.0.8/fpc-src_3.0.4-2_amd64.deb/download && apt install -y ./fpc-src_3.0.4-2_amd64.deb
+ - curl -JLO https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.0.8/lazarus-project_2.0.8-0_amd64.deb/download && apt install -y ./lazarus-project_2.0.8-0_amd64.deb
script:
- bash setup/build-release.sh
artifacts:
diff --git a/dexed-d/dub.json b/dexed-d/dub.json
index 447e6743..3d1c46bb 100644
--- a/dexed-d/dub.json
+++ b/dexed-d/dub.json
@@ -9,5 +9,8 @@
"iz" : {
"path" : "../etc/iz"
}
- }
-}
\ No newline at end of file
+ },
+ "dflags" : [
+ "-link-defaultlib-shared=false"
+ ]
+}
diff --git a/lazproj/dexed.lpi b/lazproj/dexed.lpi
index faaa8807..db646c2b 100644
--- a/lazproj/dexed.lpi
+++ b/lazproj/dexed.lpi
@@ -434,6 +434,9 @@
+
+
+
@@ -485,6 +488,7 @@
+
@@ -887,6 +891,7 @@
+
diff --git a/setup/build-release.sh b/setup/build-release.sh
index 175d7f36..88d97d93 100644
--- a/setup/build-release.sh
+++ b/setup/build-release.sh
@@ -12,14 +12,22 @@ echo "building dexed release" $ver
if [ ! -d "./bin" ]; then
mkdir "./bin"
fi
-LDC_SHARED10=$(find "/dlang/" -iname "libdruntime-ldc-shared.so.*" 2>/dev/null | grep -m 1 "lib/libdruntime-ldc-shared")
-LDC_SHARED11=$(find "/dlang/" -iname "libdruntime-ldc-shared.so" 2>/dev/null | grep -m 1 "lib/libdruntime-ldc-shared")
-LDC_SHARED20=$(find "/dlang/" -iname "libphobos2-ldc-shared.so.*" 2>/dev/null | grep -m 1 "lib/libphobos2-ldc-shared")
-LDC_SHARED21=$(find "/dlang/" -iname "libphobos2-ldc-shared.so" 2>/dev/null | grep -m 1 "lib/libphobos2-ldc-shared")
-cp "$LDC_SHARED10" "./bin"
-cp "$LDC_SHARED11" "./bin"
-cp "$LDC_SHARED20" "./bin"
-cp "$LDC_SHARED21" "./bin"
+DEXED_BIN_PATH=$(readlink --canonicalize "./bin")
+SEARCH_PATH_LDC=$(find "/" -iname "libdruntime-ldc.a" 2>/dev/null | grep -m 1 "libdruntime")
+SEARCH_PATH_LDC=$(dirname $SEARCH_PATH_LDC)
+export LIBRARY_PATH="$LIBRARY_PATH":"$SEARCH_PATH_LDC":"$DEXED_BIN_PATH"
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$SEARCH_PATH_LDC":"$DEXED_BIN_PATH"
+
+# libdexed-d
+cd dexed-d
+dub build --build=release --compiler=ldc2
+if [ ! -f "../bin/libdexed-d.so" ]; then
+ echo "this explains linking issues..."
+ exit 1
+fi
+cp "../bin/libdexed-d.so" "/lib64/libdexed-d.so"
+cp "../bin/libdexed-d.so" "/lib/libdexed-d.so"
+cd ..
# dexed
echo "building dexed..."
@@ -69,7 +77,7 @@ echo "moving files and binaries..."
if [ ! -d setup/nux64 ]; then
mkdir setup/nux64
fi
-mv bin/dastworx setup/nux64/
+mv bin/libdexed-d.so setup/nux64/
mv bin/dexed setup/nux64/
mv dcd/bin/dcd-server setup/nux64/
mv dcd/bin/dcd-client setup/nux64/
@@ -92,7 +100,7 @@ SETUP_APP_NAME="dexed.$ver.linux64.setup"
echo "building the custom setup program..."
SETUP_DC=$DC
if [ "$SETUP_DC" = ldc2 ]; then
- SETUP_DC=ldmd
+ SETUP_DC=ldmd2
fi
$SETUP_DC setup.d -O -release -Jnux64 -J./ -of"output/"$SETUP_APP_NAME
bash zip-nux64.sh
diff --git a/setup/deb.sh b/setup/deb.sh
index 1328bc95..4e73688b 100644
--- a/setup/deb.sh
+++ b/setup/deb.sh
@@ -17,15 +17,18 @@ cfgdir=$basdir/DEBIAN
bindir=$basdir/usr/bin
pixdir=$basdir/usr/share/pixmaps
shcdir=$basdir/usr/share/applications
+libdir=$basdir/usr/lib64
mkdir -p $basdir
mkdir -p $cfgdir
mkdir -p $bindir
mkdir -p $pixdir
mkdir -p $shcdir
+mkdir -p $libdir
cp nux64/dexed $bindir
cp nux64/dexed.png $pixdir
+cp nux64/libdexed-d.so $libdir
echo "[Desktop Entry]
Categories=Application;IDE;Development;
diff --git a/setup/rpm.sh b/setup/rpm.sh
index a65ee031..da0cdb48 100644
--- a/setup/rpm.sh
+++ b/setup/rpm.sh
@@ -37,14 +37,17 @@ buildroot=$HOME/rpmbuild/BUILDROOT/$name_and_ver
bindir=$buildroot/usr/bin
pixdir=$buildroot/usr/share/pixmaps
shcdir=$buildroot/usr/share/applications
+libdir=$buildroot/usr/lib64
mkdir -p $buildroot
mkdir -p $bindir
mkdir -p $pixdir
mkdir -p $shcdir
+mkdir -p $libdir
cp nux64/dexed $bindir
cp nux64/dexed.png $pixdir
+cp nux64/libdexed-d.so $libdir
echo "[Desktop Entry]
Categories=Application;IDE;Development;
@@ -71,6 +74,7 @@ Dexed is an IDE for the DMD D compiler.
%files
/usr/bin/dexed
+/usr/lib64/libdexed-d.so
/usr/share/applications/dexed.desktop
/usr/share/pixmaps/dexed.png
diff --git a/setup/setup.d b/setup/setup.d
index 4c8bf6b3..89f6d21b 100644
--- a/setup/setup.d
+++ b/setup/setup.d
@@ -11,9 +11,14 @@ version(X86) version(Windows)version = win32;
version(Windows)
{
enum exeExt = ".exe";
+ enum libExt = ".dll";
pragma(lib, "ole32.lib");
}
-else enum exeExt = "";
+else
+{
+ enum exeExt = "";
+ enum libExt = ".so";
+}
alias ImpType = immutable ubyte[];
alias ResType = immutable Resource;
@@ -36,6 +41,7 @@ struct Resource
immutable Resource[] ceResources =
[
Resource(cast(ImpType) import("dexed" ~ exeExt), "dexed" ~ exeExt, Kind.exe),
+ Resource(cast(ImpType) import("libdexed-d" ~ libExt), "libdexed-d" ~ libExt, Kind.exe),
Resource(cast(ImpType) import("dexed.ico"), "dexed.ico", Kind.dat),
Resource(cast(ImpType) import("dexed.png"), "dexed.png", Kind.dat),
Resource(cast(ImpType) import("dexed.license.txt"), "dexed.license.txt", Kind.doc)
@@ -428,7 +434,7 @@ void postInstall()
f.writeln("[Desktop Entry]");
f.writeln("Name=dexed");
f.writeln("Path=" ~ exePath);
- f.writeln("Exec=" ~ exePath ~ "dexed %f");
+ f.writeln("Exec=env LD_LIBRARY_PATH="~ exePath ~ " "~ exePath ~ "dexed %f");
f.writeln("Icon=" ~ datPath ~ "dexed.png");
f.writeln("Type=Application");
f.writeln("Categories=Application;IDE;Development;");
diff --git a/src/u_dexed_d.pas b/src/u_dexed_d.pas
index 4f637d56..5e0722b4 100644
--- a/src/u_dexed_d.pas
+++ b/src/u_dexed_d.pas
@@ -39,11 +39,10 @@ type
// Give a view on D `char[][]`
TDStrings = specialize TDArray;
-{$LINKLIB libphobos2-ldc-shared}
// Necessary to start the GC, run the static constructors, etc
-procedure rt_init(); cdecl; external 'libdruntime-ldc-shared';
+procedure rt_init(); cdecl; external 'libdexed-d';
// Cleanup
-procedure rt_term(); cdecl; external 'libdruntime-ldc-shared';
+procedure rt_term(); cdecl; external 'libdexed-d';
// Demangle a line possibly containing a D mangled name.
function ddemangle(const text: PChar): PChar; cdecl; external 'libdexed-d';
// Detects wether the source code for the module `src` contains the main() function.