Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added code to make MacOS application bundle. #28 #83

Merged
merged 1 commit into from
Jun 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions build/Jaya.app/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">
<dict>

<key>CFBundlePackageType</key>
<string>APPL</string>

<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>

<key>CFBundleIconFile</key>
<string>Jaya</string>

<key>CFBundleName</key>
<string>Jaya</string>

<key>CFBundleExecutable</key>
<string>Jaya.Ui</string>

<key>CFBundleIdentifier</key>
<string>com.jaya.explorer</string>

<key>CFBundleVersion</key>
<string>1.0</string>

<key>CFBundleShortVersionString</key>
<string>1.0</string>

<key>NSHighResolutionCapable</key>
<string>True</string>

<key>LSMinimumSystemVersion</key>
<string>10.14</string>

<key>NSHumanReadableCopyright</key>
<string>Copyright (c) 2020 Rubal Walia</string>

<key>CFBundleDevelopmentRegion</key>
<string>en</string>

<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFile</key>
<string>Jaya.icns</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
</array>
</dict>
</plist>
40 changes: 36 additions & 4 deletions build/build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ Task("BuildWindows64")
};
DotNetCorePublish(GetPath(_sourceDirectory), settings);

Information("Create archive 'windows.zip' from the build.");
Zip(outputDirectory, _outputDirectory + File("windows.zip"));
Information("Create portable ZIP archive from the build.");
Zip(outputDirectory, _outputDirectory + File("windows_portable.zip"));

Information("Create installation setup.");
var setupSettings = new InnoSetupSettings
Expand All @@ -99,15 +99,47 @@ Task("BuildMacOS64")
.IsDependentOn("BuildInitialization")
.Does(() =>
{
Information("Executing MacOS (64-bit) build.");
var outputDirectory = _outputDirectory + Directory("osx");

Information("Build for MacOS (64-bit).");
var settings = new DotNetCorePublishSettings
{
Framework = "netcoreapp3.1",
Configuration = "Release",
SelfContained = true,
Runtime = "osx-x64",
OutputDirectory = GetPath(outputDirectory)
};
DotNetCorePublish(GetPath(_sourceDirectory), settings);

Information("Create portable ZIP archive from the build.");
Zip(outputDirectory, _outputDirectory + File("osx_portable.zip"));

Information("Create MacOS application bundle.");
CopyDirectory(_buildDirectory + Directory("Jaya.app"), _outputDirectory + Directory("Jaya.app"));
CopyDirectory(outputDirectory, _outputDirectory + Directory("Jaya.app/Contents/MacOS"));
});

Task("BuildLinux64")
.WithCriteria(() => _operatingSystem == OperatingSystem.Linux)
.IsDependentOn("BuildInitialization")
.Does(() =>
{
Information("Executing Linux (64-bit) build.");
var outputDirectory = _outputDirectory + Directory("osx");

Information("Build for Linux (64-bit).");
var settings = new DotNetCorePublishSettings
{
Framework = "netcoreapp3.1",
Configuration = "Release",
SelfContained = true,
Runtime = "linux-x64",
OutputDirectory = GetPath(outputDirectory)
};
DotNetCorePublish(GetPath(_sourceDirectory), settings);

Information("Create portable ZIP archive from the build.");
Zip(outputDirectory, _outputDirectory + File("linux_portable.zip"));
});

Task("Deploy")
Expand Down
29 changes: 0 additions & 29 deletions src/Jaya.app/Contents/Info.plist

This file was deleted.

10 changes: 0 additions & 10 deletions src/dist.mac.ps1

This file was deleted.