Skip to content

tommy-maulana/iflix-desktop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iflix Desktop App

This is a iflix desktop application to create a webview.

Download

Download

iflix Desktop App

Usage

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

"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."

Install Electron packager

# for use in npm scripts
$ npm install electron-packager --save-dev

# for use from cli
$ npm install electron-packager -g

Build MacOS, Windows and Linux package from the terminal

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

Shortcuts

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

Mac installer

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.

Install

# For use in npm scripts
$ npm install electron-installer-dmg --save-dev

# For use from cli
$ npm install electron-installer-dmg -g

Create the DMG

$ 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.

Shortcuts

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

Source

Based on:

License

MIT