Page MenuHomePhabricator

[desktop] Include generated native windows notifs
ClosedPublic

Authored by michal on Mar 30 2023, 5:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 9:21 PM
Unknown Object (File)
Sat, Dec 7, 7:22 AM
Unknown Object (File)
Fri, Dec 6, 9:54 PM
Unknown Object (File)
Wed, Dec 4, 3:30 AM
Unknown Object (File)
Nov 15 2024, 5:08 PM
Unknown Object (File)
Nov 15 2024, 1:53 AM
Unknown Object (File)
Nov 10 2024, 8:36 PM
Unknown Object (File)
Nov 10 2024, 8:36 PM
Subscribers

Details

Summary

This module was generated with NodeRT which generates native node modules from Windows API definitions. It doesn't build yet, changes required for it to work will be included in the later diff. The module is ignored for now in the monorepo and isn't built when running yarn commands.

It was generated using the UI version of the NodeRT:

  • winMD file was Microsoft.WindowsAppSDK.1.2.221109.1/lib/uap10.0/Microsoft.Windows.PushNotifications.winmd, where Microsoft.WindowsAppSdk.1.2.21109.1 is a nuget package
  • in namespaces I selected microsoft.windows.notification
  • I unselected generate "Generate TypeScript" and "Build module"
Test Plan

Check if it doesn't break yarn install

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I just had a 1:1 with @michal and asked for detailed instructions for how to generate this diff:

  1. Get a Windows computer
  2. Clone the NodeRT repository
  3. Install Visual Studio 2022 Community Edition with C++ and C# Windows configurations
    • @michal is not entirely sure if this is right; he will check his Windows computer and update before landing
  4. Open the src/NodeRT.sln solution in the NodeRT repository with Visual Studio
  5. Debug the src/NodeRTUI/NodeRTUI.csproj project

The NodeRTUI project is a GUI for generating NodeRT bindings. It will prompt for some things, and @michal's note in the diff description should cover everything you need to do:

It was generated using the UI version of the NodeRT:

  • winMD file was Microsoft.WindowsAppSDK.1.2.221109.1/lib/uap10.0/Microsoft.Windows.PushNotifications.winmd, where Microsoft.WindowsAppSdk.1.2.21109.1 is a nuget package
  • in namespaces I selected microsoft.windows.notification
  • I unselected generate "Generate TypeScript" and "Build module"

Then you select a folder (desktop/addons/windows-pushnotifications) and it will generate an NPM package (package.json) with all of the changes in this diff.

Note that @michal made two small modifications:

  1. Adding eslint-disable to the top of main.js, so that our ESLint config wouldn't complain
  2. Updating forge.config.cjs to ignore addons (the new NPM package will be included as a dependency in desktop/package.json instead)
This revision is now accepted and ready to land.Mar 30 2023, 8:12 AM