Skip to content

Commit

Permalink
chg nuspec and bundles for maccatalyst. ericsink#471
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsink committed Mar 18, 2022
1 parent 9d5a8b6 commit 667854c
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
include-prerelease: true
- name: Install workload ios
run: dotnet workload install ios
- name: Install workload maccatalyst
run: dotnet workload install maccatalyst
- name: Install workload android
run: dotnet workload install android
- name: Install workload tvos
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
include-prerelease: true
- name: Install workload ios
run: dotnet workload install ios
- name: Install workload maccatalyst
run: dotnet workload install maccatalyst
- name: Install workload android
run: dotnet workload install android
- name: Install workload tvos
Expand Down
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<Copyright>Copyright 2014-2022 SourceGear, LLC</Copyright>
<Company>SourceGear</Company>
<Authors>Eric Sink</Authors>
<Version>2.1.0-pre20220307113105</Version>
<AssemblyVersion>2.1.0.1526</AssemblyVersion>
<FileVersion>2.1.0.1526</FileVersion>
<Version>2.1.0-pre20220318132246</Version>
<AssemblyVersion>2.1.0.1537</AssemblyVersion>
<FileVersion>2.1.0.1537</FileVersion>
<Description>SQLitePCLRaw is a Portable Class Library (PCL) for low-level (raw) access to SQLite</Description>
<ProviderLangVersion>10.0</ProviderLangVersion>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
Expand Down
32 changes: 32 additions & 0 deletions gen_lib_nuspecs/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public enum TFM
NETSTANDARD20,
NET461,
NET60,
MACCATALYST,
}

public static class common
Expand All @@ -42,6 +43,7 @@ public static string AsString(this TFM e)
case TFM.NETSTANDARD20: return "netstandard2.0";
case TFM.NET461: return "net461";
case TFM.NET60: return "net6.0";
case TFM.MACCATALYST: return "net6.0-maccatalyst15.2";
default:
throw new NotImplementedException(string.Format("TFM.AsString for {0}", e));
}
Expand Down Expand Up @@ -260,6 +262,16 @@ string cpu
return Path.Combine("$cb_bin_path$", dir_name, "mac", cpu, lib_name);
}

static string make_cb_path_maccatalyst(
WhichLib lib,
string cpu
)
{
var dir_name = lib.AsString_basename_in_cb();
var lib_name = lib.AsString_libname_in_cb(LibSuffix.DYLIB);
return Path.Combine("$cb_bin_path$", dir_name, "maccatalyst", cpu, lib_name);
}

static void write_nuspec_file_entry_native_linux(
WhichLib lib,
string cpu_in_cb,
Expand Down Expand Up @@ -307,6 +319,23 @@ XmlWriter f
);
}

static void write_nuspec_file_entry_native_maccatalyst(
WhichLib lib,
string cpu_in_cb,
string rid,
XmlWriter f
)
{
var filename = lib.AsString_libname_in_nupkg(LibSuffix.DYLIB);
write_nuspec_file_entry_nativeassets(
make_cb_path_maccatalyst(lib, cpu_in_cb),
rid,
TFM.MACCATALYST,
filename,
f
);
}

static void write_nuspec_file_entry_native_win(
WhichLib lib,
string toolset,
Expand Down Expand Up @@ -363,6 +392,9 @@ XmlWriter f
write_nuspec_file_entry_native_mac(lib, "x86_64", "osx-x64", f);
write_nuspec_file_entry_native_mac(lib, "arm64", "osx-arm64", f);

write_nuspec_file_entry_native_maccatalyst(lib, "x86_64", "osx-x64", f);
write_nuspec_file_entry_native_maccatalyst(lib, "arm64", "osx-arm64", f);

write_nuspec_file_entry_native_linux(lib, "x64", "linux-x64", f);
write_nuspec_file_entry_native_linux(lib, "x86", "linux-x86", f);
write_nuspec_file_entry_native_linux(lib, "armhf", "linux-arm", f);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Xamarin.Legacy.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0-ios;net6.0-android;xamarin.ios10;$(monoandroid_tfm);net461</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0-ios;net6.0-maccatalyst;net6.0-android;xamarin.ios10;$(monoandroid_tfm);net461</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<PackageId>SQLitePCLRaw.bundle_e_sqlcipher</PackageId>
<AssemblyName>SQLitePCLRaw.batteries_v2</AssemblyName>
Expand All @@ -16,6 +16,7 @@

<Import Condition=" '$(TargetFramework)' == 'netstandard2.0' " Project="..\msbuild_bundle_fragments\e_sqlcipher_dllimport.xml" />
<Import Condition=" '$(TargetFramework)' == 'net6.0-ios' " Project="..\msbuild_bundle_fragments\e_sqlcipher_ios.xml" />
<Import Condition=" '$(TargetFramework)' == 'net6.0-maccatalyst' " Project="..\msbuild_bundle_fragments\e_sqlcipher_dllimport.xml" />
<Import Condition=" '$(TargetFramework)' == 'net6.0-android' " Project="..\msbuild_bundle_fragments\e_sqlcipher_android.xml" />
<Import Condition=" '$(TargetFramework)' == 'xamarin.ios10' " Project="..\msbuild_bundle_fragments\e_sqlcipher_ios.xml" />
<Import Condition=" '$(TargetFramework)' == '$(monoandroid_tfm)' " Project="..\msbuild_bundle_fragments\e_sqlcipher_android.xml" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Xamarin.Legacy.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0-ios;net6.0-android;xamarin.ios10;$(monoandroid_tfm);net461;net6.0-tvos10</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0-ios;net6.0-maccatalyst;net6.0-android;xamarin.ios10;$(monoandroid_tfm);net461;net6.0-tvos10</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<PackageId>SQLitePCLRaw.bundle_e_sqlite3</PackageId>
<AssemblyName>SQLitePCLRaw.batteries_v2</AssemblyName>
Expand All @@ -16,6 +16,7 @@

<Import Condition=" '$(TargetFramework)' == 'netstandard2.0' " Project="..\msbuild_bundle_fragments\e_sqlite3_dllimport.xml" />
<Import Condition=" '$(TargetFramework)' == 'net6.0-ios' " Project="..\msbuild_bundle_fragments\e_sqlite3_ios.xml" />
<Import Condition=" '$(TargetFramework)' == 'net6.0-maccatalyst' " Project="..\msbuild_bundle_fragments\e_sqlite3_dllimport.xml" />
<Import Condition=" '$(TargetFramework)' == 'net6.0-android' " Project="..\msbuild_bundle_fragments\e_sqlite3_android.xml" />
<Import Condition=" '$(TargetFramework)' == 'xamarin.ios10' " Project="..\msbuild_bundle_fragments\e_sqlite3_ios.xml" />
<Import Condition=" '$(TargetFramework)' == '$(monoandroid_tfm)' " Project="..\msbuild_bundle_fragments\e_sqlite3_android.xml" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Xamarin.Legacy.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0-ios;net6.0-android;xamarin.ios10;$(monoandroid_tfm);net461;net6.0-tvos10</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0-ios;net6.0-maccatalyst;net6.0-android;xamarin.ios10;$(monoandroid_tfm);net461;net6.0-tvos10</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<PackageId>SQLitePCLRaw.bundle_green</PackageId>
<AssemblyName>SQLitePCLRaw.batteries_v2</AssemblyName>
Expand All @@ -16,6 +16,7 @@

<Import Condition=" '$(TargetFramework)' == 'netstandard2.0' " Project="..\msbuild_bundle_fragments\e_sqlite3_dllimport.xml" />
<Import Condition=" '$(TargetFramework)' == 'net6.0-ios' " Project="..\msbuild_bundle_fragments\sqlite3_dllimport.xml" />
<Import Condition=" '$(TargetFramework)' == 'net6.0-maccatalyst' " Project="..\msbuild_bundle_fragments\sqlite3_dllimport.xml" />
<Import Condition=" '$(TargetFramework)' == 'net6.0-android' " Project="..\msbuild_bundle_fragments\e_sqlite3_android.xml" />
<Import Condition=" '$(TargetFramework)' == 'xamarin.ios10' " Project="..\msbuild_bundle_fragments\sqlite3_dllimport.xml" />
<Import Condition=" '$(TargetFramework)' == '$(monoandroid_tfm)' " Project="..\msbuild_bundle_fragments\e_sqlite3_android.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<file src="$cb_bin_path$\e_sqlcipher\win\v142\appcontainer\x86\e_sqlcipher.dll" target="runtimes\win10-x86\nativeassets\uap10.0\e_sqlcipher.dll" />
<file src="$cb_bin_path$\e_sqlcipher\mac\x86_64\libe_sqlcipher.dylib" target="runtimes\osx-x64\native\libe_sqlcipher.dylib" />
<file src="$cb_bin_path$\e_sqlcipher\mac\arm64\libe_sqlcipher.dylib" target="runtimes\osx-arm64\native\libe_sqlcipher.dylib" />
<file src="$cb_bin_path$\e_sqlcipher\maccatalyst\x86_64\libe_sqlcipher.dylib" target="runtimes\osx-x64\nativeassets\net6.0-maccatalyst15.2\libe_sqlcipher.dylib" />
<file src="$cb_bin_path$\e_sqlcipher\maccatalyst\arm64\libe_sqlcipher.dylib" target="runtimes\osx-arm64\nativeassets\net6.0-maccatalyst15.2\libe_sqlcipher.dylib" />
<file src="$cb_bin_path$\e_sqlcipher\linux\x64\libe_sqlcipher.so" target="runtimes\linux-x64\native\libe_sqlcipher.so" />
<file src="$cb_bin_path$\e_sqlcipher\linux\x86\libe_sqlcipher.so" target="runtimes\linux-x86\native\libe_sqlcipher.so" />
<file src="$cb_bin_path$\e_sqlcipher\linux\armhf\libe_sqlcipher.so" target="runtimes\linux-arm\native\libe_sqlcipher.so" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<file src="$cb_bin_path$\e_sqlite3\win\v142\appcontainer\x86\e_sqlite3.dll" target="runtimes\win10-x86\nativeassets\uap10.0\e_sqlite3.dll" />
<file src="$cb_bin_path$\e_sqlite3\mac\x86_64\libe_sqlite3.dylib" target="runtimes\osx-x64\native\libe_sqlite3.dylib" />
<file src="$cb_bin_path$\e_sqlite3\mac\arm64\libe_sqlite3.dylib" target="runtimes\osx-arm64\native\libe_sqlite3.dylib" />
<file src="$cb_bin_path$\e_sqlite3\maccatalyst\x86_64\libe_sqlite3.dylib" target="runtimes\osx-x64\nativeassets\net6.0-maccatalyst15.2\libe_sqlite3.dylib" />
<file src="$cb_bin_path$\e_sqlite3\maccatalyst\arm64\libe_sqlite3.dylib" target="runtimes\osx-arm64\nativeassets\net6.0-maccatalyst15.2\libe_sqlite3.dylib" />
<file src="$cb_bin_path$\e_sqlite3\linux\x64\libe_sqlite3.so" target="runtimes\linux-x64\native\libe_sqlite3.so" />
<file src="$cb_bin_path$\e_sqlite3\linux\x86\libe_sqlite3.so" target="runtimes\linux-x86\native\libe_sqlite3.so" />
<file src="$cb_bin_path$\e_sqlite3\linux\armhf\libe_sqlite3.so" target="runtimes\linux-arm\native\libe_sqlite3.so" />
Expand Down

0 comments on commit 667854c

Please sign in to comment.