First commit

This commit is contained in:
eevee
2024-11-03 18:29:07 +03:00
commit db63ef6ff2
41 changed files with 1742 additions and 0 deletions
@@ -0,0 +1,7 @@
namespace ivinject.Features.Packaging.Models;
internal class DirectoryNames
{
internal const string FrameworksDirectoryName = "Frameworks";
internal const string PlugInsDirectoryName = "PlugIns";
}
@@ -0,0 +1,16 @@
namespace ivinject.Features.Packaging.Models;
internal static class InfoPlistDictionaryKeys
{
internal const string UiKitSupportedDevicesKey = "UISupportedDevices";
internal const string UiKitSupportsDocumentBrowserKey = "UISupportsDocumentBrowser";
internal const string UiKitFileSharingEnabledKey = "UIFileSharingEnabled";
internal const string CoreFoundationBundleIdentifierKey = "CFBundleIdentifier";
internal const string CoreFoundationBundleExecutableKey = "CFBundleExecutable";
internal const string WatchKitCompanionAppBundleIdentifierKey = "WKCompanionAppBundleIdentifier";
internal const string NextStepExtensionKey = "NSExtension";
internal const string NextStepExtensionPointIdentifierKey = "NSExtensionPointIdentifier";
internal const string NextStepExtensionAttributesKey = "NSExtensionAttributes";
internal const string WatchKitAppBundleIdentifierKey = "WKAppBundleIdentifier";
}
@@ -0,0 +1,10 @@
using static ivinject.Features.Packaging.Models.DirectoryNames;
namespace ivinject.Features.Packaging.Models;
internal class IviDirectoriesInfo(string bundleDirectory)
{
internal string BundleDirectory { get; } = bundleDirectory;
internal string FrameworksDirectory { get; } = Path.Combine(bundleDirectory, FrameworksDirectoryName);
internal string PlugInsDirectory { get; } = Path.Combine(bundleDirectory, PlugInsDirectoryName);
}
@@ -0,0 +1,12 @@
using ivinject.Common.Models;
namespace ivinject.Features.Packaging.Models;
internal class IviPackageInfo(string mainBinary, string bundleIdentifier, IviDirectoriesInfo directoriesInfo)
{
internal IviMachOBinary MainBinary { get; } = new(
Path.Combine(directoriesInfo.BundleDirectory, mainBinary)
);
internal string BundleIdentifier { get; } = bundleIdentifier;
internal IviDirectoriesInfo DirectoriesInfo { get; } = directoriesInfo;
}