Skip to content

Commit f970449

Browse files
committed
Updates to documentation
1 parent 01b1b2f commit f970449

File tree

16 files changed

+96
-57
lines changed

16 files changed

+96
-57
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ indent_size = 2
3737

3838
[*.md]
3939
indent_style = space
40-
indent_size = 4
40+
indent_size = 2
4141

4242
[*.{cs,vb}]
4343
# Indentation style/size

.github/workflows/publish-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ jobs:
3535
with:
3636
docfx-file-path: "docs/docfx.json"
3737

38-
- name: Push files to target repo
38+
- name: Checkout target repository
3939
uses: actions/checkout@v4
4040
with:
4141
repository: picoe/Eto.Support
4242
token: ${{ secrets.PUBLISH_DOCS_PAT }}
4343
path: target-repo
4444

45-
- name: Copy files
45+
- name: Copy files to target repository
4646
run: |
4747
rm -rf ./target-repo/docs/*
48-
cp -r ./artifacts/docs/* ./target-repo/docs/
48+
cp -R ./artifacts/docs/_site/* ./target-repo/docs/
4949
5050
- name: Commit and push changes
5151
run: |

.vscode/tasks.json

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,22 @@
182182
"command": "docfx docfx.json --serve",
183183
"problemMatcher": "$msCompile",
184184
"options": {
185-
"cwd": "${workspaceFolder}/docs"
185+
"cwd": "${workspaceFolder}/docs",
186+
},
187+
"presentation": {
188+
"clear": true
186189
}
187190
},
188191
{
189192
"label": "docfx-build",
190193
"type": "shell",
191-
"command": "docfx build docfx.json",
194+
"command": "docfx ${input:docfx-config} docfx.json",
192195
"problemMatcher": "$msCompile",
193196
"options": {
194197
"cwd": "${workspaceFolder}/docs"
198+
},
199+
"presentation": {
200+
"clear": true
195201
}
196202
}
197203
],
@@ -219,6 +225,15 @@
219225
"id": "version",
220226
"description": "Enter the version to update to",
221227
"default": "2.5.x-dev"
222-
}
228+
},
229+
{
230+
"type": "pickString",
231+
"id": "docfx-config",
232+
"description": "Docfx Configuration",
233+
"options": [
234+
"build",
235+
"metadata"
236+
]
237+
},
223238
]
224239
}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Build](https://github.com/picoe/Eto/actions/workflows/build.yml/badge.svg)](https://github.com/picoe/Eto/actions/workflows/build.yml)
66
[![discussions](https://img.shields.io/badge/join-the%20discussions-yellowgreen.svg)](https://github.com/picoe/Eto/discussions)
77
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/picoe/Eto)
8-
[![wiki](https://img.shields.io/badge/browse-the%20wiki-orange.svg)](https://github.com/picoe/Eto/wiki)
8+
[![docs](https://img.shields.io/badge/browse-the%20docs-orange.svg)](http://pages.picoe.ca/docs/docs)
99
[![NuGet](http://img.shields.io/nuget/v/Eto.Forms.svg?style=flat)](https://www.nuget.org/packages/Eto.Forms/)
1010
[![MyGet](http://img.shields.io/myget/eto/vpre/Eto.Forms.svg?style=flat&label=MyGet)](https://www.myget.org/gallery/eto)
1111

@@ -65,9 +65,9 @@ form.Show()
6565

6666
## Getting Started
6767

68-
To begin creating apps using Eto.Forms, follow the [Quick Start Guide](https://github.com/picoe/Eto/wiki/Quick-Start).
68+
To begin creating apps using Eto.Forms, follow the [Quick Start Guide](http://pages.picoe.ca/docs/docs/Quick-Start.html).
6969

70-
To compile or contribute to Eto.Forms, read the [Contributing Guide](https://github.com/picoe/Eto/wiki/Contributing).
70+
To compile or contribute to Eto.Forms, read the [Contributing Guide](http://pages.picoe.ca/docs/docs/Contributing.html).
7171

7272
## Screenshots
7373

@@ -118,7 +118,7 @@ Linux via GTK#3:
118118

119119
## Assemblies
120120

121-
Your project only needs to reference Eto.dll, and include the corresponding platform assembly that you wish to target. To run on a Mac platform, you need to [bundle your app](https://github.com/picoe/Eto/wiki/Running-your-application).
121+
Your project only needs to reference Eto.dll, and include the corresponding platform assembly that you wish to target. To run on a Mac platform, you need to [bundle your app](http://pages.picoe.ca/docs/docs/Running-your-application.html).
122122

123123
* Eto.dll - Eto.Forms (UI), Eto.Drawing (Graphics), and platform loading
124124
* Eto.Mac64.dll - Lightweight Mac platform using .NET 6+ or mono

docs/docfx.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
{
55
"src": [
66
{
7-
"src": "../src/Eto",
7+
"src": "../src/",
88
"files": [
9-
"**/*.csproj"
9+
"Eto/Eto.csproj",
10+
"Eto.Serialization.Xaml/Eto.Serialization.Xaml.csproj",
11+
"Eto.Serialization.Json/Eto.Serialization.Json.csproj"
1012
]
1113
}
1214
],
@@ -21,15 +23,15 @@
2123
"../README.md"
2224
],
2325
"exclude": [
24-
"_site/**"
26+
"_site/**",
27+
"filterConfig*.yml"
2528
]
2629
}
2730
],
2831
"resource": [
2932
{
3033
"files": [
31-
"images/**",
32-
"favicon.ico"
34+
"images/**"
3335
]
3436
}
3537
],
@@ -42,7 +44,7 @@
4244
"_appName": "Eto.Forms",
4345
"_appTitle": "Eto.Forms",
4446
"_enableSearch": true,
45-
"_appFaviconPath": "favicon.ico",
47+
"_appFaviconPath": "images/logo.svg",
4648
"_appLogoPath": "images/logo.svg"
4749
}
4850

docs/docs/Mac-Code-Signing-and-Notarization.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
In order for you to distribute your Mac applications, you need to code sign and notarize them. More information about this can be found [here](https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution). Code signing and notarization require Xcode tools, so this can only be done on a Mac.
44

5-
Eto.Forms provides msbuild targets that will automatically code sign and notarize your software during the build process. These are the steps to follow to get it going:
5+
Eto.Forms provides msbuild targets that will automatically code sign and notarize your software during the build process for the Mac64 platform target. These are the steps to follow to get it going:
66

77
1. Get an [Apple developer account](https://developer.apple.com/programs/enroll/).
88
2. Import your code signing and notarization certificates. For GitHub Actions, [`apple-actions/import-codesign-certs`](https://github.com/apple-actions/import-codesign-certs) has been used with success.
9-
3. (Optional) create an app-specific password for your apple developer account [here](https://appleid.apple.com/account/manage) to use for notarization
10-
4. Store your apple notarization credentials in the keychain using altool with the name AC_PASSWORD (replace the ${{ secrets.* }} with the appropriate values, or add the secrets to your GitHub Actions project or organization):
9+
3. (Optional) create an app-specific password for your [apple developer account](https://appleid.apple.com/account/manage) to use for notarization
10+
4. Store your apple notarization credentials in the keychain using altool with the name `AC_PASSWORD` (replace `${{ secrets.* }}` with the appropriate values, or add the secrets to your GitHub Actions project or organization):
1111

1212
```sh
1313
xcrun altool --store-password-in-keychain-item "AC_PASSWORD" -u "${{ secrets.AC_USERNAME }}" -p "${{ secrets.AC_PASSWORD }}"
@@ -29,4 +29,4 @@ Eto.Forms provides msbuild targets that will automatically code sign and notariz
2929
dotnet build -c Release MyProject.Mac/MyProject.Mac.csproj
3030
```
3131

32-
Note that notarization can take a while to get results for stapling the .dmg. If your app is not stapled it will still run on users machines when connected to the internet. You can disable stapling by setting the `EnableNotarizationStapler` property. E.g. `<EnableNotarizationStapler>False</EnableNotarizationStapler>`
32+
Note that notarization can take a while to get results for stapling the .dmg. If your app is not stapled it will still run on users machines when connected to the internet. You can disable stapling by setting the `EnableNotarizationStapler` property. E.g. `<EnableNotarizationStapler>False</EnableNotarizationStapler>`

docs/docs/Publishing-your-app.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,63 @@
1+
# Publishing Your Eto.Forms Application
2+
13
Publishing your app can be quite different depending on the OS you're publishing to.
24

35
## Publish for Windows
6+
47
Simply compile your Wpf or Winforms project in the IDE of your choice, or compile it with `dotnet build` from the command line.
58

6-
Compiling for Windows can **only** be done from Windows. Mac and Linux are unable to compile Wpf / Winform projects.
9+
To compile WPF and WinForms on Mac or Linux, you can add `<EnableWindowsTargeting>true</EnableWindowsTargeting>` to your project properties.
10+
11+
To distribute your application to users, an MSI or MSIX installer is the usual mechanism. You can follow [Microsoft's guide](https://learn.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-packaging-dot-net) on how to set that up.
712

813
## Publish for Linux
14+
915
Simply compile your Gtk project in the IDE of your choice, or compile it with `dotnet build` from the command line.
1016
Please keep the following notes in mind:
17+
1118
- If you compile from Windows, due to NTFS not supporting executable file bits, users will first have to mark the application as executable. This can either be done via a command line with `chmod +x MyApp.Gtk`, or by **right-clicking -> Properties -> Permissions -> Mark as executable**.
19+
1220
- On distros using GNOME as their DE (Ubuntu, Fedora etc.) your icon will not be displayed unless you provide a .desktop file along with it. For details on how to write one, consult the following documentation pages:
13-
- https://specifications.freedesktop.org/desktop-entry-spec/latest/
14-
- https://wiki.archlinux.org/title/Desktop_entries
15-
- https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles
21+
- <https://specifications.freedesktop.org/desktop-entry-spec/latest/>
22+
- <https://wiki.archlinux.org/title/Desktop_entries>
23+
- <https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles>
24+
1625
- Users will have to install dependencies to run your program first. This includes: [the .NET Core runtime version of the project you're using](https://docs.microsoft.com/en-us/dotnet/core/install/linux) **or** mono if you're using .NET Framework, `gtk3`, `webkitgtk`, `openssl`, `icu` and `libappindicator`. The latter 5 should be preinstalled on most distros, but this isn't a guarantee.
1726
NOTE FOR DEBIAN USERS: Debian 11 "bullseye" removed `libappindicator` from their package repos, and their alternative `libayatana-appindicator` currently does not work with Eto. They can circumvent this by going [here](https://packages.debian.org/buster/amd64/libappindicator3-1/download) to either install `libappindicator` from there or follow the instructions listed there to add the "buster" repos to their package manager
27+
1828
- If you want to package the dependencies with your app, you have a few choices:
19-
- Create distro-specific packaging formats.
20-
- For .deb's (Debian and Ubuntu based) packages, you can consult this guide: https://www.internalpointers.com/post/build-binary-deb-package-practical-guide
29+
- Create distro-specific packaging formats.
30+
- For .deb's (Debian and Ubuntu based) packages, you can consult this guide: <https://www.internalpointers.com/post/build-binary-deb-package-practical-guide>
2131
Note that you likely need different .deb files for Debian and Ubuntu, due to them having different package names
22-
- For .rpm's (Red Hat based) packages, you can consult Red Hat's documentation: https://www.redhat.com/sysadmin/create-rpm-package
23-
- Create a universal packaging format:
24-
- For AppImage, a one file click-and-run distribution method, see their guides here: https://github.com/AppImage/AppImageKit/wiki/Bundling-.NET-Core-apps
25-
- For Flatpaks, a sandboxed environment for your application, install-able via a package manger, consult their guide here: https://docs.flatpak.org/en/latest/first-build.html
32+
- For .rpm's (Red Hat based) packages, you can consult Red Hat's documentation: https://www.redhat.com/sysadmin/create-rpm-package
33+
34+
- Create a universal packaging format:
35+
- For AppImage, a one file click-and-run distribution method, see their guides here: <https://github.com/AppImage/AppImageKit/wiki/Bundling-.NET-Core-apps>
36+
- For Flatpaks, a sandboxed environment for your application, install-able via a package manger, consult their guide here: <https://docs.flatpak.org/en/latest/first-build.html>
2637

2738
Note that on Linux it's preferred to not have duplicate dependencies. So while universal packaging formats with .NET Core bundled might be tempting, try to create distro-specific package formats that specify .NET Core as a dependency if it's possible. Unfortunately, this isn't always possible as some distos (Debian or Ubuntu for example) don't have it in their package repos.
2839

2940
## Publish for Mac
30-
Simply compile your Mac project in the IDE of your choice, or compile it with `dotnet build` from the command line.
31-
If you use a Xamarin.Mac or a `Eto.Platforms.macOS` project, it can only be compiled from MacOS.
3241

33-
It is worth noting, that for a `Eto.Platforms.macOS` project you need to ensure the following:
42+
Simply compile your Mac project in the IDE of your choice, or compile it with `dotnet build` from the command line.
43+
44+
For `Eto.Platform.Mac64` platform targets, see [Mac Code Signing and Notarization](./Mac-Code-Signing-and-Notarization.md) page for more information on packaging your app for distribution, including codesigning, notarization, and bundling in a .dmg.
45+
46+
If you use a `Eto.Platforms.macOS` project, it can only be compiled (fully) from MacOS. It is worth noting that you need to ensure the following:
47+
3448
- That you have the macos dotnet workload installed. If you don't, you can install it via `dotnet workload install macos`.
3549
- That your project's output type is `Exe` and not `WinExe` as it otherwise won't compile
3650
- That your project's TFM has a `-macos` suffix (i.e. `net6.0-macos`)
3751
- That your RID is set to `osx-x64;osx-arm64` if you want to support both Intel and M1 Macs
3852
- That your project's `csproj` contains a `SupportedOSPlatformVersion` attribute, which should be set to the same version as the `LSMinimumSystemVersion` attribute in your `plist` file.
3953

4054
If you compile from Windows, due to NTFS not supporting executable file bits, users will first have to mark the application as executable. This can either be done via a command line with:
55+
4156
```sh
4257
chmod +x MyApplication.Desktop.app/Contents/MacOS/MyApplication.Desktop
4358
xattr -c MyApplication.Desktop.app
44-
4559
```
4660

47-
In order to distribute your apps to run on the Mac they should be [code signed and notarized](https://developer.apple.com/developer-id/). Details on how to do that via command line are [here for code signing](https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW2) and [here for notarization](https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow). See [#Mac-Code-Signing-and-Notarization](https://github.com/picoe/Eto/wiki/Mac-Code-Signing-and-Notarization) page for more information.
61+
In order to distribute your apps to run on the Mac they should be [code signed and notarized](https://developer.apple.com/developer-id/). Details on how to do that via command line are [here for code signing](https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW2) and [here for notarization](https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow).
4862

4963
You should also package your app in a .dmg or .pkg for distribution. [This site](https://www.recitalsoftware.com/blogs/148-howto-build-a-dmg-file-from-the-command-line-on-mac-os-x) has some good details on how to do that.
50-
51-
For Mac64 targets, it's recommended to publish your app as a [self-contained](https://docs.microsoft.com/en-us/dotnet/core/deploying/#publish-self-contained) application if you intend to have M1 support.
52-
For unified builds, [single-file](https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file/overview) deployment is needed as well.
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
1+
# Running Your Application
2+
13
To run your application, you will need to include one or more of the platform nuget packages in your executable project.
24

35
**For Windows:**
6+
47
- [Eto.Platform.Wpf](https://www.nuget.org/packages/Eto.Platform.Wpf/): for Windows Presentation Foundation (recommended)
58
- [Eto.Platform.Windows](https://www.nuget.org/packages/Eto.Platform.Windows/): for Windows Forms
69

710
**For Linux / Unix:**
11+
812
- [Eto.Platform.Gtk](https://www.nuget.org/packages/Eto.Platform.Gtk/): for Gtk 3.14+ and includes Gtk# assemblies as nuget dependencies (recommended)
913
- [Eto.Platform.Gtk2](https://www.nuget.org/packages/Eto.Platform.Gtk2/): for Gtk# 2.12, and requires gtk-sharp2
1014
- [Eto.Platform.Gtk3](https://www.nuget.org/packages/Eto.Platform.Gtk3/): for Gtk# 3.0 and requires gtk-sharp3
1115

12-
**For macOS:**
16+
**For macOS:**
1317

1418
- [Eto.Platform.Mac64](https://www.nuget.org/packages/Eto.Platform.Mac64/): 64-bit via MonoMac (recommended)
15-
- [Eto.Platform.XamMac2](https://www.nuget.org/packages/Eto.Platform.XamMac2/): For Xamarin.Mac unified mobile or full projects (recommended)
19+
- [Eto.Platform.macOS](https://www.nuget.org/packages/Eto.Platform.macOS/): using .NET Core's macos workload (recommended)
1620

17-
The Eto.Platform.Mac64 nuget package will create an .app bundle (or folder) in the project output directory, even when built on non-mac platforms. In release builds it will bundle mono or .NET Core, which you can override using `<MacBundleMono>` or `<MacBundleDotNet>` properties in your .csproj, which allows the application to run without installing any dependencies. Note that if you build on Windows then copy to macOS you need to perform the following steps after copying:
21+
The `Eto.Platform.Mac64` platform target will create an .app bundle (or folder) in the project output directory, even when built on non-mac platforms. In release builds it will bundle the .NET Core runtime, which you can override using `<MacBundleDotNet>` property in your .csproj, which allows the application to run without installing any dependencies. Note that if you build on Windows then copy to macOS you need to perform the following steps after copying:
1822

1923
```bash
2024
> chmod +x YourApp.app/Contents/MacOS/YourApp # set the executable bit
2125
> xattr -c YourApp.app # Clear the extended attributes of the .app
2226
```
2327

24-
If you use a [Xamarin.Mac](http://xamarin.com) project, it automatically bundles the mono framework inside the .app as well. However, it can only be built on a Mac using VS for Mac. This is required if you want your app to be published on the Mac App Store.
28+
The `Eto.Platform.macOS` platform target will also automatically bundle the .NET Core runtime inside the .app. However, it can only be built on a Mac.
29+
30+
## Next Steps
2531

26-
To distribute your app for macOS (even without publishing to the App Store), you need to code sign and notarize your application, otherwise your users will need to execute the `xattr -c` command above on macOS Catalina 10.15 or later.
32+
After building and testing your application, you can follow the [Publishing Your Application](./Publishing-your-app.md) to learn how to distribute the application to users.

docs/docs/controls/PixelLayout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The Pixel Layout provides a way to position your controls based on pixel co-ordinates.
44

5-
*Note*: Using the pixel layout to position standard controls is highly discouraged, as each control may be different sizes based on the platform. It is highly recommended to use the [[TableLayout]] or [[DynamicLayout]] when using standard controls, as they will auto fit to the size of each control.
5+
*Note*: Using the pixel layout to position standard controls is highly discouraged, as each control may be different sizes based on the platform. It is highly recommended to use the [TableLayout](TableLayout.md) or [DynamicLayout](DynamicLayout.md) when using standard controls, as they will auto fit to the size of each control.
66

77
```c#
88
using Eto.Forms;

0 commit comments

Comments
 (0)