This is a iflix desktop application to create a webview.
To run this repository you'll need Node.js (which comes with npm) installed on your computer. From your command line:
# Install dependencies
$ npm install
# Run the app
$ npm start
"Electron Packager is a command line tool and Node.js library that bundles Electron-based application source code with a renamed Electron executable and supporting files into folders ready for distribution."
# for use in npm scripts
$ npm install electron-packager --save-dev
# for use from cli
$ npm install electron-packager -g
MacOS
$ electron-packager . --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds
Windows
$ electron-packager . --overwrite --asar=true --platform=win32 --arch=ia32 --icon=assets/icons/win/icon.ico --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName="iflix"
Linux (Ubuntu)
$ electron-packager . --overwrite --platform=linux --arch=x64 --icon=assets/icons/png/1024x1024.png --prune=true --out=release-builds
To make it easier to create new builds, scripts are added in package.json
.
Now you can run:
$ npm run package-mac
$ npm run package-win
$ npm run package-linux
To create a DMG installer for our Electron app we can use the electron-installer-dmg package.
To create a DMG installer you first need to package the app as we saw in the Application chapter above.
# For use in npm scripts
$ npm install electron-installer-dmg --save-dev
# For use from cli
$ npm install electron-installer-dmg -g
$ electron-installer-dmg ./release-builds/iFlix-darwin-x64/iFlix.app iflix --out=release-builds --overwrite --icon=assets/icons/mac/icon.icns
An iflix.dmg
file is now created in the release-builds
folder.
To make it easier to create new DMG installer, a script is added in package.json
.
Now you can run:
$ npm run create-installer-mac
Based on: