Skip to content

Commit

Permalink
Merge pull request #138 from MartinNowak/fix14897
Browse files Browse the repository at this point in the history
fix Issue 14897 - shared linux libraries from zip package don't work
  • Loading branch information
MartinNowak committed Aug 23, 2015
2 parents 435f361 + 5b4a867 commit c10d872
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
7 changes: 6 additions & 1 deletion create_dmd_release/common.d
Expand Up @@ -182,7 +182,12 @@ private ArchiveMember toArchiveMember(ref DirEntry de, string path)
am.compressionMethod = CompressionMethod.deflate;
am.time = de.timeLastModified;
am.name = path;
am.fileAttributes = de.linkAttributes;
version (Posix) if (de.isSymlink)
{
am.expandedData = cast(ubyte[])readLink(de.name);
return am;
}
am.expandedData = cast(ubyte[])std.file.read(de.name);
am.fileAttributes = de.attributes;
return am;
}
10 changes: 8 additions & 2 deletions create_dmd_release/create_dmd_release.d
Expand Up @@ -601,17 +601,23 @@ void createRelease(string branch)
}
else
{
import std.range : chain;

if(do32Bit)
{
copyFile(cloneDir~"/phobos/generated/"~osDirName~"/release/32/"~libPhobos32~lib, releaseLib32Dir~"/"~libPhobos32~lib);
copyFileIfExists(cloneDir~"/phobos/generated/"~osDirName~"/release/32/"~libPhobos32~dll, releaseLib32Dir~"/"~libPhobos32~dll);
// libphobos2.so.0.68.0, libphobos2.so.0.68, libphobos2.so
copyDir(cloneDir~"/phobos/generated/"~osDirName~"/release/32/", releaseLib32Dir~"/",
file => file.startsWith(chain(libPhobos32, dll)));
version (Windows)
copyFile(cloneDir~"/druntime/lib/gcstub.obj", releaseLib32Dir~"/gcstub.obj");
}
if(do64Bit)
{
copyFile(cloneDir~"/phobos/generated/"~osDirName~"/release/64/"~libPhobos64~lib, releaseLib64Dir~"/"~libPhobos64~lib);
copyFileIfExists(cloneDir~"/phobos/generated/"~osDirName~"/release/64/"~libPhobos64~dll, releaseLib64Dir~"/"~libPhobos64~dll);
// libphobos2.so.0.68.0, libphobos2.so.0.68, libphobos2.so
copyDir(cloneDir~"/phobos/generated/"~osDirName~"/release/64/", releaseLib64Dir~"/",
file => file.startsWith(chain(libPhobos64, dll)));
version (Windows)
copyFile(cloneDir~"/druntime/lib/gcstub64.obj", releaseLib64Dir~"/gcstub64.obj");
}
Expand Down

0 comments on commit c10d872

Please sign in to comment.