Skip to content

Commit

Permalink
Added code to make MacOS application bundle. #28
Browse files Browse the repository at this point in the history
  • Loading branch information
waliarubal committed Jun 4, 2020
1 parent 2dad5c2 commit 32084b0
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 43 deletions.
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>
File renamed without changes.
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.

0 comments on commit 32084b0

Please sign in to comment.