Repository navigation
feat(desktop): package verified Cua Driver binaries #21697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
juliusmarminge
wants to merge
4
commits into
desktop-app-12/cua-desktop
from
desktop-app-12/cua-packaging
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f8720e4
feat(desktop): bundle verified Cua Driver releases
juliusmarminge 25cf838
perf(desktop): omit unused Cua SDK payloads
juliusmarminge 1706de2
fix(desktop): require tar for Windows Cua packaging
juliusmarminge 25852df
fix(desktop): bound Cua artifact downloads
juliusmarminge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| diff --git a/typescript/dist/resolve-lib.js b/typescript/dist/resolve-lib.js | ||
| index e8837bb2337c42eaffe15942923b8af39fca2b1a..b0806b7ebb9b4995ee6a318b66875a7ee9471219 100644 | ||
| --- a/typescript/dist/resolve-lib.js | ||
| +++ b/typescript/dist/resolve-lib.js | ||
| @@ -166,5 +166,16 @@ function resolveNpmPackage(crateName, callerUrl, npmPackageBase, tripleStyle) { | ||
| attempted: [binaryPath], | ||
| }); | ||
| } | ||
| - return binaryPath; | ||
| + return resolveUnpackedAsarPath(binaryPath); | ||
| +} | ||
| +// dlopen cannot read inside an Electron asar archive. Packagers move native | ||
| +// libraries to the archive's `.asar.unpacked` sibling, so load them from there. | ||
| +function resolveUnpackedAsarPath(binaryPath) { | ||
| + const segments = binaryPath.split(node_path_1.sep); | ||
| + const asarIndex = segments.findLastIndex((segment) => segment.endsWith(".asar")); | ||
| + if (asarIndex === -1) | ||
| + return binaryPath; | ||
| + segments[asarIndex] = `${segments[asarIndex]}.unpacked`; | ||
| + const unpackedPath = segments.join(node_path_1.sep); | ||
| + return (0, node_fs_1.existsSync)(unpackedPath) ? unpackedPath : binaryPath; | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.