Skip to content

IDE Development with arm64 Architecture on Apple M1 Machine #10728

@Alnyli07

Description

@Alnyli07

I have apple m1 machine, want to develop theia based desktop IDE.

Feature Description:

I have apple m1 machine, want to develop theia based desktop IDE.
I have tested Theia-blueprint IDE , gives (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')) error on ffmpeg.dylıb, drivelist.node ... vs build files.

I searched any document to develop with arm64 but could't find.

I reviewed theia/cli source code especially searched 'rebuild:electron' command. I found electron-rebuild command in https://github.com/eclipse-theia/theia/blob/master/dev-packages/application-manager/src/rebuild.ts#L218.

I added following two piece of code to rebuild.ts file

       //line 38 added "keytar" module to default modules.
       export const DEFAULT_MODULES = [
          'node-pty',
          'nsfw',
          'native-keymap',
          'find-git-repositories',
          'drivelist',
          'keytar'
      ];
       // line 218
        console.log("REBUILD ARCH: ", process.env.ARCH)
        if (process.env.ARCH) {
            command += ` --arch ${process.env.ARCH}`;
        }

Finally run again theia rebuild:electron then yarn start command in applicatios/electron folder.
ARCH=arm64 theia rebuild:electron
It worked properly.

How can contribute this to theia repo?

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS/Macissues related to Mac OSelectron-buildissues related to building electron

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions