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

[macOS] add download link & sample #89

Merged
merged 3 commits into from
Mar 12, 2021
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
13 changes: 13 additions & 0 deletions HelloMacOS/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using AppKit;
using Foundation;

namespace HelloMacOS
{
[Register("AppDelegate")]
public class AppDelegate : NSApplicationDelegate
{
public AppDelegate()
{
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions HelloMacOS/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"images": [
{
"filename": "AppIcon-16.png",
"size": "16x16",
"scale": "1x",
"idiom": "mac"
},
{
"filename": "AppIcon-16@2x.png",
"size": "16x16",
"scale": "2x",
"idiom": "mac"
},
{
"filename": "AppIcon-32.png",
"size": "32x32",
"scale": "1x",
"idiom": "mac"
},
{
"filename": "AppIcon-32@2x.png",
"size": "32x32",
"scale": "2x",
"idiom": "mac"
},
{
"filename": "AppIcon-128.png",
"size": "128x128",
"scale": "1x",
"idiom": "mac"
},
{
"filename": "AppIcon-128@2x.png",
"size": "128x128",
"scale": "2x",
"idiom": "mac"
},
{
"filename": "AppIcon-256.png",
"size": "256x256",
"scale": "1x",
"idiom": "mac"
},
{
"filename": "AppIcon-256@2x.png",
"size": "256x256",
"scale": "2x",
"idiom": "mac"
},
{
"filename": "AppIcon-512.png",
"size": "512x512",
"scale": "1x",
"idiom": "mac"
},
{
"filename": "AppIcon-512@2x.png",
"size": "512x512",
"scale": "2x",
"idiom": "mac"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
6 changes: 6 additions & 0 deletions HelloMacOS/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
6 changes: 6 additions & 0 deletions HelloMacOS/Entitlements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?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>
</dict>
</plist>
7 changes: 7 additions & 0 deletions HelloMacOS/HelloMacOS.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-macos</TargetFramework>
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
<OutputType>Exe</OutputType>
</PropertyGroup>
</Project>
32 changes: 32 additions & 0 deletions HelloMacOS/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?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>CFBundleName</key>
<string>HelloMacOS</string>
<key>CFBundleIdentifier</key>
<string>com.microsoft.net6.hellomaccatalyst</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>NSHumanReadableCopyright</key>
<string>© Microsoft</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
</dict>
</plist>
13 changes: 13 additions & 0 deletions HelloMacOS/Main.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using AppKit;

namespace HelloMacOS
{
static class MainClass
{
static void Main(string[] args)
{
NSApplication.Init();
NSApplication.Main(args);
}
}
}
717 changes: 717 additions & 0 deletions HelloMacOS/Main.storyboard

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions HelloMacOS/ViewController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;

using AppKit;
using Foundation;

namespace HelloMacOS
{
public partial class ViewController : NSViewController
{
public ViewController(IntPtr handle) : base(handle)
{
}
}
}
18 changes: 18 additions & 0 deletions HelloMacOS/ViewController.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ iOS:
* Windows: [Microsoft.NET.Workload.iOS.14.4.100-ci.main.1192.msi](https://bosstoragemirror.azureedge.net/wrench/main/98c8649d0c7d1e3c4c8d8d09e022befa853fb1e7/4541181/package/Microsoft.NET.Workload.iOS.14.4.100-ci.main.1192.msi)
* macOS: [Microsoft.iOS.Bundle.14.4.100-ci.main.1192.pkg](https://bosstoragemirror.azureedge.net/wrench/main/98c8649d0c7d1e3c4c8d8d09e022befa853fb1e7/4541181/package/notarized/Microsoft.iOS.Bundle.14.4.100-ci.main.1192.pkg)

Mac Catalyst:
Mac (Cocoa/AppKit):

* macOS: [Microsoft.macOS.Bundle.11.1.100-ci.main.1245.pkg](https://bosstoragemirror.azureedge.net/wrench/main/98c8649d0c7d1e3c4c8d8d09e022befa853fb1e7/4541181/package/notarized/Microsoft.macOS.Bundle.11.1.100-ci.main.1245.pkg)

Mac Catalyst (UIKit):

* macOS: [Microsoft.MacCatalyst.Bundle.14.3.100-ci.main.337.pkg](https://bosstoragemirror.azureedge.net/wrench/main/98c8649d0c7d1e3c4c8d8d09e022befa853fb1e7/4541181/package/notarized/Microsoft.MacCatalyst.Bundle.14.3.100-ci.main.337.pkg)

Expand Down
8 changes: 8 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ variables:
Android.Pkg: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/net6/4534967/main/f4d8fe238b15eadfc7842749bf13e5fca3e2f2d2/Microsoft.NET.Workload.Android-11.0.200-ci.f4d8fe238b15eadfc7842749bf13e5fca3e2f2d2.148.pkg
iOS.Msi: https://bosstoragemirror.azureedge.net/wrench/main/98c8649d0c7d1e3c4c8d8d09e022befa853fb1e7/4541181/package/Microsoft.NET.Workload.iOS.14.4.100-ci.main.1192.msi
iOS.Pkg: https://bosstoragemirror.azureedge.net/wrench/main/98c8649d0c7d1e3c4c8d8d09e022befa853fb1e7/4541181/package/notarized/Microsoft.iOS.Bundle.14.4.100-ci.main.1192.pkg
macOS.Pkg: https://bosstoragemirror.azureedge.net/wrench/main/98c8649d0c7d1e3c4c8d8d09e022befa853fb1e7/4541181/package/notarized/Microsoft.macOS.Bundle.11.1.100-ci.main.1245.pkg
MacCatalyst.Pkg: https://bosstoragemirror.azureedge.net/wrench/main/98c8649d0c7d1e3c4c8d8d09e022befa853fb1e7/4541181/package/notarized/Microsoft.MacCatalyst.Bundle.14.3.100-ci.main.337.pkg

jobs:
Expand Down Expand Up @@ -90,6 +91,7 @@ jobs:
dotnet tool install --global boots
boots $(Android.Pkg)
boots $(iOS.Pkg)
boots $(macOS.Pkg)
boots $(MacCatalyst.Pkg)
displayName: install .NET workloads

Expand All @@ -109,12 +111,18 @@ jobs:
dotnet build net6-samples.sln -c Release -bl:$(LogDirectory)/Release.binlog
displayName: build samples

- bash: |
dotnet build vs/net6-samples-mac.sln -c Debug -bl:$(LogDirectory)/Debug-Mac.binlog &&
dotnet build vs/net6-samples-mac.sln -c Release -bl:$(LogDirectory)/Release-Mac.binlog
displayName: build macOS-only samples

- task: CopyFiles@2
displayName: copy artifacts
inputs:
contents: |
*Android/**/*-Signed.apk
*iOS/**/*.app/**
*Mac*/**/*.app/**
targetFolder: $(Build.ArtifactStagingDirectory)
overWrite: true
condition: always()
Expand Down
51 changes: 51 additions & 0 deletions vs/net6-samples-mac.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.6.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloMacCatalyst", "..\HelloMacCatalyst\HelloMacCatalyst.csproj", "{459BD28B-1640-433D-90CF-3BF4247D67B6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloMacOS", "..\HelloMacOS\HelloMacOS.csproj", "{076CA2EC-AF12-45F2-A426-6B331ED8C976}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{459BD28B-1640-433D-90CF-3BF4247D67B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{459BD28B-1640-433D-90CF-3BF4247D67B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{459BD28B-1640-433D-90CF-3BF4247D67B6}.Debug|x64.ActiveCfg = Debug|Any CPU
{459BD28B-1640-433D-90CF-3BF4247D67B6}.Debug|x64.Build.0 = Debug|Any CPU
{459BD28B-1640-433D-90CF-3BF4247D67B6}.Debug|x86.ActiveCfg = Debug|Any CPU
{459BD28B-1640-433D-90CF-3BF4247D67B6}.Debug|x86.Build.0 = Debug|Any CPU
{459BD28B-1640-433D-90CF-3BF4247D67B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{459BD28B-1640-433D-90CF-3BF4247D67B6}.Release|Any CPU.Build.0 = Release|Any CPU
{459BD28B-1640-433D-90CF-3BF4247D67B6}.Release|x64.ActiveCfg = Release|Any CPU
{459BD28B-1640-433D-90CF-3BF4247D67B6}.Release|x64.Build.0 = Release|Any CPU
{459BD28B-1640-433D-90CF-3BF4247D67B6}.Release|x86.ActiveCfg = Release|Any CPU
{459BD28B-1640-433D-90CF-3BF4247D67B6}.Release|x86.Build.0 = Release|Any CPU
{076CA2EC-AF12-45F2-A426-6B331ED8C976}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{076CA2EC-AF12-45F2-A426-6B331ED8C976}.Debug|Any CPU.Build.0 = Debug|Any CPU
{076CA2EC-AF12-45F2-A426-6B331ED8C976}.Debug|x64.ActiveCfg = Debug|Any CPU
{076CA2EC-AF12-45F2-A426-6B331ED8C976}.Debug|x64.Build.0 = Debug|Any CPU
{076CA2EC-AF12-45F2-A426-6B331ED8C976}.Debug|x86.ActiveCfg = Debug|Any CPU
{076CA2EC-AF12-45F2-A426-6B331ED8C976}.Debug|x86.Build.0 = Debug|Any CPU
{076CA2EC-AF12-45F2-A426-6B331ED8C976}.Release|Any CPU.ActiveCfg = Release|Any CPU
{076CA2EC-AF12-45F2-A426-6B331ED8C976}.Release|Any CPU.Build.0 = Release|Any CPU
{076CA2EC-AF12-45F2-A426-6B331ED8C976}.Release|x64.ActiveCfg = Release|Any CPU
{076CA2EC-AF12-45F2-A426-6B331ED8C976}.Release|x64.Build.0 = Release|Any CPU
{076CA2EC-AF12-45F2-A426-6B331ED8C976}.Release|x86.ActiveCfg = Release|Any CPU
{076CA2EC-AF12-45F2-A426-6B331ED8C976}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {286957BE-D67B-4957-ADD8-D6745146B35F}
EndGlobalSection
EndGlobal