diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..3a85738 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,26 @@ +notifications: + email: false +language: node_js +node_js: +- '4.1' +sudo: false +install: +- npm install +- npm install -g gulp bower +script: +- gulp +addons: + apt: + packages: + - wine +deploy: + provider: releases + api_key: + secure: FoiDMNJi5TpJEN1lcxaQ4o8P+p3KRv5W41A1Z7mvxmREsgEgZNzHGsEKssBJdchZOexFtQmQW5/KQBr2StgcYYThfyDs5et0G1xVUitRp5/WtJ40LZmvsA895aYOI5ZpyIeGKG1Xaa059kC5bAqgZNyhOaVRT+ulsNroYcgEM6qNU54D7K6bAy5WQKqIqVU6V8FdQxTp+6XHrvJBayY2vBROzSUch02dsI5+2PpWG+RHH6lT/WnDlmtaQwBO1UTNHn+WfJELbXcovY8SkmBuIjNnqkmAWhgcrOMJ1NGELV4L10kNyisx14M+kEsagIg7Le4qDp0nYuz1yKu8qjTfUdF4SCSvSDaCTTcC9IDRgCxpX9FrIgesDbzENQKggzXs/KHUgp1RBvuFQAOTrBX8/ThZ12pLnxDaVnfRgi1xjJzwKOHthu8ZorrcK9KVRZBdSsHqqrLJ6TUa+bjDUJQZn1NHkxFigpv718ki8ynL31qOxeeCjU6anJx+tGxVUWdfHR1SVvGrtaQ3ekXVV1IOVqAkLc8MdueLvZvDOwxniN/rW/HZQdbKEE+VZLT0vA8AJWs00tuJb/S0EJtFJ5lclNCsKToJmUKE3PW6I6EDH8ym4wzOorVBr4yW8Q3BUb5OJQipXs+V5ZfDdmf74INYpEKp9Lu1qA3T/YwmpJfnRFQ= + file: + - "release/v0.35.2/aof-replay-client-0.1.7-darwin-x64.zip" + - "release/v0.35.2/aof-replay-client-0.1.7-win32-ia32.zip" + - "release/v0.35.2/aof-replay-client-0.1.7-win32-x64.zip" + on: + tags: true + repo: AnalyzeOrFeed/aof-replay-client \ No newline at end of file diff --git a/package.json b/package.json index 4a301a8..e9191b1 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,13 @@ "scripts": { "postinstall": "npm install --prefix src", "start": "./node_modules/.bin/electron ./src", + "test": "", "build": "./node_modules/.bin/gulp" }, "author": "Analyze Or Feed", "license": "MIT", "devDependencies": { - "electron-prebuilt": "^0.34.3", + "electron-prebuilt": "^0.35.2", "gulp": "^3.9.0", "gulp-electron": "0.0.9", "gulp-util": "^3.0.7" diff --git a/src/app/js/controllers.js b/src/app/js/controllers.js index 7295023..8591b99 100644 --- a/src/app/js/controllers.js +++ b/src/app/js/controllers.js @@ -2,7 +2,7 @@ var app = angular.module('app.controllers', ['ngSanitize']); app.controller('MainController', ['$scope', '$rootScope', '$mdDialog', function($scope, $rootScope, $mdDialog) { - var ipc = require('ipc'); + var ipc = require("electron").ipcRenderer; var matchClientVersionToReplayVersion = function() { if ($scope.lolClientVersion && $scope.replay && $scope.replay.riotVersion) { @@ -106,23 +106,25 @@ app.controller('MainController', ['$scope', '$rootScope', '$mdDialog', ipc.send("play"); }; - ipc.on("loading", function(obj) { + ipc.on("loading", function(event, obj) { $scope.$apply(function() { $scope.loading = obj.loading; $scope.msg = obj.msg; }); }); - ipc.on("aofUpdate", function(obj) { + ipc.on("aofUpdate", function(event, obj) { $scope.$apply(function() { $scope.aofClientInfo = obj; }); }); - ipc.on("clientInfo", function(obj) { + ipc.on("clientInfo", function(event, obj) { + console.log(obj); $scope.$apply(function() { $scope.lolClientFound = obj.found; $scope.lolClientVersion = obj.version; + console.log($scope.lolClientVersion); var regex = $scope.lolClientVersion.match(/(?:.*?\s)(\d+)\.(\d+)\./); if (regex && regex.length == 3) { $scope.lolClientVersionShort = regex[1] + "." + regex[2]; @@ -131,14 +133,14 @@ app.controller('MainController', ['$scope', '$rootScope', '$mdDialog', }); }); - ipc.on("parsedReplayFile", function(obj) { + ipc.on("parsedReplayFile", function(event, obj) { $scope.$apply(function() { $scope.replay = obj; matchClientVersionToReplayVersion(); }); }); - ipc.on("error", function(obj) { + ipc.on("error", function(event, obj) { $scope.showDialog(obj.title, obj.content); }); diff --git a/src/index.js b/src/index.js index aa802d3..e44ed16 100644 --- a/src/index.js +++ b/src/index.js @@ -1,10 +1,10 @@ "use strict"; -let app = require("app"); +let app = require("electron").app; let request = require("request"); -let ipc = require("ipc"); -let dialog = require("dialog"); -let BrowserWindow = require("browser-window"); +let ipc = require("electron").ipcMain; +let dialog = require("electron").dialog; +let BrowserWindow = require("electron").BrowserWindow; let _ = require("underscore"); let fs = require("fs"); let winston = require("winston"); @@ -335,7 +335,7 @@ app.on("ready", function() { //mainWindow.openDevTools(); // Load the index.html of the app. - mainWindow.loadUrl("file://" + __dirname + "/index.html"); + mainWindow.loadURL("file://" + __dirname + "/index.html"); // When window is closed mainWindow.on("closed", function() { diff --git a/src/package.json b/src/package.json index 04c7ec7..aac66d9 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "aof-replay-client", - "version": "0.1.6", + "version": "0.1.7", "main": "./index.js", "scripts": { "start": "cd .. && npm start",