Skip to content

Commit

Permalink
Merge pull request #79 from PancakeBot/1.2.0
Browse files Browse the repository at this point in the history
1.2.0 BETA Release
  • Loading branch information
techninja committed Jul 9, 2016
2 parents 10d3c03 + 7d35eb5 commit a54df62
Show file tree
Hide file tree
Showing 25 changed files with 9,991 additions and 263 deletions.
70 changes: 70 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"maxerr" : 50,

"bitwise" : true,
"camelcase" : true,
"curly" : false,
"eqeqeq" : true,
"forin" : false,
"freeze" : true,
"immed" : true,
"latedef" : "nofunc",
"newcap" : true,
"noarg" : true,
"noempty" : true,
"nonbsp" : true,
"nonew" : false,
"plusplus" : false,
"quotmark" : false,
"undef" : true,
"unused" : "strict",
"maxparams" : 5,
"maxdepth" : 4,
"maxstatements" : false,
"maxcomplexity" : false,
"maxlen" : 80,
"varstmt" : false,
"asi" : false,
"boss" : false,
"debug" : true,
"eqnull" : false,
"moz" : false,
"evil" : false,
"expr" : false,
"funcscope" : false,
"iterator" : false,
"lastsemic" : false,
"laxbreak" : false,
"laxcomma" : false,
"loopfunc" : false,
"multistr" : false,
"noyield" : false,
"notypeof" : false,
"proto" : false,
"scripturl" : false,
"shadow" : false,
"sub" : false,
"supernew" : false,
"validthis" : false,

"browser" : false,
"browserify" : false,
"couch" : false,
"devel" : true,
"dojo" : false,
"jasmine" : false,
"jquery" : false,
"mocha" : true,
"mootools" : false,
"node" : true,
"nonstandard" : false,
"phantom" : false,
"prototypejs" : false,
"qunit" : false,
"rhino" : false,
"shelljs" : false,
"typed" : false,
"worker" : false,
"wsh" : false,
"yui" : false
}
25 changes: 9 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,19 @@ environment setup to start hacking.

#### Node.js (4.x+) & npm
Required for automated builds and node module install. Electron uses Node.js
and npm to manage running and packages. See [nodejs.org](http://iojs.org) for
and npm to manage running and packages. See [nodejs.org](http://nodejs.org) for
installation for your operating system. `npm` is installed along with it. If you
already have node installed, you can probably go without upgrading as Electron
provides its own node.js implementation built in.

#### Electron (v0.30.x)
#### Install PancakePainter run resources
Though the `src/index.html` may somewhat render in a regular browser, you're
going to need to run it inside of Electron before it all works. After node
is installed, just run from your terminal/console
`npm install -g electron-prebuilt` to install Electron on your path. When
complete, just run `electron -v` to see the installed app version.
going to need to run it inside of Electron before it all works. To get the local
code running, be sure to run `npm install --force` from the repository root,
this will give you the third party resources needed to run. The `--force` is
unfortunately required to pass install of Paper.js as a node module, even
though we only use it as a clientside library, so we can ignore the
errors. See the tracking [issue here](https://github.com/paperjs/paper.js/issues/739).

#### Build Tools
Various node modules require builds and may complain if you don't have the right
Expand All @@ -115,21 +117,12 @@ anything new for this at all.
should run fine there. If there is call for support, it can be added (or submit
a Pull Request!)

#### Install PancakePainter run resources
To get the local code running, be sure to run `npm install --force` from the
repo root, this will give you the third party resources needed to run. The
`--force` is unfortunately required to pass install of Paper.js as a node
module, even though we only use it as a clientside library, so we can ignore the
errors. See the tracking [issue here](https://github.com/paperjs/paper.js/issues/739).

### Running from source
* Once Electron prebuilt is installed, just run `electron path/to/pancakepainter`,
or `electron ./` if you're working directory is the root of the repo.
* Once `npm install` has run, just run `npm start` from the repository root.
* Remember: Alt+Ctrl+I to open the debug console, Ctl+R will reload if the
console is open, and a reload _only_ reloads the contents of the window, and
will _**not**_ reload the application main process.


## ETC.
This open source project has been built with love by
[TechNinja](https://github.com/techninja), made possible though direct support
Expand Down
5 changes: 2 additions & 3 deletions build/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
var path = require('path');

module.exports = function(grunt) {
var electronVer = '0.36.5'; // Electron build version

// Load the plugins...
grunt.loadNpmTasks('grunt-electron');
if (process.platform === 'win32') grunt.loadNpmTasks('grunt-electron-installer');
Expand All @@ -16,8 +14,9 @@ module.exports = function(grunt) {

var appInfo = grunt.file.readJSON('package.json');
var version = appInfo.version;
var electronVer = appInfo.electronVersion; // Electron build version
var numericVersion = appInfo.version.split('-')[0];
var buildIgnore = 'build/dist|build/node_modules|build/tasks|build/package.json|build/Gruntfile.js';
var buildIgnore = 'build/dist|build/node_modules|build/tasks|build/package.json|build/Gruntfile.js|node_modules/electron-*|node_modules/grunt*';

// Project configuration.
grunt.initConfig({
Expand Down
4 changes: 2 additions & 2 deletions build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"fs-plus": "2.x",
"grunt": "~0.4.5",
"grunt-cli": "~0.1.13",
"grunt-electron": "2.x",
"grunt-electron": "4.0.0",
"rcedit": "^0.3.0",
"underscore-plus": "^1.6.6"
},
Expand All @@ -17,6 +17,6 @@
},
"optionalDependencies": {
"grunt-appdmg": "^0.3.1",
"grunt-electron-installer": "^1.0.8"
"grunt-electron-installer": "^2.1.0"
}
}
49 changes: 43 additions & 6 deletions locales/en-US/app-en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"creator": "techninja",
"target": "en-US",
"langname": "English",
"release": "0.6.0"
"release": "1.2.0"
},
"common": {
"done": "Done",
Expand Down Expand Up @@ -70,6 +70,7 @@
"title": "Export creation for printing…",
"start": "Export",
"wait": "Exporting, please wait…",
"err" : "Error exporting \"__file__\", please report this issue with the problem project file.",
"note" : "Successfully exported \"__file__\" for printing."
},
"settings": {
Expand All @@ -81,11 +82,37 @@
"button": {
"reset": "Revert All Settings"
},
"units": {
"milliseconds": {
"label": "ms",
"title": "milliseconds"
},
"seconds": {
"label": " sec",
"title": "second(s)"
},
"millimeters": {
"label": "mm",
"title": "millimeter(s)"
},
"percent": {
"label": "%",
"title": "percent"
},
"pixels": {
"label": " dv/px",
"title": "device pixels"
},
"degrees": {
"label": "°",
"title": "degrees"
}
},
"gcode": {
"title": "Print Export Options",
"botspeed": "Print Speed:",
"botspeedinfo": "The percent of the maximum speed that the PancakeBot will move at, defaults to 70%. If this has no effect on your PancakeBot you may need to install the new firmware available on PancakeBot.com. Increasing the speed of the PancakeBot may reduce its life span.",
"flatten": "Flatten resolution:",
"flatten": "Smallest flatten distance:",
"flatteninfo": "The resolution limit when converting curves into polygons for GCODE coordinates. Lower value creates more points and higher resolution, higher value creates fewer points and lower resolution approximation.",
"shutoff": "Line end pre-shutoff distance:",
"shutoffinfo": "The distance of travel before the end of a line that the pump should turn off ahead of, prevents line end drip increase. Larger distance means pump will shut off sooner.",
Expand All @@ -95,12 +122,22 @@
"endwaitinfo": "The number of milliseconds to wait at the end of a line. Pump should have already shutoff early, this should ensure a clean line end. Correct value depends on batter viscosity and pump pressure.",
"changewait": "Seconds between bottle/shade changes:",
"changewaitinfo": "Amount of time the bot will wait between shade/color changes. Bot will remain parked during this time to allow cooking or bottle change.",
"fillspacing": "Fill line spacing:",
"uselinefill": "Use diagonal line fill:",
"uselinefillinfo": "If enabled, PancakePainter will use the diagonal line fill algorithm when creating GCODE to fill shapes, instead of the default shape fill algorithm.",
"fillspacing": "Line fill spacing:",
"fillspacinginfo": "The amount of space between fill lines. Smaller values are closer together and more of them, larger values create fewer lines spaced further apart.",
"fillangle": "Fill angle (in degrees):",
"fillangle": "Line fill angle (in degrees):",
"fillangleinfo": "Angle of the automatic fill lines, defaults at 23, and be -180 to 180.",
"fillthresh": "Fill grouping threshold:",
"fillthreshinfo": "Minimum threshold for grouping dynamic line endings together into connected groups. Large value connects more groups, 0 will ensure no groups are made."
"fillthresh": "Line fill grouping threshold:",
"fillthreshinfo": "Minimum threshold for grouping dynamic line endings together into connected groups. Large value connects more groups, 0 will ensure no groups are made.",
"shapefillwidth": "Shape fill effective batter width:",
"shapefillwidthinfo": "Effective width of the batter line being drawn, iterated from the edge inwards on paths to be filled. Smaller values will make more lines when filling, adding more batter. Larger values will add fewer lines and less batter, and may leave some shapes unfilled or with holes in them.",
"botspeedcolor1": "Shade 1 speed (light):",
"botspeedcolor2": "Shade 2 speed (medium):",
"botspeedcolor3": "Shade 3 speed (medium dark):",
"botspeedcolor4": "Shade 4 speed (dark):",
"usecolorspeed": "Shade specific speed:",
"usecolorspeedinfo": "If enabled, set the shade specific speeds below to allow automatic setting of a different print speed after each shade change. Disable to use only the speed at the top of settings."
}
}
}
12 changes: 11 additions & 1 deletion locales/en-US/menus-en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"creator": "techninja",
"target": "en-US",
"langname": "English",
"release": "0.1.0"
"release": "1.2.0"
},
"file": {
"title": "&File",
Expand All @@ -15,6 +15,16 @@
"save": "&Save Project",
"saveas": "Save Project &as…"
},
"edit": {
"title": "Edit",
"undo": "&Undo",
"redo": "&Redo",
"cut": "C&ut",
"copy": "&Copy",
"paste": "&Paste",
"duplicate": "&Duplicate",
"selectall": "Select &All"
},
"view" : {
"settings": "Advanced Settings"
},
Expand Down
45 changes: 42 additions & 3 deletions menus/menu-darwin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/
"use strict";
module.exports = function applyTemplate() {
var remote = require('remote');
var app = remote.require('app');
var BrowserWindow = remote.require('browser-window');
var remote = require('electron').remote;
var app = remote.app;
var BrowserWindow = remote.BrowserWindow;
var path = require('path');
var packageData = require(path.join(app.getAppPath(), 'package.json'));
var appName = packageData.name;
Expand Down Expand Up @@ -96,6 +96,45 @@ module.exports = function applyTemplate() {
}
]
},
{
key: 'edit.title',
submenu: [
{
key: 'edit.undo',
accelerator: 'Command+z'
},
{
key: 'edit.redo',
accelerator: 'Command+Shift+z'
},
{
type: 'separator'
},
{
key: 'edit.cut',
accelerator: 'Command+x'
},
{
key: 'edit.copy',
accelerator: 'Command+c'
},
{
key: 'edit.paste',
accelerator: 'Command+v'
},
{
key: 'edit.duplicate',
accelerator: 'Command+d'
},
{
type: 'separator'
},
{
key: 'edit.selectall',
accelerator: 'Command+a'
}
]
},
{
label: 'View',
submenu: [
Expand Down
6 changes: 3 additions & 3 deletions menus/menu-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
**/
"use strict";
module.exports = function menuInit(app) {
var remote = require('remote');
var Menu = remote.require('menu');
var remote = require('electron').remote;
var Menu = remote.Menu;
var i18n = remote.require('i18next');
var _ = require('underscore');

Expand All @@ -31,7 +31,7 @@ module.exports = function menuInit(app) {
// Add generic click event only if not already bound
sub.click = function(e) {
app.menuClick(e.key);
}
};
}
}
});
Expand Down

0 comments on commit a54df62

Please sign in to comment.