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

25 Коммитов

Автор SHA1 Сообщение Дата
Paul Purifoy 31c0c05682
Enable elevation for PushNotifications (#3027)
* Working on it

* Investigating

* Revert testing stuff

* Update main.cpp

* Update main.cpp

* Update main.cpp

* Fix builds issue

* Update AppxManifest.xml

* Address comments

* Use call once

* Move to else clause

* Check return value

* Move function to common header

* Add description

* Check startup task call

* Update DeploymentManager.cpp

* Move platform activation to shared header

* Add error message if fake class activation succeeds

* Fix relative paths

* Update WindowsAppRuntime_MSIXInstallFromPath.vcxproj
2022-10-26 11:35:30 -07:00
sachintaMSFT 8c04941f55
Deployment Manager Repair API (#2954)
* Deployment Manager Repair API

Co-authored-by: Santosh Chintalapati <sachinta@ntdev.microsoft.com>
2022-09-22 20:15:55 -07:00
Howard Kapustein 4f3eabf1aa
Incorporate API Review feedback (#2957) 2022-09-12 14:46:05 -07:00
Kyaw Thant 3076f9cb22
Manual FI Main to Develop (#2949) 2022-09-08 17:17:27 -07:00
Eric Johnson 6c2be6d140
Excluding build artifacts from copyright check (#2864)
* Excluding build artifacts from copyright check

* Adding 'and Contributors' to copyright headers

* Updating some missed files and adding -help support to script

Co-authored-by: Eric Johnson <ejohn@microsoft.com>
2022-08-26 15:00:43 -07:00
Howard Kapustein 344d07b129
DeploymentManager auto-initializer (#2835)
* 40724739: DeploymentManagerAutoInitializer. Added auto-initializer, inspired by Bootstrapper's auto-initializer. Split test\Deployment into subdirs. Working through build-isms

Add an auto-initializer for DeploymentManager (very similar to the Bootstrapper's auto-initializer).

If DeploymentManager Initialize fails...
...Write to the eventlog

...Optionally
* DebugBreak
* DebugBreak if a debugger is attached to the process
* FailFast
* MessageBox (modeled after .NET's) asking if you'd like to install the WindowsAppRuntime and if so, ShellExecute(url) to the download page

The optional behavior is triggered by new `DeploymentInitializeOptions` properties or by environment variables
```
SET MICROSOFT_WINDOWSAPPRUNTIME_DEPLOYMENTMANAGER_INITIALIZE_DEBUGBREAK=1
SET MICROSOFT_WINDOWSAPPRUNTIME_DEPLOYMENTMANAGER_INITIALIZE_SHOWUI=1
SET MICROSOFT_WINDOWSAPPRUNTIME_DEPLOYMENTMANAGER_INITIALIZE_FAILFAST=1
```

Testing partial but incomplete as I need a real build (franken-hacking has been too messy to finish E2E testing). The DeploymentManager auto-initializer is inert/unused unless WindowsAppSdkDeploymentManagerInitialize=true and the default to enable that is commented out for now, making this PR functional but inert so I can get a build turned with real packages for further testing.

*.targets updated to provide build-time control.

* **To disable the auto-initializer** the auto-initialize set the property `WindowsAppSDKDeploymentManagerAutoInitialize`=`false`
* **If the auto-initalizer is enabled** you can define properties to control the options passed via `DeploymentInitializeOptions` to `DeploymentManager.Initialize()`
  * **WindowsAppSDKDeploymentManagerAutoInitializeOptions_Default=true** -- use the default options (OnError_ShowUI)
  * **WindowsAppSDKDeploymentManagerAutoInitializeOptions_None=true** -- use no options (None)
  * **WindowsAppSDKDeploymentManagerAutoInitializeOptions_*=true** -- enable the option where * is one or more of the following
    * OnError_DebugBreak
    * OnError_DebugBreak_IfDebuggerAttached
    * OnError_FailFast
    * OnError_ShowUI
    * OnNoPackageIdentity_NoOp

For example, to disable the auto-initializer add to your *proj file:

```xml
<PropertyGroup>
    <WindowsAppSDKDeploymentManagerAutoInitialize>false</WindowsAppSDKDeploymentManagerAutoInitialize>
</PropertyGroup>
```

or to enable the auto-initializer (default) but use the DebugBreak+FailFast options (instead of the default)

```xml
<PropertyGroup>
    <WindowsAppSDKDeploymentManagerAutoInitializeOptions_OnError_DebugBreak>true</WindowsAppSDKDeploymentManagerAutoInitializeOptions_OnError_DebugBreak>
    <WindowsAppSDKDeploymentManagerAutoInitializeOptions_OnError_ShowUI>true</WindowsAppSDKDeploymentManagerAutoInitializeOptions_OnError_ShowUI>
</PropertyGroup>
```

https://task.ms/40724739

* Added VerifyCopyrightHeaders.cmd and tweaked error message about it
2022-08-17 19:14:25 -07:00
Eric Johnson 5372c81a50
Find/replace of copyright header strings with CELA guidance (#2857)
* Find/replace of copyright header strings with CELA guidance

* Update the copyright script

Co-authored-by: Eric Johnson <ejohn@microsoft.com>
2022-08-16 13:24:48 -07:00
sachintaMSFT 1b7a14a916
User/sachinta/fix deployment manager telemetry (#2802)
* Fix DeploymentManager Initialize Activity's incorrect event name

* Fix DeploymentManager Initialize Activity lifetime

Co-authored-by: Santosh Chintalapati <sachinta@ntdev.microsoft.com>
2022-08-04 14:15:00 -07:00
sachintaMSFT dee3b240b1
User/sachinta/fix DeploymentManager's GetStatus (#2753)
* Return Extended Hresult instead of Hresult to help customers with a non-normalized error codes.

* Search for Main instead of Fw Package

* Add Comments

* Update AppLicensingTransport package version

Co-authored-by: Santosh Chintalapati <sachinta@ntdev.microsoft.com>
2022-07-29 09:05:49 -07:00
Eric Johnson e544ebcf13
Adding copyright headers to required files and enforcing requirement in build pipelines (#2765)
* Adding build step to verify copyright headers exist on required files

* Fixing yml dependencies

* Yml fix

* Fix yaml dependencies

* Another yml dependencies fix

* yml conditions need to be paired with dependson

* Fix comments for xaml files

* Adding copyright header to required files

* Removed detours changes and added exception

* Making VerifyCopyrightHeaders checks consistent

* Fix wrong build pool

Co-authored-by: Eric Johnson <ejohn@microsoft.com>
2022-07-25 08:16:00 -07:00
Howard Kapustein 8e96a74fbc
Installation with System-Account doesn't work #2546 (#2565)
* Installation with System-Account doesn't work #2546 
Co-authored-by: Santosh Chintalapati <sachinta@ntdev.microsoft.com>
2022-06-17 06:42:44 -07:00
sachintaMSFT d86b223274
Cherry-pick fix for break away process creation attribute from release/1.1-stable to main (#2588)
* Return Extended Hresult instead of Hresult to help customers by providing them with unbucketed error codes instead of bucketed error codes, in a best effort manner.

* Deployment agent break away process creation fixes (#2554)

* Create Breakaway process for DeplomentAgent.exe in Running state (not in suspended state)

* And remove Resume

* Don't inherent parent handles in breakaway process

* Create process outside desktop app runtime environment instead

* Don't return a copy but a reference to tracelogger activity class object

Co-authored-by: Santosh Chintalapati <sachinta@ntdev.microsoft.com>
2022-06-08 00:47:03 -07:00
Howard Kapustein fb67e0323f
Fixed DeploymentManager.Initialize() (#2551)
* Fixed bad sprintf

* Fixed DeploymentManager.Initialize() to use the Agent's exitcode

* Fixed type pickiness DWORD vs HRESULT
2022-05-25 15:03:44 -07:00
Howard Kapustein 091d8fd5ae
Bug 39711964: WinAppSDK: DeploymentManager doesn't handle ERROR_INSUFFICIENT_BUFFER (#2548)
* Bug 39711964: WinAppSDK: DeploymentManager doesn't handle ERROR_INSUFFICIENT_BUFFER

* Forgot to remove the original (bugged) line

* Fix Breakaway support

* Remove PROC_THREAD_ATTRIBUTE_HANDLE_LIST. The code was derived from AppLifecycleAgent but UpdateProcThread(PROC_THREAD_ATTRIBUTE_HANDLE_LIST, size=0, list=null) error'd. We don't actually need a list of handles (unlike AppLifecycleAgent was passing a list) so we can remove this attribute
2022-05-24 21:42:28 +00:00
Howard Kapustein 3d6544f4cb Yet Moar CorpII 2022-05-03 18:56:11 -07:00
sachintaMSFT fc472dace8
Log Installer events to disk (#2460)
* Log Installer events to disk (Application.evtx or Eventvwr.exe -> Windows Logs -> Application) in "WindowsAppRuntime Installer" source.

Co-authored-by: Santosh Chintalapati <sachinta@ntdev.microsoft.com>
2022-05-03 22:53:54 +00:00
sachintaMSFT 61618daf67
Deploy Main and Singleton in BreakAway process when Deployment API is called from MediumILHigherIL Non-Microsoft publisher package (#2454)
Create DeploymentAgent.exe and run it in a breakaway process from Deployment API when the caller is packaged process and has MediumIL/HigherIL integrity level.

Co-authored-by: Santosh Chintalapati <sachinta@ntdev.microsoft.com>
2022-05-03 07:04:59 -07:00
sachintaMSFT 03ddaa9091
Deployment API Telemetry & TraceLogging (#2364)
* DeploymentTelemetry

Co-authored-by: Santosh Chintalapati <sachinta@ntdev.microsoft.com>
2022-04-14 11:43:37 -07:00
sachintaMSFT bc7463bfd9
Add ForceDeploy option to Installer and to Deployment API via the new DeploymentInitializeOptions runtime class (#2279)
* Add DeploymentInitializeOptions runtime class to Deployment Interface and force command line option to WARInstaller

* Restart Push Notifications LRP after WindowsAppSDK MSIX packages are successfully installed with ForceDeployment
option

Co-authored-by: Santosh Chintalapati <sachinta@ntdev.microsoft.com>
2022-03-26 16:01:50 -07:00
Howard Kapustein 6df1822258
Merge/Port 1.0 license support into main/1.1 (#2012)
* Update installer to support both publishing IDs used in App SDK. (#1759)

* draft changes

* fixing typo

Co-authored-by: Ben Kuhn <benkuhn@ntdev.microsoft.com>

* Added MSIX license support (#1783)

* Update installer to support installing licenses. Structure in place, need to coordinate with build pipeline to implement InstallLicenses (instead of printf)

* Simplified help

* Added missing Copyright. Add valid license for inner-loop testing. Added --dry-run and other command line parameters (to expedite testing as well as product benefit). Wired up install flow. Next is testing the actual get-license-from-stream-and-install

* It works! Verified with stub NOP implementation here for dev inner-loop and full pipeline bits. Improved error reporting.

* Add license support to Deployment API and a new InstallLicenses API (#1790)

* Updated DeploymentManager to install license files if necessary

* Add stubs for the InstallLicenseFile() methods

* Change installer to install licenses BEFORE packages, for higher reliability

* Copy the license header to the source tree to use whehn building via the pipeline]

* Add Licensing API and export from Bootstrap'r

* Added some pseudocode in MsixInstallLicenses(). Real implementation coming RSN

* yml changes to pickup licensing package when needed.

* moving restore to the top of the pipeline.

* moving back, wrong stage

* Fixed license filename

* add nuget authenticate call

* differnt connection

* adding nuget config for build

* avoid using licensing support in github / PR builds, which don't have access to the resources

* update script to capture package version / name.

* one missed check

* Incorported feedback

* udpdating nuget.config name to avoid conflicts.

Co-authored-by: Ben Kuhn <benkuhn@ntdev.microsoft.com>

* Incorporated feedback

Co-authored-by: Ben Kuhn <bjk4929@yahoo.com>
Co-authored-by: Ben Kuhn <benkuhn@ntdev.microsoft.com>
2022-01-25 23:48:51 -08:00
Howard Kapustein fda84e39f8
Update to use new Main package Name MicrosoftCorporationII.WinAppRuntime.Main (#1742) 2021-11-06 07:52:53 +00:00
David Bennett c364e4886a
Fix for Singleton not having major.minor in the package name (#1511) 2021-10-04 13:36:28 -07:00
David Bennett 5ee9697ef3
Remove Experimental-ness from Deployment API (#1485)
Removes [experimental] attributes from the WindowsAppRuntime deployment API and sets the feature to being always available.
2021-09-24 16:48:32 +00:00
David Bennett 58d9275aee
Update Deployment API Implementation (#1483)
* Change Names and types for Deployment API
2021-09-24 10:53:52 +00:00
David Bennett bccd6963fb
Experimental Implementation of the WindowsAppRuntime Deployment API (#1375) 2021-09-08 04:39:53 +00:00