Skip to content

Commit

Permalink
make the app dmg thing work\!\!
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Aug 6, 2016
1 parent 7107fcc commit d6d4716
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 24 deletions.
Binary file modified assets/macdj-dmg-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/[email protected]
Binary file not shown.
20 changes: 7 additions & 13 deletions src/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,28 +97,22 @@ module.exports = function (grunt) {
}
},

appdmg: {
options: {
title: '<%= pkg.productName %> Installer',
icon: '../assets/macdj.icns',
"background": "../assets/macdj-dmg-background.png",
"contents": [
{ "x": 750, "y": 375, "type": "link", "path": "/Applications" },
{ "x": 170, "y": 375, "type": "file", "path": "../builds/MacDJ-darwin-x64/MacDJ.app" }
]
},
target: '../builds/MacDJ.dmg'
exec: {
appdmg: {
cmd: 'appdmg ./appdmg.json ../builds/MacDJ-darwin-x64/MacDJ.dmg'
}
}
});

// load plugins
grunt.loadNpmTasks('gruntify-eslint');
grunt.loadNpmTasks('grunt-exec');

// register tasks
grunt.registerTask('lint', ['eslint']);
grunt.registerTask('appdmg', ['appdmg']);
grunt.registerTask('appdmg', ['eslint', 'electron:osxBuild', 'exec:appdmg']);
grunt.registerTask('build-osx', ['eslint', 'electron:osxBuild']);
grunt.registerTask('build-win', ['eslint', 'electron:win32Build', 'electron:win64Build']);
grunt.registerTask('build-all', ['eslint', 'electron:osxBuild', 'electron:win32Build', 'electron:win64Build']);

};
};
10 changes: 2 additions & 8 deletions src/app/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ function MainController($scope, $sce) {

$scope.queue = {};

$scope.dfm = [];

function updateClient(event, client) {
$scope.client = client.user;
$scope.prefix = client.prefix;
Expand All @@ -44,14 +46,6 @@ function MainController($scope, $sce) {
applyJS();
}

fetch('https://temp.discord.fm/libraries/json').then(r => r.json())
.then(data => {
$scope.dfm = data;
console.log(data);
$scope.$apply();
})
.catch(e => $scope.dfm = []);

ipcRenderer.on('ready', updateClient);
ipcRenderer.on('update', updateClient);

Expand Down
9 changes: 9 additions & 0 deletions src/appdmg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"title": "MacDJ Installer",
"icon": "../assets/macdj.icns",
"background": "../assets/macdj-dmg-background.png",
"contents": [
{ "x": 486, "y": 285, "type": "link", "path": "/Applications" },
{ "x": 115, "y": 285, "type": "file", "path": "../builds/MacDJ-darwin-x64/MacDJ.app" }
]
}
6 changes: 3 additions & 3 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
"ytdl-core": "^0.7.17"
},
"devDependencies": {
"appdmg": "^0.4.5",
"electron-packager": "7.4.0",
"electron-prebuilt": "^1.3.1",
"grunt": "^1.0.1",
"grunt-electron": "^4.0.0",
"grunt-electron-installer": "^2.1.0",
"grunt-exec": "^1.0.0",
"gruntify-eslint": "^3.0.0",
"load-grunt-tasks": "^3.5.0"
},
"optionalDependencies": {
"grunt-appdmg": "^0.4.0"
}
}

0 comments on commit d6d4716

Please sign in to comment.