-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New integrated build system #273
Merged
Changes from 18 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
20df8dc
Initial Commit of the new self-contained build system
techninja 5d317b6
Fix AppName typo
techninja 7806ac8
Mac sign app and point to correct icons
techninja 0ee489a
Remove categories debug output
techninja d1485b5
Remove menus by default
techninja 54b7984
Nix build for 32 bit linux as we won't have a compiled serialport
techninja d83a275
Move to cncserver without rebuild
techninja eb5c881
Add pebuilt serialport binaries for dev/release distribution
techninja 38fd3f9
WIP Serialport FIxer
techninja 4aa8edf
Complete post install serialport fixer upper
techninja 212ceb7
Add missing fs-finder
techninja ee47c74
Always use path.join for Win compat!
techninja 4919171
Normalize build JSON
techninja f37fc6a
Update readme, mac signing API update
techninja 57adb74
Complete dev readme updates
techninja 2db5edf
Add flatten packages for windows
techninja a1334e9
Flatten before windows build
techninja d9485e0
Fix incorrect windows install anim location
techninja 3ee7a72
Finalize fix for windows resources dir
techninja 837319e
Remove io.js mention
techninja 7b5591b
Change icon dir
docprofsky aeb1723
Force deb icon path
docprofsky 2e17a24
Correctly set app icon
docprofsky e8c5b3f
Merge pull request #274 from evil-mad/deb-desktop
docprofsky 1e2209f
RoboPaint shows up in Ubuntu dash
docprofsky c1048b4
Add a little more readme specificity
techninja febfce8
Get rid of useless resources from old build
techninja 623b2b6
64 bit linux build only
techninja 6cd8dd2
Fix maintainer in deb
docprofsky eb1176b
Move deb packager to optional dependencies, necessary for windows
docprofsky 1767bad
Add build support for Redhat RPM
techninja e179bdf
Add support for copying in the correct arch binaries for windows
techninja 631c3eb
Fix erroneous commands to delete and move files
docprofsky 0eaf56f
Correctly set icon for both Arch win builds
techninja File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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,182 @@ | ||
/** | ||
* @file RoboPaint Build gruntfile: provides basic configuration and build tasks | ||
* for creating distribution release files. | ||
*/ | ||
|
||
var path = require('path'); | ||
var fileURL = require('file-url'); | ||
|
||
module.exports = function(grunt) { | ||
// Load the plugins... | ||
grunt.loadNpmTasks('grunt-electron'); | ||
|
||
// Load all platform specific tasks: | ||
switch (process.platform) { | ||
case 'win32': | ||
grunt.loadNpmTasks('grunt-electron-installer'); | ||
break; | ||
|
||
case 'darwin': | ||
grunt.loadNpmTasks('grunt-appdmg'); | ||
break; | ||
|
||
default: | ||
grunt.loadNpmTasks('grunt-electron-installer-debian'); | ||
break; | ||
} | ||
|
||
// Load the tasks in 'tasks' dir. | ||
grunt.loadTasks('tasks'); | ||
|
||
// Set all subsequent paths to the relative to the root of the repo | ||
grunt.file.setBase(path.resolve('..')); | ||
|
||
var appInfo = grunt.file.readJSON('package.json'); | ||
var numericVersion = appInfo.version.split('-')[0]; | ||
|
||
// All paths/patterns to clean from dist build. | ||
var buildIgnore = [ | ||
'build/dist', | ||
'build/node_modules', | ||
'build/tasks', | ||
'build/package.json', | ||
'build/Gruntfile.js', | ||
'node_modules/electron-*', | ||
'node_modules/grunt*', | ||
].join('|'); | ||
|
||
// Build configuration: | ||
grunt.initConfig({ | ||
name: appInfo.name, | ||
pkg: appInfo, | ||
electron: { | ||
macbuild: { | ||
options: { | ||
name: appInfo.releaseInfo.appName, | ||
dir: './', | ||
out: 'build/dist', | ||
icon: 'build/resources/mac/app.icns', | ||
version: appInfo.electronVersion, | ||
platform: 'darwin', | ||
arch: 'x64', | ||
'osx-sign': { | ||
identity: 'Developer ID Application: Evil Mad Science LLC' | ||
}, | ||
ignore: buildIgnore, | ||
'app-version': appInfo.version, | ||
overwrite: true, | ||
prune: true, | ||
'app-bundle-id': appInfo.name + '-main', | ||
'helper-bundle-id': appInfo.name + '-helper', | ||
} | ||
}, | ||
winbuild: { | ||
options: { | ||
name: appInfo.releaseInfo.appName, | ||
dir: './', | ||
out: 'build/dist', | ||
icon: 'build/resources/win32/app.ico', | ||
version: appInfo.electronVersion, | ||
platform: 'win32', | ||
arch: 'x64,ia32', | ||
ignore: buildIgnore, | ||
'app-version': appInfo.version, | ||
overwrite: true, | ||
prune: true, | ||
'version-string': { | ||
CompanyName: appInfo.releaseInfo.company, | ||
LegalCopyright: appInfo.releaseInfo.copyright, | ||
FileDescription: appInfo.releaseInfo.appName, | ||
OriginalFilename: appInfo.releaseInfo.appName + '.exe', | ||
FileVersion: appInfo.electronVersion, | ||
ProductVersion: appInfo.version, | ||
ProductName: appInfo.releaseInfo.appName, | ||
InternalName: appInfo.name, | ||
}, | ||
} | ||
}, | ||
linbuild: { | ||
options: { | ||
name: appInfo.name, | ||
dir: './', | ||
out: 'build/dist', | ||
icon: 'build/resources/app.png', | ||
ignore: buildIgnore, | ||
version: appInfo.electronVersion, | ||
platform: 'linux', | ||
arch: 'x64,ia32', | ||
'app-version': appInfo.version, | ||
overwrite: true, | ||
prune: true | ||
} | ||
}, | ||
}, | ||
appdmg: { | ||
options: { | ||
basepath: 'build/dist/' + appInfo.name + '-darwin-x64', | ||
title: 'Install ' + appInfo.releaseInfo.appName, | ||
icon: '../../resources/mac/app.icns', | ||
background: '../../resources/mac/dmg_back.png', | ||
'icon-size': 80, | ||
contents: [ | ||
{x: 448, y: 344, type: 'link', path: '/Applications'}, | ||
{x: 192, y: 344, type: 'file', path: appInfo.releaseInfo.appName +'.app'} | ||
] | ||
}, | ||
target: { | ||
dest: | ||
'build/dist/' + | ||
appInfo.releaseInfo.appName + | ||
'_Mac_v' + appInfo.version + '.dmg' | ||
} | ||
}, | ||
'create-windows-installer': { | ||
64: { | ||
iconUrl: fileURL('build/resources/win32/app.ico'), | ||
appDirectory: 'build/dist/' + appInfo.releaseInfo.appName + '-win32-x64', | ||
outputDirectory: 'build/dist/winstall64/', | ||
loadingGif: 'build/resources/win32/install_anim.gif', | ||
version: numericVersion, | ||
authors: appInfo.releaseInfo.company, | ||
}, | ||
32: { | ||
iconUrl: fileURL('build/resources/win32/app.ico'), | ||
appDirectory: 'build/dist/' + appInfo.releaseInfo.appName + '-win32-ia32', | ||
outputDirectory: 'build/dist/winstall32/', | ||
loadingGif: 'build/resources/win32/install_anim.gif', | ||
version: numericVersion, | ||
authors: appInfo.releaseInfo.company, | ||
}, | ||
}, | ||
'electron-installer-debian': { | ||
options: { | ||
name: appInfo.name, | ||
productName: appInfo.releaseInfo.appName, | ||
description: appInfo.description, | ||
productDescription: appInfo.releaseInfo.description, | ||
genericName: 'Robot Controller', | ||
section: 'graphics', | ||
priority: 'optional', | ||
version: numericVersion, | ||
revision: appInfo.version.split('-')[1], | ||
categories: appInfo.releaseInfo.categories, | ||
lintianOverrides: [ | ||
'changelog-file-missing-in-native-package', | ||
'executable-not-elf-or-script', | ||
'extra-license-file' | ||
] | ||
}, | ||
|
||
linux64: { | ||
options: { | ||
arch: 'amd64' | ||
}, | ||
src: 'build/dist/' + appInfo.name + '-linux-x64', | ||
dest: 'build/dist/' | ||
} | ||
} | ||
}); | ||
|
||
// Default task(s). | ||
grunt.registerTask('default', ['pre-build']); | ||
}; |
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,5 @@ | ||
RoboPaint Builds | ||
=============== | ||
|
||
RoboPaint needs to support easy installs for users on all systems, so this | ||
folder is where the parts for that live, and where you go to build a release. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "robopaint-build", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
"author": { | ||
"name": "James Todd", | ||
"email": "[email protected]", | ||
"url": "http://evilmadscience.com" | ||
}, | ||
"homepage": "https://github.com/evil-mad/robopaint", | ||
"dependencies": { | ||
"file-url": "^1.1.0", | ||
"flatten-packages": "^0.1.4", | ||
"fs-plus": "2.x", | ||
"grunt": "^0.4.5", | ||
"grunt-cli": "~0.1.13", | ||
"grunt-electron": "4.0.0", | ||
"grunt-electron-installer-debian": "^0.3.0", | ||
"rcedit": "^0.3.0", | ||
"underscore-plus": "^1.6.6" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/PancakeBot/PancakePainter.git" | ||
}, | ||
"scripts": { | ||
"start": "node_modules/.bin/grunt build-current-os" | ||
}, | ||
"optionalDependencies": { | ||
"grunt-appdmg": "^0.3.1", | ||
"grunt-electron-installer": "^2.1.0" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,10 @@ | ||
[Desktop Entry] | ||
Name=<%= productName %> | ||
Comment=<%= description %> | ||
GenericName=<%= genericName %> | ||
Exec=<%= installDir %>/share/<%= name %>/<%= name %> %U | ||
Icon=<%= iconName %> | ||
Type=Application | ||
StartupNotify=true | ||
Categories=<%= categories %>; | ||
MimeType=text/plain; |
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,10 @@ | ||
Package: <%= name %> | ||
Version: <%= version %> | ||
Depends: gconf2, gconf-service, libgtk2.0-0, libudev0 | libudev1, libgcrypt11, libnotify4, libxtst6, libnss3, python, gvfs-bin, xdg-utils | ||
Suggests: libgnome-keyring0, gir1.2-gnomekeyring-1.0 | ||
Section: <%= section %> | ||
Priority: optional | ||
Architecture: <%= arch %> | ||
Installed-Size: <%= installedSize %> | ||
Maintainer: <%= maintainer %> | ||
Description: <%= description %> |
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,7 @@ | ||
atom: arch-dependent-file-in-usr-share | ||
atom: changelog-file-missing-in-native-package | ||
atom: copyright-file-contains-full-apache-2-license | ||
atom: copyright-should-refer-to-common-license-file-for-apache-2 | ||
atom: embedded-library | ||
atom: package-installs-python-bytecode | ||
atom: unstripped-binary-or-object |
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,51 @@ | ||
#!/bin/bash | ||
# mkdeb version control-file-path deb-file-path | ||
|
||
set -e | ||
|
||
SCRIPT=`readlink -f "$0"` | ||
ROOT=`readlink -f $(dirname $SCRIPT)/..` | ||
cd $ROOT | ||
|
||
VERSION="$1" | ||
ARCH="$2" | ||
CONTROL_FILE="$3" | ||
DESKTOP_FILE="$4" | ||
ICON_FILE="$5" | ||
DEB_PATH="$6" | ||
SHORT_NAME="$7" | ||
FILE_MODE=755 | ||
|
||
TARGET_ROOT="`mktemp -d`" | ||
chmod $FILE_MODE "$TARGET_ROOT" | ||
TARGET="$TARGET_ROOT/$SHORT_NAME-$VERSION-$ARCH" | ||
|
||
mkdir -m $FILE_MODE -p "$TARGET/usr" | ||
env INSTALL_PREFIX="$TARGET/usr" script/grunt install | ||
|
||
mkdir -m $FILE_MODE -p "$TARGET/DEBIAN" | ||
cp "$CONTROL_FILE" "$TARGET/DEBIAN/control" | ||
|
||
mkdir -m $FILE_MODE -p "$TARGET/usr/share/applications" | ||
cp "$DESKTOP_FILE" "$TARGET/usr/share/applications" | ||
|
||
mkdir -m $FILE_MODE -p "$TARGET/usr/share/pixmaps" | ||
cp "$ICON_FILE" "$TARGET/usr/share/pixmaps" | ||
|
||
# Copy generated LICENSE.md to /usr/share/doc/atom/copyright | ||
mkdir -m $FILE_MODE -p "$TARGET/usr/share/doc/$SHORT_NAME" | ||
cp "$TARGET/usr/share/$SHORT_NAME/LICENSE.md" "$TARGET/usr/share/doc/$SHORT_NAME/copyright" | ||
|
||
# Add lintian overrides | ||
mkdir -m $FILE_MODE -p "$TARGET/usr/share/lintian/overrides" | ||
cp "$ROOT/resources/linux/debian/lintian-overrides" "$TARGET/usr/share/lintian/overrides/$SHORT_NAME" | ||
|
||
# Symlink bin | ||
ln -s "/usr/share/$SHORT_NAME/$SHORT_NAME" "$TARGET/usr/bin/$SHORT_NAME" | ||
|
||
# Remove executable bit from .node files | ||
find "$TARGET" -type f -name "*.node" -exec chmod a-x {} \; | ||
|
||
fakeroot dpkg-deb -b "$TARGET" | ||
mv "$TARGET_ROOT/$SHORT_NAME-$VERSION-$ARCH.deb" "$DEB_PATH" | ||
rm -rf "$TARGET_ROOT" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove references to
io.js