Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ple-App into develop
  • Loading branch information
etx committed Apr 12, 2016
2 parents 601622a + 11c9387 commit d023ec4
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 49 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ www/plugins
cordova*.js
node_modules
cache
dist
build
build.nw
release
Expand Down
78 changes: 62 additions & 16 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ var electron = require('gulp-electron');
var elecRebuild = require('electron-rebuild');
var packageJson = require('./package.json');
var install = require("gulp-install");
var createInstaller = require('electron-installer-squirrel-windows');
var winInstaller = require('electron-windows-installer');



var electronVersion = 'v0.36.7';

var paths = {
sass: ['./www/sass/**/*.scss']
};
Expand Down Expand Up @@ -166,24 +168,16 @@ gulp.task('electron-copy', ['sass', 'scripts'], function() {

});

gulp.task('electron-installer', [], function(){
var opts = {
"path": "release/v0.36.7/win32-x64/",
"name": "CANBus Triple",
"description": "CANBus Triple Desktop app http://canb.us"
}
createInstaller(opts, function done (err){
if(err)
gutil.log('electron-installer', gutil.colors.red(err), err);
})
});


gulp.task('electron-install', [], function() {
gulp.src(['./electron-src/package.json'])
.pipe(install({production:true, ignoreScripts:true}));
});

gulp.task('electron-build', ['electron-copy'], function() {
gulp.task('electron-build', ['electron-build:osx', 'electron-build:linux', 'electron-build:win']);

gulp.task('electron-build:osx', ['electron-copy'], function() {

gulp.src("")
.pipe(electron({
Expand All @@ -192,17 +186,51 @@ gulp.task('electron-build', ['electron-copy'], function() {
release: './release',
cache: './cache',
asar: true,
version: 'v0.36.7',
version: electronVersion,
packaging: true,
platforms: [/*'win32-ia32',*/ 'win32-x64', 'darwin-x64', /*'linux-x64'*/],
platforms: ['darwin-x64', /*'linux-x64'*/],
platformResources: {
darwin: {
CFBundleDisplayName: packageJson.name,
CFBundleIdentifier: packageJson.name,
CFBundleName: packageJson.name,
CFBundleVersion: packageJson.version,
icon: 'build_assets/nw.icns'
},
}
}
}))
.pipe(gulp.dest(""));
});

gulp.task('electron-build:linux', ['electron-copy'], function() {
gulp.src("")
.pipe(electron({
src: './electron-src',
packageJson: packageJson,
release: './release',
cache: './cache',
asar: true,
version: electronVersion,
packaging: true,
platforms: ['linux-x64'],
platformResources: {}
}))
.pipe(gulp.dest(""));
});

gulp.task('electron-build:win', ['electron-copy'], function() {

gulp.src("")
.pipe(electron({
src: './electron-src',
packageJson: packageJson,
release: './release',
cache: './cache',
asar: true,
version: electronVersion,
packaging: true,
platforms: ['win32-x64'],
platformResources: {
win: {
"version-string": packageJson.version,
"file-version": packageJson.version,
Expand All @@ -213,3 +241,21 @@ gulp.task('electron-build', ['electron-copy'], function() {
}))
.pipe(gulp.dest(""));
});


gulp.task('create-windows-installer', function(done) {
winInstaller({
productName: 'CANBusTriple',
appDirectory: './release/'+electronVersion+'/win32-x64/',
outputDirectory: './dist',
arch: 'x64',
authors: 'CANBus Triple Community',
iconUrl: 'http://canb.us/favicon.ico',
setupIcon: 'build_assets/cbt.ico',
title: "CANBus Triple",
exe: "CANBusTriple.exe",
remoteReleases: 'https://github.com/CANBus-Triple/CANBus-Triple-App/releases/download/v0.3.1/RELEASES',
certificateFile: 'c:/Users/IEUser/Desktop/MyKey.pfx',
certificatePassword: 'pimp666'
}).then(done).catch(done);
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
"browser-sync": "^2.9.1",
"connect": "*",
"del": "^2.0.2",
"electron-installer-squirrel-windows": "^1.2.2",
"electron-builder": "^2.6.0",
"electron-prebuilt": "^0.36.7",
"electron-rebuild": "^1.1.2",
"electron-windows-installer": "^1.2.2",
"gulp": "^3.9.0",
"gulp-concat": "^2.6.0",
"gulp-electron": "0.0.9",
Expand Down
64 changes: 32 additions & 32 deletions www/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,38 @@ angular.module('cbt')
'use strict';


angular.module('cbt')
.controller('HomeController', function ($scope, $state, appVersion) {

$scope.version = appVersion;

$scope.items = [
{
name: 'Watch CAN Packets',
icon: 'ion-settings',
sref: 'logger',
},
{
name: 'Pipe CAN packets to Wireshark',
icon: 'ion-arrow-right-c',
sref: 'pipe',
},
{
name: 'Settings',
icon: 'ion-gear-b',
sref: 'settings',
},
];

$scope.listItemClick = function(n){
$state.go( $scope.items[n].sref );
}

});

'use strict';


angular.module('cbt')
.controller('HWStatusController', function ($rootScope, $scope, $state, $http, $interval, $timeout, $ionicModal, HardwareService) {

Expand Down Expand Up @@ -914,38 +946,6 @@ angular.module('cbt')
'use strict';


angular.module('cbt')
.controller('HomeController', function ($scope, $state, appVersion) {

$scope.version = appVersion;

$scope.items = [
{
name: 'Watch CAN Packets',
icon: 'ion-settings',
sref: 'logger',
},
{
name: 'Pipe CAN packets to Wireshark',
icon: 'ion-arrow-right-c',
sref: 'pipe',
},
{
name: 'Settings',
icon: 'ion-gear-b',
sref: 'settings',
},
];

$scope.listItemClick = function(n){
$state.go( $scope.items[n].sref );
}

});

'use strict';


angular.module('cbt')

.run(function($templateCache, MenuService){
Expand Down

0 comments on commit d023ec4

Please sign in to comment.