Skip to content
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

Add basic cross-compile code #246

Closed
wants to merge 1 commit into from
Closed

Add basic cross-compile code #246

wants to merge 1 commit into from

Conversation

SuperSandro2000
Copy link
Contributor

@SuperSandro2000 SuperSandro2000 commented Mar 14, 2019

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.

@kylecarbs
Copy link
Member

The arm target still won't work with this, correct?

@SuperSandro2000
Copy link
Contributor Author

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"]);
Copy link
Member

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) {
Copy link
Member

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.

@NGTmeaty
Copy link
Contributor

This may have been solved by moving to nbin. If not I imagine this will need a few changes(or moved entirely to nbin.)

@kylecarbs
Copy link
Member

Fixed by moving to nbin 🎊

@kylecarbs kylecarbs closed this Apr 17, 2019
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.

3 participants