Skip to content

Commit

Permalink
Try to copy Mono.Posix.DLL into output folder
Browse files Browse the repository at this point in the history
With the .NET 6 build, the Mono.Posix DLL is ending up in a different
location than the other DLLs, along with a native library (in .so format
for Linux) that it probably also needs, so we'll add those files to the
installation script.

Still doesn't work, but it was worth a try.
  • Loading branch information
rmunn committed Jun 30, 2022
1 parent 62c3fd6 commit f03f36b
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 7 deletions.
6 changes: 5 additions & 1 deletion build/NuGet.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RootDir Condition="'$(RootDir)'==''">$(MSBuildProjectDirectory)/..</RootDir>
<NUGET_PACKAGES Condition="'$(NUGET_PACKAGES)'==''">$(RootDir)/packages</NUGET_PACKAGES>
</PropertyGroup>
<Target Name="RestorePackages">
<Exec
Command='dotnet restore "$(SolutionPath)" --packages packages'/>
Command='dotnet restore "$(SolutionPath)" --packages "$(NUGET_PACKAGES)"'/>
</Target>
</Project>
7 changes: 7 additions & 0 deletions docker/scripts/compile-lfmerge-combined.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ echo "Using $(which dotnet)"

export DbVersion="${1-7000072}"
echo "Building for ${DbVersion}"

# echo "In download-dependencies-combined.sh, before dotnet build step. Press Enter to continue..."
# read

dotnet build /t:CompileOnly /v:quiet /property:Configuration=Release /property:DatabaseVersion=${DbVersion} build/LfMerge.proj

# echo "In download-dependencies-combined.sh, after dotnet build step. Press Enter to continue..."
# read

# ln -sf ../Mercurial output/
# xbuild /t:TestOnly /v:detailed /property:Configuration=Release /property:DatabaseVersion=${DbVersion} build/LfMerge.proj
13 changes: 12 additions & 1 deletion docker/scripts/create-installation-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export HOME=/tmp
export XDG_CONFIG_HOME=/tmp/.config
export BUILD=Release
export FRAMEWORK=net6.0
export NETSTANDARD=netstandard2.0

export DatabaseVersion=${1:-7000072}

Expand All @@ -18,7 +19,8 @@ export DBDESTDIR=tarball/lfmerge-${DatabaseVersion}
export COMMONDESTDIR=tarball/lfmerge
export LIB=usr/lib/lfmerge/${DatabaseVersion}
export SHARE=usr/share/lfmerge/${DatabaseVersion}

export NATIVERUNTIME=runtimes/linux-x64/native
export LIBRUNTIME=runtimes/linux-x64/lib
export DBVERSIONPATH=/usr/lib/lfmerge/${DatabaseVersion}

# Apparently the downloaded mercurial.ini doesn't have the right fixutf8 config, and it also
Expand All @@ -31,9 +33,18 @@ convert=
fixutf8=/${LIB}/MercurialExtensions/fixutf8/fixutf8.py
EOF

echo "In create-installation-tarball.sh, just before running the install steps."
echo ""
printenv
echo ""
echo "Press Enter to continue..."
read

# Install binaries
install -d ${DBDESTDIR}/${LIB}
install -m 644 output/${BUILD}/${FRAMEWORK}/*.* ${DBDESTDIR}/${LIB} 2>/dev/null || install -m 644 output/${BUILD}/*.* ${DBDESTDIR}/${LIB}
install -m 644 output/${BUILD}/${FRAMEWORK}/${NATIVERUNTIME}/*.* ${DBDESTDIR}/${LIB} 2>/dev/null || install -m 644 output/${BUILD}/${NATIVERUNTIME}/*.* ${DBDESTDIR}/${LIB}
install -m 644 output/${BUILD}/${FRAMEWORK}/${LIBRUNTIME}/${NETSTANDARD}/*.* ${DBDESTDIR}/${LIB} 2>/dev/null || install -m 644 output/${BUILD}/${LIBRUNTIME}/${NETSTANDARD}/*.* ${DBDESTDIR}/${LIB}
install -m 755 output/${BUILD}/${FRAMEWORK}/LfMerge ${DBDESTDIR}/${LIB} 2>/dev/null || install -m 755 output/${BUILD}/LfMerge ${DBDESTDIR}/${LIB}
install -m 755 output/${BUILD}/${FRAMEWORK}/LfMergeQueueManager ${DBDESTDIR}/${LIB} 2>/dev/null || install -m 755 output/${BUILD}/LfMergeQueueManager ${DBDESTDIR}/${LIB}
install -m 755 output/${BUILD}/${FRAMEWORK}/chorusmerge ${DBDESTDIR}/${LIB} 2>/dev/null || install -m 755 output/${BUILD}/chorusmerge ${DBDESTDIR}/${LIB}
Expand Down
8 changes: 8 additions & 0 deletions docker/scripts/download-dependencies-combined.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ set -e
echo "Downloading dependencies"
export MONO_PREFIX=/opt/mono5-sil
. environ

pwd
# echo "In download-dependencies-combined.sh, before msbuild step. Press Enter to continue..."
# read

if [ "x$1" = "x7000072" ]; then
msbuild /t:RestorePackages /p:KeepJobsFile=false build/LfMerge.proj
else
msbuild /t:DownloadDependencies /p:KeepJobsFile=false build/LfMerge.proj
fi

# echo "In download-dependencies-combined.sh, after msbuild step. Press Enter to continue..."
# read

5 changes: 4 additions & 1 deletion docker/scripts/gitversion-combined.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi

export MONO_PREFIX=/opt/mono5-sil
RUNMODE="PACKAGEBUILD" BUILD=Release . environ
msbuild build/LfMerge.proj
# msbuild build/LfMerge.proj
mkdir -p output/Release

if [ -n "$UPDATE_ASSEMBLYINFO_BY_SCRIPT" -a "$UPDATE_ASSEMBLYINFO_BY_SCRIPT" -ne 0 ]; then
Expand All @@ -29,3 +29,6 @@ if [ -n "$UPDATE_ASSEMBLYINFO_BY_SCRIPT" -a "$UPDATE_ASSEMBLYINFO_BY_SCRIPT" -ne
fi

echo "Building packages for version ${DebPackageVersion}"

# echo "In gitversion-combined.sh, at end of script. Press Enter to continue..."
# read
6 changes: 5 additions & 1 deletion docker/scripts/setup-workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ cd "${DEST}"
if [ "${BRANCH_TO_BUILD}" ]; then
git checkout "${BRANCH_TO_BUILD}"
fi
git clean -dxf --exclude=packages/

git clean -dxf --exclude=packages/ --exclude=build/packages/
git reset --hard

# echo "In setup-workspace.sh, after git reset. Press Enter to continue..."
# read

# FLExBridge dependencies from FW 8 builds have vanished from TeamCity, so we stored them in the Docker image under ${REPO_ROOT}/docker
mkdir -p lib
(cd lib && xz -dc "${REPO_ROOT}/docker/fw8-flexbridge.tar.xz" | tar xf -)
2 changes: 1 addition & 1 deletion pbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fi

# Run the build
if [ "${BUILD_FW8}" -eq 0 ]; then
docker run --mount type=bind,source="$(pwd)",target=/home/builder/repo --mount type=tmpfs,dst=/tmp --env "BRANCH_TO_BUILD=${FW9_BUILD_BRANCH}" --env "BUILD_NUMBER=999" --env "DebPackageVersion=${DebPackageVersion}" --env "Version=${MsBuildVersion}" --env "MajorMinorPatch=${MajorMinorPatch}" --env "AssemblyVersion=${AssemblySemVer}" --env "FileVersion=${AssemblySemFileVer}" --env "InformationalVersion=${InformationalVersion}" --mount type=bind,src=/storage/nuget,dst=/storage/nuget --name tmp-lfmerge-build-7000072 lfmerge-build-7000072
docker run -it --mount type=bind,source="$(pwd)",target=/home/builder/repo --mount type=tmpfs,dst=/tmp --env "BRANCH_TO_BUILD=${FW9_BUILD_BRANCH}" --env "BUILD_NUMBER=999" --env "DebPackageVersion=${DebPackageVersion}" --env "Version=${MsBuildVersion}" --env "MajorMinorPatch=${MajorMinorPatch}" --env "AssemblyVersion=${AssemblySemVer}" --env "FileVersion=${AssemblySemFileVer}" --env "InformationalVersion=${InformationalVersion}" --mount type=bind,src=/storage/nuget,dst=/storage/nuget --name tmp-lfmerge-build-7000072 lfmerge-build-7000072
else
time parallel --no-notice <<EOF
docker run --mount type=bind,source="$(pwd)",target=/home/builder/repo --mount type=tmpfs,dst=/tmp --env "BRANCH_TO_BUILD=${FW8_BUILD_BRANCH}" --env "BUILD_NUMBER=999" --env "DebPackageVersion=${DebPackageVersion}" --env "Version=${MsBuildVersion}" --env "MajorMinorPatch=${MajorMinorPatch}" --env "AssemblyVersion=${AssemblySemVer}" --env "FileVersion=${AssemblySemFileVer}" --env "InformationalVersion=${InformationalVersion}" --name tmp-lfmerge-build-7000068 lfmerge-build-7000068
Expand Down
2 changes: 1 addition & 1 deletion src/FixFwData/FixFwData.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
<OutputType>WinExe</OutputType>
<RootNamespace>FixFwData</RootNamespace>
<Configurations>Debug;Release</Configurations>
Expand Down
2 changes: 1 addition & 1 deletion src/LfMerge.Core.Tests/LfMerge.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
<RootNamespace>LfMerge.Core.Tests</RootNamespace>
<Configurations>Debug;Release</Configurations>
<Description>LfMerge.Core.Tests</Description>
Expand Down
1 change: 1 addition & 0 deletions src/LfMerge.Core/LfMerge.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ See full changelog at https://github.com/sillsdev/LfMerge/blob/master/CHANGELOG.
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<PackageReference Include="MongoDB.Driver.signed" Version="2.4.*" />
<PackageReference Include="MongoDB.Driver.Core.signed" Version="2.4.*" />
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
<PackageReference Include="SIL.Bugsnag.Signed" Version="2.2.1" />
<PackageReference Include="SIL.Chorus.ChorusMerge" Version="5.0.0-netcore0102" />
<PackageReference Include="SIL.ChorusPlugin.LfMergeBridge" Version="3.6.3-netcore*" />
Expand Down

0 comments on commit f03f36b

Please sign in to comment.