-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from acidhax/feature/poop
Feature/refactor
- Loading branch information
Showing
19 changed files
with
630 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
node_modules/ | ||
node_modules/ | ||
build | ||
dist/ | ||
.DS_Store | ||
bin/ffmpeg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
var electron = require('electron-prebuilt'); | ||
var packagejson = require('./package.json'); | ||
var tail = process.platform; | ||
if (process.platform == 'darwin') { | ||
tail += "-x64"; | ||
} else { | ||
tail += "-ia32" | ||
} | ||
module.exports = function(grunt) { | ||
require('load-grunt-tasks')(grunt); | ||
|
||
var APP_NAME = "audio-cast"; | ||
var APP_VERSION = packagejson.version; | ||
|
||
grunt.initConfig({ | ||
copy: { | ||
dev: { | ||
files: [{ | ||
expand: true, | ||
cwd: '.', | ||
src: ['package.json'], | ||
dest: 'build/' | ||
}, { | ||
cwd: 'src/', | ||
expand: true, | ||
src: ['**/*.png'], | ||
dest: 'build' | ||
}, { | ||
expand: true, | ||
cwd: 'bin/', | ||
src: ['**/*'], | ||
dest: 'build/resources/bin/' | ||
}] | ||
}, | ||
depsWindows: { | ||
files: [{ | ||
expand: true, | ||
cwd: 'bin/', | ||
src: ['**/*'], | ||
dest: 'dist/' + APP_NAME + '-'+tail+'/resources/bin/' | ||
}] | ||
}, | ||
node_modules: { | ||
files: [{ | ||
cwd: 'node_modules/', | ||
src: Object.keys(packagejson.dependencies).map(function(dep) { | ||
return dep + '/**/*'; | ||
}), | ||
dest: 'build/node_modules/', | ||
expand: true | ||
}] | ||
}, | ||
release: { | ||
files: [{ | ||
cwd: 'node_modules/', | ||
src: Object.keys(packagejson.dependencies).map(function(dep) { | ||
return dep + '/**/*'; | ||
}), | ||
dest: 'dist/' + APP_NAME + '-'+tail+'/node_modules/', | ||
expand: true | ||
}, { | ||
expand: true, | ||
cwd: '.', | ||
src: ['package.json'], | ||
dest: 'dist/' + APP_NAME + '-'+tail+'/', | ||
}, { | ||
cwd: 'src/', | ||
expand: true, | ||
src: ['*.png'], | ||
dest: 'dist/' + APP_NAME + '-'+tail+'/', | ||
}] | ||
} | ||
}, | ||
babel: { | ||
options: { | ||
plugins: ['transform-minify-booleans', 'transform-property-literals', 'transform-simplify-comparison-operators', 'transform-merge-sibling-variables'], | ||
presets: ['es2015'], | ||
compact: false, | ||
comments: false | ||
}, | ||
build: { | ||
files: [{ | ||
expand: true, | ||
cwd: 'src/', | ||
src: ['**/*.js'], | ||
dest: 'build' | ||
}] | ||
}, | ||
dist: { | ||
files: [{ | ||
expand: true, | ||
cwd: 'src/', | ||
src: ['**/*.js'], | ||
dest: 'dist/' + APP_NAME + '-'+tail | ||
}] | ||
} | ||
}, | ||
shell: { | ||
electron: { | ||
command: electron + ' . ' + (grunt.option('dev') ? '--dev' : ''), | ||
options: { | ||
async: false, | ||
execOptions: { | ||
cwd: 'build' | ||
} | ||
} | ||
} | ||
}, | ||
clean: { | ||
build: ['build/'], | ||
release: ['dist/'] | ||
}, | ||
ffmpeg_libs: { | ||
options: { | ||
dir: 'bin/ffmpeg/' + process.platform, | ||
force: true, | ||
arch: (process.platform === 'win32') ? 'ia32' : 'x64', | ||
platform: (process.platform === 'win32') ? 'win' : 'osx' | ||
} | ||
}, | ||
electron: { | ||
windows: { | ||
options: { | ||
name: APP_NAME, | ||
dir: 'build/', | ||
out: 'dist', | ||
version: packagejson['optionalDependencies']['electron-prebuilt'], | ||
platform: process.platform, | ||
arch: process.platform == 'darwin' ? 'x64' : 'ia32', | ||
prune: true, | ||
asar: true | ||
} | ||
} | ||
}, | ||
compress: { | ||
windows: { | ||
options: { | ||
archive: './dist/' + APP_NAME + '-' + APP_VERSION + '-'+tail+'.zip', | ||
mode: 'zip' | ||
}, | ||
files: [{ | ||
expand: true, | ||
dot: true, | ||
cwd: './dist/' + APP_NAME + '-'+tail, | ||
src: '**/*' | ||
}] | ||
} | ||
} | ||
}); | ||
|
||
grunt.registerTask('default', ['babel', 'copy:dev', 'shell:electron']); | ||
|
||
grunt.registerTask('run', ['babel', 'shell:electron']); | ||
|
||
grunt.registerTask('deps', ['copy:node_modules']); | ||
|
||
// if (process.platform === 'win32') { | ||
grunt.registerTask('release', ['clean:release', 'electron:windows', 'babel:dist', 'copy:release', 'copy:depsWindows', 'compress:windows']); | ||
// } | ||
|
||
}; |
Binary file not shown.
0
audio_sniffer.dll → bin/driver/audio_sniffer.dll
100644 → 100755
File renamed without changes.
Binary file not shown.
Binary file not shown.
0
register_run_as_admin.bat → bin/driver/register_run_as_admin.bat
100644 → 100755
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.