Skip to content

Commit

Permalink
Update SQLitePCLRaw version to '2.0.4'
Browse files Browse the repository at this point in the history
- Update paths for SQLitePCLRaw when building MSBuild
- Remove unnecessary file copying from build
  • Loading branch information
JoeRobich committed Mar 3, 2021
1 parent 928227c commit d940fb8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 56 deletions.
70 changes: 17 additions & 53 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -461,31 +461,20 @@ Task("CreateMSBuildFolder")
FileHelper.Delete(CombinePaths(compilersTargetFolder, "vbc.exe.config"));
FileHelper.Delete(CombinePaths(compilersTargetFolder, "vbc.rsp"));
FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.core", "lib", "net45", "SQLitePCLRaw.core.dll"),
FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.core", "lib", "netstandard2.0", "SQLitePCLRaw.core.dll"),
destination: CombinePaths(msbuildCurrentBinTargetFolder, "SQLitePCLRaw.core.dll"),
overwrite: true);
FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.provider.e_sqlite3.net45", "lib", "net45", "SQLitePCLRaw.provider.e_sqlite3.dll"),
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.provider.e_sqlite3", "lib", "netstandard2.0", "SQLitePCLRaw.provider.e_sqlite3.dll"),
destination: CombinePaths(msbuildCurrentBinTargetFolder, "SQLitePCLRaw.provider.e_sqlite3.dll"),
overwrite: true);
FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.bundle_green", "lib", "net45", "SQLitePCLRaw.batteries_v2.dll"),
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.bundle_green", "lib", "netstandard2.0", "SQLitePCLRaw.batteries_v2.dll"),
destination: CombinePaths(msbuildCurrentBinTargetFolder, "SQLitePCLRaw.batteries_v2.dll"),
overwrite: true);
FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.bundle_green", "lib", "net45", "SQLitePCLRaw.batteries_green.dll"),
destination: CombinePaths(msbuildCurrentBinTargetFolder, "SQLitePCLRaw.batteries_green.dll"),
overwrite: true);
var msbuild15TargetFolder = CombinePaths(env.Folders.MSBuild, "15.0");
if (!Platform.Current.IsWindows)
{
DirectoryHelper.Copy(msbuildCurrentTargetFolder, msbuild15TargetFolder);
}
});

/// <summary>
Expand Down Expand Up @@ -696,27 +685,6 @@ void CopyMonoBuild(BuildEnvironment env, string sourceFolder, string outputFolde

var msbuildBinFolder = CombinePaths(msbuildFolder, "bin", "Current");
EnsureDirectoryExists(msbuildBinFolder);

// Copy dependencies of Mono build
FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.core", "lib", "net45", "SQLitePCLRaw.core.dll"),
destination: CombinePaths(msbuildBinFolder, "SQLitePCLRaw.core.dll"),
overwrite: true);

FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.provider.e_sqlite3.net45", "lib", "net45", "SQLitePCLRaw.provider.e_sqlite3.dll"),
destination: CombinePaths(msbuildBinFolder, "SQLitePCLRaw.provider.e_sqlite3.dll"),
overwrite: true);

FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.bundle_green", "lib", "net45", "SQLitePCLRaw.batteries_v2.dll"),
destination: CombinePaths(msbuildBinFolder, "SQLitePCLRaw.batteries_v2.dll"),
overwrite: true);

FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.bundle_green", "lib", "net45", "SQLitePCLRaw.batteries_green.dll"),
destination: CombinePaths(msbuildBinFolder, "SQLitePCLRaw.batteries_green.dll"),
overwrite: true);
}

void CopyExtraDependencies(BuildEnvironment env, string outputFolder)
Expand All @@ -737,23 +705,19 @@ string PublishMonoBuild(string project, BuildEnvironment env, BuildPlan plan, st

CopyExtraDependencies(env, outputFolder);

// Copy dependencies of Mono build
FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.core", "lib", "net45", "SQLitePCLRaw.core.dll"),
destination: CombinePaths(outputFolder, "SQLitePCLRaw.core.dll"),
overwrite: true);
FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.provider.e_sqlite3.net45", "lib", "net45", "SQLitePCLRaw.provider.e_sqlite3.dll"),
destination: CombinePaths(outputFolder, "SQLitePCLRaw.provider.e_sqlite3.dll"),
overwrite: true);
FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.bundle_green", "lib", "net45", "SQLitePCLRaw.batteries_v2.dll"),
destination: CombinePaths(outputFolder, "SQLitePCLRaw.batteries_v2.dll"),
overwrite: true);
FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.bundle_green", "lib", "net45", "SQLitePCLRaw.batteries_green.dll"),
destination: CombinePaths(outputFolder, "SQLitePCLRaw.batteries_green.dll"),
overwrite: true);
// Copy dependencies of Mono build
FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.core", "lib", "netstandard2.0", "SQLitePCLRaw.core.dll"),
destination: CombinePaths(outputFolder, "SQLitePCLRaw.core.dll"),
overwrite: true);
FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.provider.e_sqlite3", "lib", "netstandard2.0", "SQLitePCLRaw.provider.e_sqlite3.dll"),
destination: CombinePaths(outputFolder, "SQLitePCLRaw.provider.e_sqlite3.dll"),
overwrite: true);
FileHelper.Copy(
source: CombinePaths(env.Folders.Tools, "SQLitePCLRaw.bundle_green", "lib", "netstandard2.0", "SQLitePCLRaw.batteries_v2.dll"),
destination: CombinePaths(outputFolder, "SQLitePCLRaw.batteries_v2.dll"),
overwrite: true);

Package(project, "mono", outputFolder, env.Folders.ArtifactsPackage, env.Folders.DeploymentPackage);

Expand Down
6 changes: 3 additions & 3 deletions tools/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<package id="runtime.win-x64.Microsoft.NETCore.DotNetHostResolver" version="6.0.0-preview.1.21102.12" />
<package id="runtime.win-x86.Microsoft.NETCore.DotNetHostResolver" version="6.0.0-preview.1.21102.12" />
<package id="runtime.win-arm64.Microsoft.NETCore.DotNetHostResolver" version="6.0.0-preview.1.21102.12" />
<package id="SQLitePCLRaw.bundle_green" version="1.1.2" />
<package id="SQLitePCLRaw.core" version="1.1.2" />
<package id="SQLitePCLRaw.provider.e_sqlite3.net45" version="1.1.2" />
<package id="SQLitePCLRaw.bundle_green" version="2.0.4" />
<package id="SQLitePCLRaw.core" version="2.0.4" />
<package id="SQLitePCLRaw.provider.e_sqlite3" version="2.0.4" />
<package id="System.Buffers" version="4.5.1" />
<package id="System.Collections.Immutable" version="5.0.0" />
<package id="System.Memory" version="4.5.4" />
Expand Down

0 comments on commit d940fb8

Please sign in to comment.