Skip to content

Commit

Permalink
package AriaNg Native in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mayswind committed Apr 1, 2017
1 parent ea961fc commit a39dac3
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .editorconfig
@@ -0,0 +1,22 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true


[*]

# change these settings to your own preference
indent_style = space
indent_size = 4

# we recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{package}.json]
indent_style = space
indent_size = 2
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "app"]
path = app
url = https://github.com/mayswind/AriaNg-DailyBuild.git
1 change: 1 addition & 0 deletions app
Submodule app added at a808c0
34 changes: 34 additions & 0 deletions app.js
@@ -0,0 +1,34 @@
const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const Menu = electron.Menu;
const Tray = electron.Tray;

var mainWindow = null;
var tray = null;

app.on('window-all-closed', function () {
if (process.platform !== 'darwin') {
app.quit();
}
});

app.on('ready', function () {
mainWindow = new BrowserWindow({
title: 'AriaNg',
width: 1000,
height: 600,
minWidth: 400,
minHeight: 400,
webPreferences: {
nodeIntegration: false
}
});

mainWindow.setMenu(null);
mainWindow.loadURL('file://' + __dirname + '/app/index.html');

mainWindow.on('closed', function () {
mainWindow = null;
});
});
Binary file added assets/AriaNg.ico
Binary file not shown.
54 changes: 54 additions & 0 deletions package.json
@@ -0,0 +1,54 @@
{
"private": true,
"engines": {
"node": ">=4"
},
"name": "ariang-native",
"version": "0.1.0",
"description": "AriaNg Native App",
"main": "app.js",
"scripts": {
"postinstall": "install-app-deps",
"clean": "rimraf dist",
"start": "electron .",
"publish:win": "npm run clean && build --ia32"
},
"repository": {
"type": "git",
"url": "git+https://github.com/mayswind/AriaNg-Native.git"
},
"keywords": [
"aria2",
"AriaNg",
"Native",
"Frontend"
],
"author": "MaysWind <i@mayswind.net>",
"license": "MIT",
"bugs": {
"url": "https://github.com/mayswind/AriaNg-Native/issues"
},
"homepage": "http://ariang.mayswind.net/",
"devDependencies": {
"del": "^2.2.2",
"electron": "^1.6.2",
"electron-builder": "^16.6.1",
"rimraf": "^2.6.1"
},
"dependencies": {},
"build": {
"appId": "net.mayswind.ariang",
"productName": "AriaNg",
"copyright": "Copyright (c) 2017 MaysWind (i@mayswind.net)",
"files": [
"app/**",
"assets/**",
"app.js",
"package.json"
],
"win": {
"icon": "assets/AriaNg.ico",
"target": "portable"
}
}
}

0 comments on commit a39dac3

Please sign in to comment.