Skip to content

feat: allow custom priconfig#25

Open
Agritite wants to merge 3 commits into
electron-userland:mainfrom
Agritite:main
Open

feat: allow custom priconfig#25
Agritite wants to merge 3 commits into
electron-userland:mainfrom
Agritite:main

Conversation

@Agritite
Copy link
Copy Markdown

@Agritite Agritite commented Dec 9, 2025

Allow user-provided priconfig.xml just like appxmanifest.xml.

A default priconfig.xml generated by makepri createconfig simply exports every single file in the package, recursively. Also because <autoResourcePackage qualifier="Language"/> is set, makepri automatically creates resources.language-xx.pri for every language even when you don't use any language specific resources. This is most likely undesired, and users would instead want to provide their own priconfig.xml.

The new PackagingOptions parameters are designed to not affect current behavior. If you would prefer a different schema let me know.

One minor difference is that the original code path of makepri createconfig creates the config directly in the package directory, and thus will be packaged into the msix. In this implementation when users provide a custom priconfig.xml it will not be copied into the package directory. I'm not sure whether this is worth mentioning in README, or should add as an option, because you don't need to ship the priconfig.xml, only the resources.pri.

@bitdisaster
Copy link
Copy Markdown
Collaborator

This makes sense. Please

  • rebase on main
  • update unit tests to keep 100% coverage
  • add happy path E2E test

@Agritite
Copy link
Copy Markdown
Author

@bitdisaster tests are added

@Agritite
Copy link
Copy Markdown
Author

rebased and signed

@bitdisaster
Copy link
Copy Markdown
Collaborator

Thanks for the update! I would like to see the unit test coverage back to 100%.

image

@Agritite
Copy link
Copy Markdown
Author

Agritite commented Apr 24, 2026

@bitdisaster Strange, here on my Windows 11 it says 100% coverage. What is that environment?

 ✓  unit  test/unit/win-version.spec.ts (21 tests) 6ms
 ✓  unit  test/unit/powershell.spec.ts (3 tests) 5ms
 ✓  unit  test/unit/bin.spec.ts (15 tests) 13ms
 ✓  unit  test/unit/cert.spec.ts (3 tests) 12ms
 ✓  unit  test/unit/utils.spec.ts (83 tests) 32ms
 ✓  unit  test/unit/manifestation.spec.ts (17 tests) 49ms

 Test Files  6 passed (6)
      Tests  142 passed (142)
   Start at  15:24:35
   Duration  2.83s (transform 3.76s, setup 0ms, collect 8.20s, tests 116ms, environment 1ms, prepare 3.69s)

 % Coverage report from istanbul
------------------|---------|----------|---------|---------|-------------------
File              | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------------|---------|----------|---------|---------|-------------------
All files         |     100 |      100 |     100 |     100 |
 bin.ts           |     100 |      100 |     100 |     100 |
 cert.ts          |     100 |      100 |     100 |     100 |
 manifestation.ts |     100 |      100 |     100 |     100 |
 powershell.ts    |     100 |      100 |     100 |     100 |
 utils.ts         |     100 |      100 |     100 |     100 |
 win-version.ts   |     100 |      100 |     100 |     100 |
------------------|---------|----------|---------|---------|-------------------
Done in 11.14s

and Github Actions also says 100% coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants