razer-macos
razer-macos copied to clipboard
Fix Complier for macOS 12.3+
- Fixes #558 using minimal changes
- Dedupes source-map-support (both v0.5.16 or v0.5.19 work, so I chose the former to minimize the change)
- Removes
"asar": true
as the default is true - Reduces universal app size thanks to the
mergesASARs
API in electron-universal and electron-builder
Explanation:
- The
mergeASARs
API was introduced in electron-universal v1.2.0 and electron-builder implemented it in v23.0.0 along with the fix for the removal of Python 2.7. This feature caused compiling to fail withCan't reconcile two non-macho files
. - After speaking to the creator of the
mergeASARs
API and reviewing various documentations, I discovered thatbuild
in"files": ...
overrode the default ignores for any files within it. Those files are unmergable. - According to the electron-builder documentation:
Default pattern
**/*
is not added to your custom if some of your patterns is not ignore (i.e. not starts with!
).package.json
and**/node_modules/**/*
(only production dependencies will be copied) is added to your custom in any case. All default ignores are added in any case — you don’t need to repeat it if you configure own patterns.
- Since the default includes all needed files, simply removing
"files": ...
fixes the error and prevents future ones.