-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add basic cross-compile code #246
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
Conversation
The |
IIRC the pulled nexe binary is wrong. |
@@ -197,7 +215,7 @@ const buildDefaultExtensions = register("build:default-extensions", async (runne | |||
if (!fs.existsSync(defaultExtensionsPath)) { | |||
await copyForDefaultExtensions(); | |||
runner.cwd = extDirPath; | |||
const resp = await runner.execute(isWin ? "npx.cmd" : "npx", [isWin ? "gulp.cmd" : "gulp", "vscode-linux-x64", "--max-old-space-size=32384"]); | |||
const resp = await runner.execute(isWin ? "npx.cmd" : "npx", [isWin ? "gulp.cmd" : "gulp", `vscode-linux-${linuxArch}`, "--max-old-space-size=32384"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to target linux from any OS since it normally builds with electron. This might not be necessary.
@@ -64,7 +70,19 @@ const dependencyNexeBinary = register("dependency:nexe", async (runner) => { | |||
if (!fs.existsSync(upxBinary)) { | |||
fse.mkdirpSync(upxFolder); | |||
runner.cwd = upxFolder; | |||
const upxExtract = await runner.execute("bash", ["-c", "curl -L https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz | tar xJ --strip-components=1"]); | |||
var upxArch = ""; | |||
if ("ia32" === linuxArch) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switch (linuxArch) {
...
}
Might work better here.
This may have been solved by moving to nbin. If not I imagine this will need a few changes(or moved entirely to nbin.) |
Fixed by moving to |
Describe in detail the problem you had and how this PR fixes it
Build script now should be able to cross compile. I most likely missed some places.
The binary builds but I did not yet test functionality.
Is there an open issue you can link to?
#35
BTW this is my first real js contribution.