Eel icon indicating copy to clipboard operation
Eel copied to clipboard

Pacakging Electron-Eel

Open 1277252850 opened this issue 6 years ago • 3 comments

My steps:

  1. Download source folder:08 - Eelectron-quick-start
  2. Enter the folder, and install dependencies:yarn install;(yarn command need: npm install yarn -g
  3. Add electron-builder devDependencies: yarn add electron-builder --dev
  4. Modify scripts in file package.json: "dist": "electron-builder --ia32"; (--ia32 can be ignored)
  5. Package Electron: yarn run dist;(Then generated folder./dist/win-ia32-unpacked, and the Eelectron-quick-start.exe file in win-ia32-unpacked is an Electron executable as browser container)
  6. Modify the options in file hello.py: 'args': ['win-ia32-unpacked/Eelectron-quick-start.exe', '.'];
  7. Install Python library Pyinstaller: pip install Pyinstaller;
  8. Package Eel: python -m eel hello.py web --onefile --noconsole; (Generated the single executable file hello.exe in dist folder)
  • The final generated files is a folder win-ia32-unpacked and a file hello.exe; (Both in the same folder)
  • The hello.exe is launcher of the project.
  • Eel as a server, Electron as a browser. Eel serve the web, and run the Electron; Electron access Eel server.
  • Disk usage: folder win-ia32-unpacked 127M; file hello.exe 27M; zip (win-ia32-unpacked and hello.exe) 82M.
  • Memory usage: Eelectron-quick-start.exe 42M; hello.exe 13M.

So, anyone else have a better idea about packaging the Electron-Eel?

1277252850 avatar Jun 29 '19 12:06 1277252850

Since the electron-builder provides packaging and distributing. I think electron-builder should be the step after pyinstaller.

ninyawee avatar Feb 14 '20 16:02 ninyawee

The 'options' looks deprecated cz it shows me error. So I used the following in my hello.py: eel.start ('index.html', mode='custom', cmdline-args='path/to/electron/exe/in/node_modules',['.']')

But how can I package the electron-eel app if i use this config?

Kamrulhasan12345 avatar Aug 22 '20 03:08 Kamrulhasan12345

The 'options' looks deprecated cz it shows me error. So I used the following in my hello.py: eel.start ('index.html', mode='custom', cmdline-args='path/to/electron/exe/in/node_modules',['.']')

But how can I package the electron-eel app if i use this config?

I was able to package it using python -m eel --add-data="main.js;." --add-data="node_modules;node_modules" --add-data="package-lock.json;." --add-data="package.json;." --noconfirm main.py web

but when I try use --onefile I get this error when executing the exe :v

image

lucdsouza avatar Dec 19 '22 00:12 lucdsouza