Permalink
Browse files

6.0.2.8 release

  • Loading branch information...
1 parent b1816f0 commit 41aeb49d17ea46bed443a06cd53a97fe92203e96 David Benson committed Jan 9, 2017
Showing 1,562 changed files with 754,997 additions and 413 deletions.
View
@@ -1,3 +1,9 @@
+09-JAN-2017: 6.0.2.8
+
+- Adds props plugin
+- Uses mxGraph 3.7.0.0 beta 12
+- Adds help button in print dialog
+
28-DEC-2016: 6.0.2.7
- Adds dialog for selecting pages in docs add-on
View
@@ -1 +1 @@
-6.0.2.7
+6.0.2.8
@@ -1340,9 +1340,9 @@ function mxGraphHandler(a){this.graph=a;this.graph.addMouseListener(this);this.p
mxGraphHandler.prototype.highlightEnabled=!0;mxGraphHandler.prototype.cloneEnabled=!0;mxGraphHandler.prototype.moveEnabled=!0;mxGraphHandler.prototype.guidesEnabled=!1;mxGraphHandler.prototype.guide=null;mxGraphHandler.prototype.currentDx=null;mxGraphHandler.prototype.currentDy=null;mxGraphHandler.prototype.updateCursor=!0;mxGraphHandler.prototype.selectEnabled=!0;mxGraphHandler.prototype.removeCellsFromParent=!0;mxGraphHandler.prototype.connectOnDrop=!1;mxGraphHandler.prototype.scrollOnMove=!0;
mxGraphHandler.prototype.minimumSize=6;mxGraphHandler.prototype.previewColor="black";mxGraphHandler.prototype.htmlPreview=!1;mxGraphHandler.prototype.shape=null;mxGraphHandler.prototype.scaleGrid=!1;mxGraphHandler.prototype.rotationEnabled=!0;mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandler.prototype.setEnabled=function(a){this.enabled=a};mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled};
mxGraphHandler.prototype.setCloneEnabled=function(a){this.cloneEnabled=a};mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled};mxGraphHandler.prototype.setMoveEnabled=function(a){this.moveEnabled=a};mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled};mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};
-mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};mxGraphHandler.prototype.getInitialCellForEvent=function(a){return a.getCell()};mxGraphHandler.prototype.isDelayedSelection=function(a,b){return this.graph.isCellSelected(a)};
+mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};mxGraphHandler.prototype.getInitialCellForEvent=function(a){return a.getCell()};mxGraphHandler.prototype.isDelayedSelection=function(a,b){return this.graph.isCellSelected(a)};mxGraphHandler.prototype.consumeMouseEvent=function(a,b){b.consume()};
mxGraphHandler.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()&&!mxEvent.isMultiTouchEvent(b.getEvent())){var c=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(c,b);this.cell=null;this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(c,b.getEvent());if(this.isMoveEnabled()){var d=this.graph.model,e=d.getGeometry(c);this.graph.isCellMovable(c)&&(!d.isEdge(c)||1<this.graph.getSelectionCount()||
-null!=e.points&&0<e.points.length||null==d.getTerminal(c,!0)||null==d.getTerminal(c,!1)||this.graph.allowDanglingEdges||this.graph.isCloneEvent(b.getEvent())&&this.graph.isCellsCloneable())?this.start(c,b.getX(),b.getY()):this.delayedSelection&&(this.cell=c);this.cellWasClicked=!0;b.consume()}}};
+null!=e.points&&0<e.points.length||null==d.getTerminal(c,!0)||null==d.getTerminal(c,!1)||this.graph.allowDanglingEdges||this.graph.isCloneEvent(b.getEvent())&&this.graph.isCellsCloneable())?this.start(c,b.getX(),b.getY()):this.delayedSelection&&(this.cell=c);this.cellWasClicked=!0;this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b)}}};
mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(a){return null!=this.graph.view.getState(a)&&b.isVertex(a)&&null!=b.getGeometry(a)&&!b.getGeometry(a).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
mxGraphHandler.prototype.getPreviewBounds=function(a){a=this.getBoundingBox(a);null!=a&&(a.width=Math.max(0,a.width-1),a.height=Math.max(0,a.height-1),a.width<this.minimumSize?(a.x-=(this.minimumSize-a.width)/2,a.width=this.minimumSize):(a.x=Math.round(a.x),a.width=Math.ceil(a.width)),a.height<this.minimumSize?(a.y-=(this.minimumSize-a.height)/2,a.height=this.minimumSize):(a.y=Math.round(a.y),a.height=Math.ceil(a.height)));return a};
mxGraphHandler.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.graph.view.getState(a[d]);if(null!=e){var f=e;c.isVertex(a[d])&&(null!=e.shape&&null!=e.shape.boundingBox)&&(f=e.shape.boundingBox);null==b?b=mxRectangle.fromRectangle(f):b.add(f)}}return b};
@@ -1353,10 +1353,11 @@ mxGraphHandler.prototype.roundLength=function(a){return Math.round(a)};
mxGraphHandler.prototype.mouseMove=function(a,b){var c=this.graph;if(!b.isConsumed()&&c.isMouseDown&&null!=this.cell&&null!=this.first&&null!=this.bounds)if(mxEvent.isMultiTouchEvent(b.getEvent()))this.reset();else{var d=this.getDelta(b),e=d.x,d=d.y,f=c.tolerance;if(null!=this.shape||Math.abs(e)>f||Math.abs(d)>f){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));null==this.shape&&(this.shape=this.createPreviewShape(this.bounds));var g=c.isGridEnabledEvent(b.getEvent()),
f=!0;if(null!=this.guide&&this.useGuidesForEvent(b))d=this.guide.move(this.bounds,new mxPoint(e,d),g),f=!1,e=d.x,d=d.y;else if(g)var k=c.getView().translate,l=c.getView().scale,g=this.bounds.x-(c.snap(this.bounds.x/l-k.x)+k.x)*l,k=this.bounds.y-(c.snap(this.bounds.y/l-k.y)+k.y)*l,d=this.snap(new mxPoint(e,d)),e=d.x-g,d=d.y-k;null!=this.guide&&f&&this.guide.hide();c.isConstrainedEvent(b.getEvent())&&(Math.abs(e)>Math.abs(d)?d=0:e=0);this.currentDx=e;this.currentDy=d;this.updatePreviewShape();f=null;
d=b.getCell();g=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled();c.isDropEnabled()&&this.highlightEnabled&&(f=c.getDropTarget(this.cells,b.getEvent(),d,g));e=c.getView().getState(f);k=!1;null!=e&&(c.model.getParent(this.cell)!=f||g)?(this.target!=f&&(this.target=f,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),k=!0):(this.target=null,this.connectOnDrop&&(null!=d&&1==this.cells.length&&c.getModel().isVertex(d)&&c.isCellConnectable(d))&&(e=c.getView().getState(d),null!=
-e&&(c=null==c.getEdgeValidationError(null,this.cell,d)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(c),k=!0)));null!=e&&k?this.highlight.highlight(e):this.highlight.hide()}this.updateHint(b);b.consume();mxEvent.consume(b.getEvent())}else if((this.isMoveEnabled()||this.isCloneEnabled())&&this.updateCursor&&!b.isConsumed()&&null!=b.getState()&&!c.isMouseDown)e=c.getCursorForMouseEvent(b),null==e&&(c.isEnabled()&&c.isCellMovable(b.getCell()))&&(e=c.getModel().isEdge(b.getCell())?
-mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!=b.sourceState&&b.sourceState.setCursor(e)};mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx-this.graph.panDx),Math.round(this.pBounds.y+this.currentDy-this.graph.panDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())};mxGraphHandler.prototype.setHighlightColor=function(a){null!=this.highlight&&this.highlight.setHighlightColor(a)};
+e&&(c=null==c.getEdgeValidationError(null,this.cell,d)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(c),k=!0)));null!=e&&k?this.highlight.highlight(e):this.highlight.hide()}this.updateHint(b);this.consumeMouseEvent(mxEvent.MOUSE_MOVE,b);mxEvent.consume(b.getEvent())}else if((this.isMoveEnabled()||this.isCloneEnabled())&&this.updateCursor&&!b.isConsumed()&&null!=b.getState()&&!c.isMouseDown)e=c.getCursorForMouseEvent(b),null==e&&(c.isEnabled()&&c.isCellMovable(b.getCell()))&&
+(e=c.getModel().isEdge(b.getCell())?mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!=b.sourceState&&b.sourceState.setCursor(e)};mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx-this.graph.panDx),Math.round(this.pBounds.y+this.currentDy-this.graph.panDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())};
+mxGraphHandler.prototype.setHighlightColor=function(a){null!=this.highlight&&this.highlight.setHighlightColor(a)};
mxGraphHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()){var c=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var d=b.getCell();if(this.connectOnDrop&&null==this.target&&null!=d&&c.getModel().isVertex(d)&&c.isCellConnectable(d)&&c.isEdgeValid(null,this.cell,d))c.connectionHandler.connect(this.cell,d,b.getEvent());else{var d=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),e=c.getView().scale,f=this.roundLength(this.currentDx/
-e),e=this.roundLength(this.currentDy/e),g=this.target;c.isSplitEnabled()&&c.isSplitTarget(g,this.cells,b.getEvent())?c.splitEdge(g,this.cells,null,f,e):this.moveCells(this.cells,f,e,d,this.target,b.getEvent())}}else this.isSelectEnabled()&&(this.delayedSelection&&null!=this.cell)&&this.selectDelayed(b)}this.cellWasClicked&&b.consume();this.reset()};
+e),e=this.roundLength(this.currentDy/e),g=this.target;c.isSplitEnabled()&&c.isSplitTarget(g,this.cells,b.getEvent())?c.splitEdge(g,this.cells,null,f,e):this.moveCells(this.cells,f,e,d,this.target,b.getEvent())}}else this.isSelectEnabled()&&(this.delayedSelection&&null!=this.cell)&&this.selectDelayed(b)}this.cellWasClicked&&this.consumeMouseEvent(mxEvent.MOUSE_UP,b);this.reset()};
mxGraphHandler.prototype.selectDelayed=function(a){(!this.graph.isCellSelected(this.cell)||!this.graph.popupMenuHandler.isPopupTrigger(a))&&this.graph.selectCellForEvent(this.cell,a.getEvent())};mxGraphHandler.prototype.reset=function(){this.destroyShapes();this.removeHint();this.delayedSelection=this.cellWasClicked=!1;this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null};
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)&&(a=this.graph.getView().getState(a),null!=a)){c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return!mxUtils.contains(a,c.x,c.y)}return!1};
mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));null==e&&(this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),a,f))&&(e=this.graph.getDefaultParent());a=this.graph.moveCells(a,b-this.graph.panDx/this.graph.view.scale,c-this.graph.panDy/this.graph.view.scale,d,e,f);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0]);d&&this.graph.setSelectionCells(a)};
@@ -0,0 +1 @@
+1.5:45d84b5f-d341-404a-91f2-6ab95c7e1a80
@@ -0,0 +1 @@
+45d84b5f-d341-404a-91f2-6ab95c7e1a80
@@ -0,0 +1 @@
+9e1a881e301c4ba7b3d69252ce260b0a
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA2tC60+Hjrw5PdaWOppSkF3gU03UngGZvtJfC7nA6Xd/ORF1S
+kImPL08dO/tHGg+mVNMn0QKrRE8epQqFYoEuGBRAFFMjd4thx7cIcRCiuQ982xPP
+X7NFuSh7tu+0mThl3wVQjOsH7aAE7xp9IQihqzYsRqza8qMSJMU5U8cdjkFlgPyG
+BRGLgGc8/RzhjVrchlPcKK+cNGn88sAl47FCqx4PAQ4TIdgmHZejlrkDQXXHlNzi
+SOwYrawafEX4XkQoQxi5J2AofFumk7rmv7wQsIxcSKSV0yaPYFIHfe3w6gbGBXIf
+sSeG5c3c0qvTPDFHHMGW21+CjTJQ48iCY+G9EwIDAQABAoIBAQC8YdNWszT38xQJ
+rxze4T1cTy9u1X/KlWY6TiWubcRyKUpFpSp98U/qZOxARZbzIuIKSTgQQ4H7bzps
+0GABbEGozVZVqTXxp3fpHvUPkkjlliXh3m48b/To8aeA2WHcP6fEl6i/iWDr/UYC
+LAXqOKom4p6/wfVFy4rFSV6Pd+9EFgWhk4cX0B4CCjNvOy5iqBr2Z8XPIiDspJgM
+T56xSfKK44sAfEMkubuhKcexvKnBs35IXiVvQhw25MqysBGcWzZ3ihJJzY7HqtOo
+tNGC0w7L8O2CvBFAmKR1o4zXiTgMEuUk5KJNWn6xcGAf/fGj3Mv9NoKs8nZJNjO9
+O4C+VaBBAoGBAPAQ0Z3At8a0ueMBs1Bb0/5lgx+4/M/oFq9Yv9y+cH0yLdTjRCnM
+bEzG9PpL2VddEReQi1s4+ooVzfv5fCHY+zUSAZbyUWA+e5XS/oXlgye/aMo/nRxN
+bNAvEFsVx2hX9fEy0o+V8GPvxPuE1KXJr4jYEdx6PsJDlM5Rdf9h8/exAoGBAOlW
+04/8AzVINtwA9D65sjfasY4iXbTYoMchxA3LWWsdNEJD3llO5t65ftKCzE8PAqyb
+AdrG6g4H1UFZpCshDbw7u3bM0ehxAv8Dr2adyKIXznj2yppqESpg+qncbjlFnju8
+wTudKtTUhI7er95a5J6P4mQu9YYYLOHmyCmUTrYDAoGBAO2Zt93KwBmLBfAH3tHK
+ESfYkM706ENeEhW6YSq50dwXrgTmarB0Azx6Lj0MlTBCjIgmJ8dBvbatnhGl+5YE
+i50bFTew3ZnEPc0r533eitDsQWrrSzSX7PqfmjCMfbBoXqM7CevTGvnOdcf6z/zG
+gVWPhR4SX8sl2EHbnk4FRNIBAoGASzBdT+JHLl4sv0vXaHbyBKmF2WUdiO7dMA2j
+XUaPc8KfWlMATQrtvgtL4I2hREBz/iacvGCofwjrIPm/ut4VzPf6eleZtCrmakJH
+vOtPAVxmffgYZRWUnnFNlHqhUfcq+9jg81K7wIUSie8cAKyNSsLWkq3HFASqQcjZ
+6vwNOP0CgYA4NfJMN9etcFxv/Up8xij2E1tYulaNKzeWnZKviHY/O19Upkt51h+l
+7xzsEnsL6/HnnjxN2jNbZGZXBNEpFejZM0jD8/QNC/NvFy95KYbYChyJM6MBtheq
+w0epX49viksxLTrIEKbnw7m5cFa08IesFuRxFEu/D61R1dF57kfTJg==
+-----END RSA PRIVATE KEY-----
@@ -0,0 +1 @@
+{"virtualbox":{"/opt/app":{"guestpath":"/opt/app","hostpath":"/Users/david/dev/drawio/etc/sandstorm/build","disabled":false,"__vagrantfile":true},"/host-dot-sandstorm":{"guestpath":"/host-dot-sandstorm","hostpath":"/Users/david/.sandstorm","disabled":false,"__vagrantfile":true}}}
@@ -0,0 +1,19 @@
+09-SEP-2016: 5.6.0.3
+
+- Updates to draw.io 5.6.0.3
+- Fixes Saving... status
+- Adds read-only permission option
+
+28-AUG-2015: 5.0.2.3
+
+- Updates to draw.io 5.0.2.3
+
+06-FEB-2015: 0.1.1.0
+
+- Fixes external image export (probably)
+- Fixes iconfinder calls (probably)
+- Updates draw to head
+
+02-FEB-2015: 0.1.0.0
+
+- Initial release
@@ -0,0 +1,23 @@
+CXX=g++
+CXXFLAGS=-O2 -Wall
+CXXFLAGS2=-std=c++1y -Itmp $(CXXFLAGS)
+SANDSTORM_CAPNP_DIR=/opt/sandstorm/latest/usr/include
+
+.PHONEY: all clean dev
+
+package.spk: server sandstorm-pkgdef.capnp
+ spk pack --keyring="drawio.key" package.spk
+
+dev: server sandstorm-pkgdef.capnp
+ spk dev
+
+clean:
+ rm -rf tmp server package.spk
+
+tmp/genfiles:
+ @mkdir -p tmp
+ capnp compile --src-prefix=$(SANDSTORM_CAPNP_DIR) -oc++:tmp $(SANDSTORM_CAPNP_DIR)/sandstorm/*.capnp
+ @touch tmp/genfiles
+
+server: tmp/genfiles server.c++
+ $(CXX) -static server.c++ tmp/sandstorm/*.capnp.c++ -o server $(CXXFLAGS2) `pkg-config capnp-rpc --cflags --libs`
@@ -0,0 +1,103 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# Guess at a reasonable name for the VM based on the folder vagrant-spk is
+# run from. The timestamp is there to avoid conflicts if you have multiple
+# folders with the same name.
+VM_NAME = File.basename(File.dirname(File.dirname(__FILE__))) + "_sandstorm_#{Time.now.utc.to_i}"
+
+# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+ # Base on the Sandstorm snapshots of the official Debian 8 (jessie) box.
+ config.vm.box = "sandstorm/debian-jessie64"
+
+ if Vagrant.has_plugin?("vagrant-vbguest") then
+ # vagrant-vbguest is a Vagrant plugin that upgrades
+ # the version of VirtualBox Guest Additions within each
+ # guest. If you have the vagrant-vbguest plugin, then it
+ # needs to know how to compile kernel modules, etc., and so
+ # we give it this hint about operating system type.
+ config.vm.guest = "debian"
+ end
+
+ # We forward port 6080, the Sandstorm web port, so that developers can
+ # visit their sandstorm app from their browser as local.sandstorm.io:6080
+ # (aka 127.0.0.1:6080).
+ config.vm.network :forwarded_port, guest: 6080, host: 6080
+
+ # Use a shell script to "provision" the box. This installs Sandstorm using
+ # the bundled installer.
+ config.vm.provision "shell", inline: "sudo bash /opt/app/.sandstorm/global-setup.sh", keep_color: true
+ # Then, do stack-specific and app-specific setup.
+ config.vm.provision "shell", inline: "sudo bash /opt/app/.sandstorm/setup.sh", keep_color: true
+
+ # Shared folders are configured per-provider since vboxsf can't handle >4096 open files,
+ # NFS requires privilege escalation every time you bring a VM up,
+ # and 9p is only available on libvirt.
+
+ # Calculate the number of CPUs and the amount of RAM the system has,
+ # in a platform-dependent way; further logic below.
+ cpus = nil
+ total_kB_ram = nil
+
+ host = RbConfig::CONFIG['host_os']
+ if host =~ /darwin/
+ cpus = `sysctl -n hw.ncpu`.to_i
+ total_kB_ram = `sysctl -n hw.memsize`.to_i / 1024
+ elsif host =~ /linux/
+ cpus = `nproc`.to_i
+ total_kB_ram = `grep MemTotal /proc/meminfo | awk '{print $2}'`.to_i
+ elsif host =~ /mingw/
+ # powershell may not be available on Windows XP and Vista, so wrap this in a rescue block
+ begin
+ cpus = `powershell -Command "(Get-WmiObject Win32_Processor -Property NumberOfLogicalProcessors | Select-Object -Property NumberOfLogicalProcessors | Measure-Object NumberOfLogicalProcessors -Sum).Sum"`.to_i
+ total_kB_ram = `powershell -Command "Get-CimInstance -class cim_physicalmemory | % $_.Capacity}"`.to_i / 1024
+ rescue
+ end
+ end
+ # Use the same number of CPUs within Vagrant as the system, with 1
+ # as a default.
+ #
+ # Use at least 512MB of RAM, and if the system has more than 2GB of
+ # RAM, use 1/4 of the system RAM. This seems a reasonable compromise
+ # between having the Vagrant guest operating system not run out of
+ # RAM entirely (which it basically would if we went much lower than
+ # 512MB) and also allowing it to use up a healthily large amount of
+ # RAM so it can run faster on systems that can afford it.
+ if cpus.nil? or cpus.zero?
+ cpus = 1
+ end
+ if total_kB_ram.nil? or total_kB_ram < 2048000
+ assign_ram_mb = 512
+ else
+ assign_ram_mb = (total_kB_ram / 1024 / 4)
+ end
+ # Actually apply these CPU/memory values to the providers.
+ config.vm.provider :virtualbox do |vb, override|
+ vb.cpus = cpus
+ vb.memory = assign_ram_mb
+ vb.name = VM_NAME
+ vb.customize ["modifyvm", :id, "--nictype1", "Am79C973"]
+
+ # /opt/app and /host-dot-sandstorm are used by vagrant-spk
+ override.vm.synced_folder "..", "/opt/app"
+ override.vm.synced_folder ENV["HOME"] + "/.sandstorm", "/host-dot-sandstorm"
+ # /vagrant is not used by vagrant-spk; we need this line so it gets disabled; if we removed the
+ # line, vagrant would automatically insert a synced folder in /vagrant, which is not what we want.
+ override.vm.synced_folder "..", "/vagrant", disabled: true
+ end
+ config.vm.provider :libvirt do |libvirt, override|
+ libvirt.cpus = cpus
+ libvirt.memory = assign_ram_mb
+ libvirt.default_prefix = VM_NAME
+
+ # /opt/app and /host-dot-sandstorm are used by vagrant-spk
+ override.vm.synced_folder "..", "/opt/app", type: "9p", accessmode: "passthrough"
+ override.vm.synced_folder ENV["HOME"] + "/.sandstorm", "/host-dot-sandstorm", type: "9p", accessmode: "passthrough"
+ # /vagrant is not used by vagrant-spk; we need this line so it gets disabled; if we removed the
+ # line, vagrant would automatically insert a synced folder in /vagrant, which is not what we want.
+ override.vm.synced_folder "..", "/vagrant", type: "9p", accessmode: "passthrough", disabled: true
+ end
+end
Oops, something went wrong.

0 comments on commit 41aeb49

Please sign in to comment.