Convert your website/blog into Linux Desktop Application Build using Electron
- Electron
- Electron Packager
- Electron Debian Installer
# Install Electrom
sudo npm install -g electron --unsafe-perm=true
# installer debian package
sudo npm install -g electron-installer-debian
# Install Electron Packager
sudo npm install electron-packager -g
- Clone this Respo
https://github.com/mskian/electron-example.git- Install dependencies
cd electron-exampleyarn- Build a Package for Linux
yarn package-linux- Build
.debPackage
yarn create-debian-installer- Add Icons on
assets/iconsDirectory - open
https://appiconmaker.coand Upload your ICON.Formatpng& size 512x512 - After Generating the ICONS download iOS icons zip file & Extract all the icons in
assets/icons(PS: Before Adding your Own ICONS Cleanup Default icons which already added for example APP) - Don't Rename the ICONS
- open
main.jsFile - Find the Below & Update your Blog/website URL
var weburl = 'https://task.santhoshveer.com';- Add Background Color Find this Line
backgroundColor: '#15171A',& Replace it with your Background Color code - Test your APP
electron --disable-gpu main.jsdebian.json=dest- Set the location for.debpackage Storage After the Package Buildpackage.json- Open it & replace it with your Name, Description and Version
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"package-linux": "electron-packager . electron-example --overwrite --platform=linux --arch=x64 --icon=assets/icons/Icon-1024.png --asar --prune=true --out=release-builds",
"create-debian-installer": "electron-installer-debian --src release-builds/electron-example-linux-x64/ --arch amd64 --config debian.json"
}electron-example- Replace with your APP Namerelease-builds/electron-example-linux-x64/- same Replaceelectron-examplewith your APP Name
Special thanks to Christian Engvall for this Awesome Tutorials
| # | Topic | Description |
|---|---|---|
| 01 | Hello world tutorial | Get electron running on your computer |
| 02 | Testing electron app on Ubuntu | Set up a VirtualBox virtual machine running Ubuntu and share app |
| 03 | Electron app icons | Adding icons to the app |
| 04 | Electron packager tutorial | Creating packages for mac, windows and linux |
| 05 | Electron menu | Adding a main menu to your Electron app |
| 06 | Electron asar | Packaging the app with asar |
| 07 | DMG Installer | Creating a DMG-installer for macOS |
| 08 | Windows installer | Creating a windows installer with electron-winstaller |
| 09 | Debian package installer | Create a debian package |
| 10 | Update to latest Electron version | Update electron to the latest version using npm |
MIT
