Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 3e13f66948
[dotnet] Add support for asking more of 'open' when launching desktop apps. (#18366)
* Add support for forwarding our debugging msbuild properties to their
  corresponding environment variables (the XamarinDebug* properties).
* Add support for passing --stdout/--stderr/--stdin to open to redirect
  to/from a file. This is particularly useful for debugging debugging.
* Add support for passing -a (to always create a new instance of the app).
  This is useful when debugging (when the developer would always want a new
  instance, instead of opening an existing instance).
* Also add support for any other argument using the 'OpenArguments' property.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1825427.
2023-05-30 17:55:31 +02:00
Rolf Bjarne Kvinge 3c7c4e7130
[dotnet] Generate the AutoImport.props file for each platform. (#15387)
This reduces some code duplication.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-07-12 10:00:35 +02:00
Rolf Bjarne Kvinge ab88892fd1
[dotnet] Update logic for default global namespaces and fix the templates. Fixes #12457. (#12471)
* Add 'ImplicitUsings=true' to all the templates.
* Make the implicit global namespaces C#-only.
* Add the implicit global namespaces to the 'Using' itemgroup instead of the
  'Import' itemgroup.
* Make sure the global namespaces are set from AutoImport.props, so that the
  user may remove any global namespace they don't want in their project file
  (by doing something like: `<Using Remove="Foundation" />`)

Ref: https://github.com/dotnet/sdk/issues/19521
Ref: https://github.com/dotnet/sdk/issues/19793

Fixes https://github.com/xamarin/xamarin-macios/issues/12457.
2021-08-19 07:47:03 +02:00
Rolf Bjarne Kvinge 3f3698253b [dotnet] Quote the path to the app when launching it. 2021-07-20 15:54:47 +02:00
Rolf Bjarne Kvinge fe1b2386bd
[dotnet] Fix launching macOS and Mac Catalyst apps with arguments. (#12019)
When we're using 'open' to launch apps, we need to use '--args ...' to pass any additional argument to the app, because otherwise 'open' will try to open those arguments as if they were files:

```
$ open "/Applications/Sublime Text.app" helloworld
The file /Users/rolf/test/helloworld does not exist.
```

(and doesn't launch Sublime Text).

while this works:

```
$ open "/Applications/Sublime Text.app" --args helloworld
```

in that it opens Sublime Text.

It's also possible to not append any other arguments, so this:

```
$ open "/Applications/Sublime Text.app" --args
```

while it looks weird, it works just fine.

Ref: https://github.com/dotnet/sdk/issues/18437
2021-06-25 16:53:13 +02:00
Yusuke Yamada 096c75f425
[dotnet] Normalize run target assembly path on the Run target for Mac Catalyst (#11994)
* [dotnet] Normalize run target assembly path on the Run target for Mac Catalyst

* Use TargetPath instead of OutputPath for resolving assembly output directory
2021-06-23 14:40:28 +02:00
Rolf Bjarne Kvinge c79f1d626c
[dotnet] Add a data/UnixFilePermissions.xml file to the sdk packs. Fixes #11860. (#11869)
NuGet doesn't support preserving the executable bit for files in *.nupkgs
(which are just zip files), so .NET implemented a [temporary
workaround](https://github.com/dotnet/sdk/pull/17299) for workload installs,
where they hardcoded files that should be executable.

This isn't really sustainable, and they'll remove their workaround, so we need
to use their supported method of specifying the file permissions: a
data/UnixFilePermissions.xml file.

Fixes https://github.com/xamarin/xamarin-macios/issues/11860.
2021-06-09 07:54:18 +02:00
Rolf Bjarne Kvinge 3a69beae53
[dotnet] Fix the Run target for Mac Catalyst to run the app directly instead of using mlaunch. (#10724) 2021-02-26 07:40:18 +01:00
Rolf Bjarne Kvinge f4ac99efc0
[dotnet] Build & publish MacCatalyst packs. (#10624)
* [dotnet] Build & publish MacCatalyst packs.

* Add runtime support.
2021-02-12 07:38:43 +01:00