mirror of https://github.com/apache/activemq.git
setting svn:eol-style
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/branches/activemq-4.1@475019 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d0eca5cd83
commit
26f74fb53d
|
@ -1,389 +1,389 @@
|
|||
/*----------------------------------------------------------------------------\
|
||||
| IE Canvas 1.0 |
|
||||
|-----------------------------------------------------------------------------|
|
||||
| Created by Emil A Eklund |
|
||||
| (http://eae.net/contact/emil) |
|
||||
|-----------------------------------------------------------------------------|
|
||||
| Implementation of the canvas API for Internet Explorer. Uses VML. |
|
||||
|-----------------------------------------------------------------------------|
|
||||
| Copyright (c) 2005 Emil A Eklund |
|
||||
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
|
||||
| This program is free software; you can redistribute it and/or modify it |
|
||||
| under the terms of the MIT License. |
|
||||
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
|
||||
| Permission is hereby granted, free of charge, to any person obtaining a |
|
||||
| copy of this software and associated documentation files (the "Software"), |
|
||||
| to deal in the Software without restriction, including without limitation |
|
||||
| the rights to use, copy, modify, merge, publish, distribute, sublicense, |
|
||||
| and/or sell copies of the Software, and to permit persons to whom the |
|
||||
| Software is furnished to do so, subject to the following conditions: |
|
||||
| The above copyright notice and this permission notice shall be included in |
|
||||
| all copies or substantial portions of the Software. |
|
||||
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
|
||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
||||
| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
||||
| DEALINGS IN THE SOFTWARE. |
|
||||
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
|
||||
| http://eae.net/license/mit |
|
||||
|-----------------------------------------------------------------------------|
|
||||
| Dependencies: canvas.js - For initialization of canvas elements |
|
||||
|-----------------------------------------------------------------------------|
|
||||
| 2005-12-27 | Work started. |
|
||||
| 2005-12-29 | First version posted. |
|
||||
| 2006-01-03 | Fixed bug in moveTo and lineTo, arguments where not converted |
|
||||
| | to int which could cause IE to enter an endless loop. Disabled |
|
||||
| | antalias for fillRect to better comply with the Mozilla, Opera |
|
||||
| | and possibly Safari implementations where using fillRect is |
|
||||
| | about the only way to raw non antialiased lines. |
|
||||
|-----------------------------------------------------------------------------|
|
||||
| Created 2005-12-27 | All changes are in the log above. | Updated 2006-01-03 |
|
||||
\----------------------------------------------------------------------------*/
|
||||
|
||||
<public:component>
|
||||
<public:method name="getContext" />
|
||||
<public:attach event="oncontentready" onevent="initCanvas()"/>
|
||||
</public:component>
|
||||
|
||||
<script language="JScript">
|
||||
|
||||
function getContext() {
|
||||
return element.context;
|
||||
}
|
||||
|
||||
function initCanvas() {
|
||||
element.context = new IECanvasContext();
|
||||
element.style.position = 'relative';
|
||||
element.style.display = 'block';
|
||||
element.style.overflow = 'hidden';
|
||||
}
|
||||
|
||||
|
||||
|
||||
function IECanvasContext() {
|
||||
this.fillStyle = 'black';
|
||||
this.globalAlpha = 1.0;
|
||||
this.globalCompositeOperation = '';
|
||||
this.lineCap = '';
|
||||
this.lineJoin = '';
|
||||
this.lineWidth = '0';
|
||||
this.miterLimit = '';
|
||||
this.shadowBlur = '';
|
||||
this.shadowColor = '';
|
||||
this.shadowOffsetX = '';
|
||||
this.shadowOffsetY = '';
|
||||
this.strokeStyle = 'black';
|
||||
this._path = '';
|
||||
this._stateStack = new Array();
|
||||
this._offsetX = 0;
|
||||
this._offsetY = 0;
|
||||
this._rotation = 0;
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.save = function() {
|
||||
var o;
|
||||
|
||||
o = new Object();
|
||||
this._copyState(this, o);
|
||||
this._stateStack.push(o);
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.restore = function() {
|
||||
var o, n;
|
||||
|
||||
n = this._stateStack.length - 1;
|
||||
if (n < 0) { return; }
|
||||
|
||||
o = this._stateStack[n];
|
||||
this._copyState(o, this);
|
||||
this._stateStack.splice(n, 1);
|
||||
};
|
||||
|
||||
IECanvasContext.prototype._copyState = function(oFrom, oTo) {
|
||||
oTo.fillStyle = oFrom.fillStyle;
|
||||
oTo.lineCap = oFrom.lineCap;
|
||||
oTo.lineJoin = oFrom.lineJoin;
|
||||
oTo.lineWidth = oFrom.lineWidth;
|
||||
oTo.miterLimit = oFrom.miterLimit;
|
||||
oTo.shadowBlur = oFrom.shadowBlur;
|
||||
oTo.shadowColor = oFrom.shadowColor;
|
||||
oTo.shadowOffsetX = oFrom.shadowOffsetX;
|
||||
oTo.shadowOffsetY = oFrom.shadowOffsetY;
|
||||
oTo._offsetX = oFrom._offsetX;
|
||||
oTo._offsetY = oFrom._offsetY;
|
||||
oTo._rotation = oFrom._rotation;
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.rotate = function(r) {
|
||||
var MAX = Math.PI * 2;
|
||||
|
||||
this._rotation += r;
|
||||
while (this._rotation > MAX) { this._rotation = MAX - this._rotation; }
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.scale = function() { };
|
||||
|
||||
IECanvasContext.prototype.translate = function(x, y) {
|
||||
this._offsetX += x;
|
||||
this._offsetY += y;
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {
|
||||
if (this._path) { this._path += ' '; }
|
||||
|
||||
this._path += 'qb' + cp1x + ',' + cp1y + ',' + cp2x + ',' + cp2y + ',' + x + ',' + y;
|
||||
};
|
||||
|
||||
|
||||
IECanvasContext.prototype.clip = function() { };
|
||||
|
||||
IECanvasContext.prototype.beginPath = function() {
|
||||
this._path = '';
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.closePath = function() {
|
||||
if (this._path) { this._path += ' '; }
|
||||
this._path += 'x';
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.lineTo = function(x, y) {
|
||||
if (this._path) { this._path += ' '; }
|
||||
this._path += 'l' + parseInt(x) + ',' + parseInt(y);
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.moveTo = function(x, y) {
|
||||
if (this._path) { this._path += ' '; }
|
||||
this._path += 'm' + parseInt(x) + ',' + parseInt(y);
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.stroke = function() {
|
||||
var o, s, cosa, sina, cx, cy, x, y;
|
||||
|
||||
if (!this._path) { return; }
|
||||
|
||||
this._path += ' e';
|
||||
|
||||
o = element.ownerDocument.createElement('v:shape');
|
||||
o.fillColor = 'none';
|
||||
o.filled = false;
|
||||
o.strokeColor = this.strokeStyle;
|
||||
o.stroked = true;
|
||||
o.weight = this.lineWidth;
|
||||
o.coordsize = element.offsetWidth + ',' + element.offsetHeight;
|
||||
o.style.position = 'absolute';
|
||||
o.style.left = this._offsetX;
|
||||
o.style.top = this._offsetY;
|
||||
o.style.width = element.offsetWidth;
|
||||
o.style.height = element.offsetHeight;
|
||||
o.path = this._path;
|
||||
|
||||
s = element.ownerDocument.createElement('v:stroke');
|
||||
s.opacity = this.globalAlpha;
|
||||
o.appendChild(s);
|
||||
|
||||
if (this._rotation) {
|
||||
r = element.ownerDocument.createElement('v:group');
|
||||
r.style.position = 'absolute';
|
||||
r.style.left = 0;
|
||||
r.style.top = 0;
|
||||
r.style.width = element.offsetWidth;
|
||||
r.style.height = element.offsetHeight;
|
||||
r.coordsize = o.coordsize;
|
||||
r.style.rotation = Math.round((this._rotation * 180) / Math.PI);
|
||||
r.style.rotationCenter = '0,0';
|
||||
r.appendChild(o);
|
||||
element.appendChild(r);
|
||||
|
||||
cosa = Math.cos(this._rotation);
|
||||
sina = Math.sin(this._rotation);
|
||||
cx = element.offsetWidth / 2;
|
||||
cy = element.offsetHeight / 2;
|
||||
|
||||
x = ( cx*(1-cosa) + cy*sina);
|
||||
y = (-cx*sina + cy*(1-cosa));
|
||||
|
||||
r.style.left = x * -1;
|
||||
r.style.top = y * -1;
|
||||
}
|
||||
else { element.appendChild(o); }
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.fill = function() {
|
||||
var o, f, r;
|
||||
|
||||
if (!this._path) { return; }
|
||||
|
||||
this._path += ' e';
|
||||
|
||||
o = element.ownerDocument.createElement('v:shape');
|
||||
o.fillColor = this.fillStyle;
|
||||
o.strokeColor = this.strokeStyle;
|
||||
o.stroked = false;
|
||||
o.weight = this.lineWidth;
|
||||
o.coordsize = element.offsetWidth + ',' + element.offsetHeight;
|
||||
o.style.position = 'absolute';
|
||||
o.style.left = this._offsetX;
|
||||
o.style.top = this._offsetY;
|
||||
o.style.width = element.offsetWidth;
|
||||
o.style.height = element.offsetHeight;
|
||||
o.path = this._path;
|
||||
|
||||
f = element.ownerDocument.createElement('v:fill');
|
||||
f.opacity = this.globalAlpha;
|
||||
o.appendChild(f);
|
||||
|
||||
if (this._rotation) {
|
||||
r = element.ownerDocument.createElement('v:group');
|
||||
r.style.position = 'absolute';
|
||||
r.style.left = 0;
|
||||
r.style.top = 0;
|
||||
r.style.width = element.offsetWidth;
|
||||
r.style.height = element.offsetHeight;
|
||||
r.coordsize = o.coordsize;
|
||||
r.style.rotation = Math.round((this._rotation * 180) / Math.PI);
|
||||
r.style.rotationCenter = '0,0';
|
||||
r.appendChild(o);
|
||||
element.appendChild(r);
|
||||
|
||||
cosa = Math.cos(this._rotation);
|
||||
sina = Math.sin(this._rotation);
|
||||
cx = (element.offsetWidth) / 2;
|
||||
cy = (element.offsetHeight) / 2;
|
||||
x = ( cx*(1-cosa) + cy*sina);
|
||||
y = (-cx*sina + cy*(1-cosa));
|
||||
|
||||
r.style.left = x * -1;
|
||||
r.style.top = y * -1;
|
||||
}
|
||||
else { element.appendChild(o); }
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.arcTo = function(x1, y1, x2, y2, radius) {
|
||||
// not implemented in gecko, not implemented here
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {
|
||||
if (this._path) { this._path += ' '; }
|
||||
|
||||
this._path += 'qb' + cpx + ',' + cpy + ',' + x + ',' + y;
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.arc = function(x, y, radius, startAngle, endAngle, clockwise) {
|
||||
var xi, yi, x1, y1, x2, y2, x3, y3, x4, y4;
|
||||
|
||||
if (this._path) { this._path += ' '; }
|
||||
|
||||
xi = parseFloat(x);
|
||||
yi = parseFloat(y);
|
||||
|
||||
x1 = xi - radius;
|
||||
y1 = yi - radius;
|
||||
|
||||
x2 = xi + radius;
|
||||
y2 = yi + radius;
|
||||
|
||||
if (clockwise) {
|
||||
x3 = xi + (Math.cos(startAngle) * radius);
|
||||
y3 = yi + (Math.sin(startAngle) * radius);
|
||||
|
||||
x4 = xi + (Math.cos(endAngle) * radius);
|
||||
y4 = yi + (Math.sin(endAngle) * radius);
|
||||
}
|
||||
else {
|
||||
x3 = xi + (Math.cos(endAngle) * radius);
|
||||
y3 = yi + (Math.sin(endAngle) * radius);
|
||||
|
||||
x4 = xi + (Math.cos(startAngle) * radius);
|
||||
y4 = yi + (Math.sin(startAngle) * radius);
|
||||
}
|
||||
|
||||
x3 = Math.round(x3);
|
||||
y3 = Math.round(y3);
|
||||
x4 = Math.round(x4);
|
||||
y4 = Math.round(y4);
|
||||
|
||||
this._path += 'ar' + x1 + ',' + y1 + ',' + x2 + ',' + y2 + ',' + x3 + ',' + y3 + ',' + x4 + ',' + y4;
|
||||
};
|
||||
|
||||
|
||||
IECanvasContext.prototype.rect = function(x, y, w, h) {
|
||||
var x1, y1, x2, y2;
|
||||
|
||||
x2 = x + w;
|
||||
y2 = y + h;
|
||||
|
||||
x1 = Math.round(x);
|
||||
y1 = Math.round(y);
|
||||
x2 = Math.round(x2);
|
||||
y2 = Math.round(y2);
|
||||
|
||||
this._path += 'm' + x1 + ',' + y1;
|
||||
this._path += ' l' + x2 + ',' + y1;
|
||||
this._path += ' l' + x2 + ',' + y2;
|
||||
this._path += ' l' + x1 + ',' + y2;
|
||||
this._path += ' x'
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.strokeRect = function(x, y, w, h) {
|
||||
var o, s;
|
||||
|
||||
o = element.ownerDocument.createElement('v:rect');
|
||||
o.fillColor = 'none';
|
||||
o.filled = false;
|
||||
o.strokeColor = this.strokeStyle;
|
||||
o.stroked = true;
|
||||
o.weight = this.lineWidth;
|
||||
o.style.position = 'absolute';
|
||||
o.style.left = this._offsetX + x;
|
||||
o.style.top = this._offsetY + y;
|
||||
o.style.width = w;
|
||||
o.style.height = h;
|
||||
|
||||
s = element.ownerDocument.createElement('v:fill');
|
||||
s.opacity = this.globalAlpha;
|
||||
o.appendChild(s);
|
||||
|
||||
element.appendChild(o);
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.clearRect = function(x, y, w, h) { };
|
||||
|
||||
|
||||
IECanvasContext.prototype.fillRect = function(x, y, w, h) {
|
||||
var o, f;
|
||||
|
||||
if ((x == 0) && (y == 0) && (w == element.offsetWidth) && (h == element.offsetHeight) && (this._offsetX == 0) && (this._offsetY == 0) && (this.globalAlpha == 1)) {
|
||||
while (element.firstChild) { element.removeChild(element.lastChild); }
|
||||
}
|
||||
|
||||
o = element.ownerDocument.createElement('v:rect');
|
||||
o.fillColor = this.fillStyle;
|
||||
o.filled = true;
|
||||
o.stroked = false;
|
||||
o.weight = 0;
|
||||
o.style.position = 'absolute';
|
||||
o.style.left = this._offsetX + x;
|
||||
o.style.top = this._offsetY + y;
|
||||
o.style.width = w;
|
||||
o.style.height = h;
|
||||
o.style.antialias = 'false';
|
||||
|
||||
f = element.ownerDocument.createElement('v:fill');
|
||||
f.opacity = this.globalAlpha;
|
||||
o.appendChild(f);
|
||||
|
||||
element.appendChild(o);
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.addColorStop = function() { };
|
||||
IECanvasContext.prototype.createLinearGradient = function() { };
|
||||
IECanvasContext.prototype.createPattern = function() { };
|
||||
IECanvasContext.prototype.createRadialGradient = function() { };
|
||||
|
||||
IECanvasContext.prototype.drawImage = function() { };
|
||||
IECanvasContext.prototype.drawImageFromRect = function() { };
|
||||
|
||||
</script>
|
||||
/*----------------------------------------------------------------------------\
|
||||
| IE Canvas 1.0 |
|
||||
|-----------------------------------------------------------------------------|
|
||||
| Created by Emil A Eklund |
|
||||
| (http://eae.net/contact/emil) |
|
||||
|-----------------------------------------------------------------------------|
|
||||
| Implementation of the canvas API for Internet Explorer. Uses VML. |
|
||||
|-----------------------------------------------------------------------------|
|
||||
| Copyright (c) 2005 Emil A Eklund |
|
||||
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
|
||||
| This program is free software; you can redistribute it and/or modify it |
|
||||
| under the terms of the MIT License. |
|
||||
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
|
||||
| Permission is hereby granted, free of charge, to any person obtaining a |
|
||||
| copy of this software and associated documentation files (the "Software"), |
|
||||
| to deal in the Software without restriction, including without limitation |
|
||||
| the rights to use, copy, modify, merge, publish, distribute, sublicense, |
|
||||
| and/or sell copies of the Software, and to permit persons to whom the |
|
||||
| Software is furnished to do so, subject to the following conditions: |
|
||||
| The above copyright notice and this permission notice shall be included in |
|
||||
| all copies or substantial portions of the Software. |
|
||||
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
|
||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
||||
| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
||||
| DEALINGS IN THE SOFTWARE. |
|
||||
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
|
||||
| http://eae.net/license/mit |
|
||||
|-----------------------------------------------------------------------------|
|
||||
| Dependencies: canvas.js - For initialization of canvas elements |
|
||||
|-----------------------------------------------------------------------------|
|
||||
| 2005-12-27 | Work started. |
|
||||
| 2005-12-29 | First version posted. |
|
||||
| 2006-01-03 | Fixed bug in moveTo and lineTo, arguments where not converted |
|
||||
| | to int which could cause IE to enter an endless loop. Disabled |
|
||||
| | antalias for fillRect to better comply with the Mozilla, Opera |
|
||||
| | and possibly Safari implementations where using fillRect is |
|
||||
| | about the only way to raw non antialiased lines. |
|
||||
|-----------------------------------------------------------------------------|
|
||||
| Created 2005-12-27 | All changes are in the log above. | Updated 2006-01-03 |
|
||||
\----------------------------------------------------------------------------*/
|
||||
|
||||
<public:component>
|
||||
<public:method name="getContext" />
|
||||
<public:attach event="oncontentready" onevent="initCanvas()"/>
|
||||
</public:component>
|
||||
|
||||
<script language="JScript">
|
||||
|
||||
function getContext() {
|
||||
return element.context;
|
||||
}
|
||||
|
||||
function initCanvas() {
|
||||
element.context = new IECanvasContext();
|
||||
element.style.position = 'relative';
|
||||
element.style.display = 'block';
|
||||
element.style.overflow = 'hidden';
|
||||
}
|
||||
|
||||
|
||||
|
||||
function IECanvasContext() {
|
||||
this.fillStyle = 'black';
|
||||
this.globalAlpha = 1.0;
|
||||
this.globalCompositeOperation = '';
|
||||
this.lineCap = '';
|
||||
this.lineJoin = '';
|
||||
this.lineWidth = '0';
|
||||
this.miterLimit = '';
|
||||
this.shadowBlur = '';
|
||||
this.shadowColor = '';
|
||||
this.shadowOffsetX = '';
|
||||
this.shadowOffsetY = '';
|
||||
this.strokeStyle = 'black';
|
||||
this._path = '';
|
||||
this._stateStack = new Array();
|
||||
this._offsetX = 0;
|
||||
this._offsetY = 0;
|
||||
this._rotation = 0;
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.save = function() {
|
||||
var o;
|
||||
|
||||
o = new Object();
|
||||
this._copyState(this, o);
|
||||
this._stateStack.push(o);
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.restore = function() {
|
||||
var o, n;
|
||||
|
||||
n = this._stateStack.length - 1;
|
||||
if (n < 0) { return; }
|
||||
|
||||
o = this._stateStack[n];
|
||||
this._copyState(o, this);
|
||||
this._stateStack.splice(n, 1);
|
||||
};
|
||||
|
||||
IECanvasContext.prototype._copyState = function(oFrom, oTo) {
|
||||
oTo.fillStyle = oFrom.fillStyle;
|
||||
oTo.lineCap = oFrom.lineCap;
|
||||
oTo.lineJoin = oFrom.lineJoin;
|
||||
oTo.lineWidth = oFrom.lineWidth;
|
||||
oTo.miterLimit = oFrom.miterLimit;
|
||||
oTo.shadowBlur = oFrom.shadowBlur;
|
||||
oTo.shadowColor = oFrom.shadowColor;
|
||||
oTo.shadowOffsetX = oFrom.shadowOffsetX;
|
||||
oTo.shadowOffsetY = oFrom.shadowOffsetY;
|
||||
oTo._offsetX = oFrom._offsetX;
|
||||
oTo._offsetY = oFrom._offsetY;
|
||||
oTo._rotation = oFrom._rotation;
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.rotate = function(r) {
|
||||
var MAX = Math.PI * 2;
|
||||
|
||||
this._rotation += r;
|
||||
while (this._rotation > MAX) { this._rotation = MAX - this._rotation; }
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.scale = function() { };
|
||||
|
||||
IECanvasContext.prototype.translate = function(x, y) {
|
||||
this._offsetX += x;
|
||||
this._offsetY += y;
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {
|
||||
if (this._path) { this._path += ' '; }
|
||||
|
||||
this._path += 'qb' + cp1x + ',' + cp1y + ',' + cp2x + ',' + cp2y + ',' + x + ',' + y;
|
||||
};
|
||||
|
||||
|
||||
IECanvasContext.prototype.clip = function() { };
|
||||
|
||||
IECanvasContext.prototype.beginPath = function() {
|
||||
this._path = '';
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.closePath = function() {
|
||||
if (this._path) { this._path += ' '; }
|
||||
this._path += 'x';
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.lineTo = function(x, y) {
|
||||
if (this._path) { this._path += ' '; }
|
||||
this._path += 'l' + parseInt(x) + ',' + parseInt(y);
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.moveTo = function(x, y) {
|
||||
if (this._path) { this._path += ' '; }
|
||||
this._path += 'm' + parseInt(x) + ',' + parseInt(y);
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.stroke = function() {
|
||||
var o, s, cosa, sina, cx, cy, x, y;
|
||||
|
||||
if (!this._path) { return; }
|
||||
|
||||
this._path += ' e';
|
||||
|
||||
o = element.ownerDocument.createElement('v:shape');
|
||||
o.fillColor = 'none';
|
||||
o.filled = false;
|
||||
o.strokeColor = this.strokeStyle;
|
||||
o.stroked = true;
|
||||
o.weight = this.lineWidth;
|
||||
o.coordsize = element.offsetWidth + ',' + element.offsetHeight;
|
||||
o.style.position = 'absolute';
|
||||
o.style.left = this._offsetX;
|
||||
o.style.top = this._offsetY;
|
||||
o.style.width = element.offsetWidth;
|
||||
o.style.height = element.offsetHeight;
|
||||
o.path = this._path;
|
||||
|
||||
s = element.ownerDocument.createElement('v:stroke');
|
||||
s.opacity = this.globalAlpha;
|
||||
o.appendChild(s);
|
||||
|
||||
if (this._rotation) {
|
||||
r = element.ownerDocument.createElement('v:group');
|
||||
r.style.position = 'absolute';
|
||||
r.style.left = 0;
|
||||
r.style.top = 0;
|
||||
r.style.width = element.offsetWidth;
|
||||
r.style.height = element.offsetHeight;
|
||||
r.coordsize = o.coordsize;
|
||||
r.style.rotation = Math.round((this._rotation * 180) / Math.PI);
|
||||
r.style.rotationCenter = '0,0';
|
||||
r.appendChild(o);
|
||||
element.appendChild(r);
|
||||
|
||||
cosa = Math.cos(this._rotation);
|
||||
sina = Math.sin(this._rotation);
|
||||
cx = element.offsetWidth / 2;
|
||||
cy = element.offsetHeight / 2;
|
||||
|
||||
x = ( cx*(1-cosa) + cy*sina);
|
||||
y = (-cx*sina + cy*(1-cosa));
|
||||
|
||||
r.style.left = x * -1;
|
||||
r.style.top = y * -1;
|
||||
}
|
||||
else { element.appendChild(o); }
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.fill = function() {
|
||||
var o, f, r;
|
||||
|
||||
if (!this._path) { return; }
|
||||
|
||||
this._path += ' e';
|
||||
|
||||
o = element.ownerDocument.createElement('v:shape');
|
||||
o.fillColor = this.fillStyle;
|
||||
o.strokeColor = this.strokeStyle;
|
||||
o.stroked = false;
|
||||
o.weight = this.lineWidth;
|
||||
o.coordsize = element.offsetWidth + ',' + element.offsetHeight;
|
||||
o.style.position = 'absolute';
|
||||
o.style.left = this._offsetX;
|
||||
o.style.top = this._offsetY;
|
||||
o.style.width = element.offsetWidth;
|
||||
o.style.height = element.offsetHeight;
|
||||
o.path = this._path;
|
||||
|
||||
f = element.ownerDocument.createElement('v:fill');
|
||||
f.opacity = this.globalAlpha;
|
||||
o.appendChild(f);
|
||||
|
||||
if (this._rotation) {
|
||||
r = element.ownerDocument.createElement('v:group');
|
||||
r.style.position = 'absolute';
|
||||
r.style.left = 0;
|
||||
r.style.top = 0;
|
||||
r.style.width = element.offsetWidth;
|
||||
r.style.height = element.offsetHeight;
|
||||
r.coordsize = o.coordsize;
|
||||
r.style.rotation = Math.round((this._rotation * 180) / Math.PI);
|
||||
r.style.rotationCenter = '0,0';
|
||||
r.appendChild(o);
|
||||
element.appendChild(r);
|
||||
|
||||
cosa = Math.cos(this._rotation);
|
||||
sina = Math.sin(this._rotation);
|
||||
cx = (element.offsetWidth) / 2;
|
||||
cy = (element.offsetHeight) / 2;
|
||||
x = ( cx*(1-cosa) + cy*sina);
|
||||
y = (-cx*sina + cy*(1-cosa));
|
||||
|
||||
r.style.left = x * -1;
|
||||
r.style.top = y * -1;
|
||||
}
|
||||
else { element.appendChild(o); }
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.arcTo = function(x1, y1, x2, y2, radius) {
|
||||
// not implemented in gecko, not implemented here
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {
|
||||
if (this._path) { this._path += ' '; }
|
||||
|
||||
this._path += 'qb' + cpx + ',' + cpy + ',' + x + ',' + y;
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.arc = function(x, y, radius, startAngle, endAngle, clockwise) {
|
||||
var xi, yi, x1, y1, x2, y2, x3, y3, x4, y4;
|
||||
|
||||
if (this._path) { this._path += ' '; }
|
||||
|
||||
xi = parseFloat(x);
|
||||
yi = parseFloat(y);
|
||||
|
||||
x1 = xi - radius;
|
||||
y1 = yi - radius;
|
||||
|
||||
x2 = xi + radius;
|
||||
y2 = yi + radius;
|
||||
|
||||
if (clockwise) {
|
||||
x3 = xi + (Math.cos(startAngle) * radius);
|
||||
y3 = yi + (Math.sin(startAngle) * radius);
|
||||
|
||||
x4 = xi + (Math.cos(endAngle) * radius);
|
||||
y4 = yi + (Math.sin(endAngle) * radius);
|
||||
}
|
||||
else {
|
||||
x3 = xi + (Math.cos(endAngle) * radius);
|
||||
y3 = yi + (Math.sin(endAngle) * radius);
|
||||
|
||||
x4 = xi + (Math.cos(startAngle) * radius);
|
||||
y4 = yi + (Math.sin(startAngle) * radius);
|
||||
}
|
||||
|
||||
x3 = Math.round(x3);
|
||||
y3 = Math.round(y3);
|
||||
x4 = Math.round(x4);
|
||||
y4 = Math.round(y4);
|
||||
|
||||
this._path += 'ar' + x1 + ',' + y1 + ',' + x2 + ',' + y2 + ',' + x3 + ',' + y3 + ',' + x4 + ',' + y4;
|
||||
};
|
||||
|
||||
|
||||
IECanvasContext.prototype.rect = function(x, y, w, h) {
|
||||
var x1, y1, x2, y2;
|
||||
|
||||
x2 = x + w;
|
||||
y2 = y + h;
|
||||
|
||||
x1 = Math.round(x);
|
||||
y1 = Math.round(y);
|
||||
x2 = Math.round(x2);
|
||||
y2 = Math.round(y2);
|
||||
|
||||
this._path += 'm' + x1 + ',' + y1;
|
||||
this._path += ' l' + x2 + ',' + y1;
|
||||
this._path += ' l' + x2 + ',' + y2;
|
||||
this._path += ' l' + x1 + ',' + y2;
|
||||
this._path += ' x'
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.strokeRect = function(x, y, w, h) {
|
||||
var o, s;
|
||||
|
||||
o = element.ownerDocument.createElement('v:rect');
|
||||
o.fillColor = 'none';
|
||||
o.filled = false;
|
||||
o.strokeColor = this.strokeStyle;
|
||||
o.stroked = true;
|
||||
o.weight = this.lineWidth;
|
||||
o.style.position = 'absolute';
|
||||
o.style.left = this._offsetX + x;
|
||||
o.style.top = this._offsetY + y;
|
||||
o.style.width = w;
|
||||
o.style.height = h;
|
||||
|
||||
s = element.ownerDocument.createElement('v:fill');
|
||||
s.opacity = this.globalAlpha;
|
||||
o.appendChild(s);
|
||||
|
||||
element.appendChild(o);
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.clearRect = function(x, y, w, h) { };
|
||||
|
||||
|
||||
IECanvasContext.prototype.fillRect = function(x, y, w, h) {
|
||||
var o, f;
|
||||
|
||||
if ((x == 0) && (y == 0) && (w == element.offsetWidth) && (h == element.offsetHeight) && (this._offsetX == 0) && (this._offsetY == 0) && (this.globalAlpha == 1)) {
|
||||
while (element.firstChild) { element.removeChild(element.lastChild); }
|
||||
}
|
||||
|
||||
o = element.ownerDocument.createElement('v:rect');
|
||||
o.fillColor = this.fillStyle;
|
||||
o.filled = true;
|
||||
o.stroked = false;
|
||||
o.weight = 0;
|
||||
o.style.position = 'absolute';
|
||||
o.style.left = this._offsetX + x;
|
||||
o.style.top = this._offsetY + y;
|
||||
o.style.width = w;
|
||||
o.style.height = h;
|
||||
o.style.antialias = 'false';
|
||||
|
||||
f = element.ownerDocument.createElement('v:fill');
|
||||
f.opacity = this.globalAlpha;
|
||||
o.appendChild(f);
|
||||
|
||||
element.appendChild(o);
|
||||
};
|
||||
|
||||
IECanvasContext.prototype.addColorStop = function() { };
|
||||
IECanvasContext.prototype.createLinearGradient = function() { };
|
||||
IECanvasContext.prototype.createPattern = function() { };
|
||||
IECanvasContext.prototype.createRadialGradient = function() { };
|
||||
|
||||
IECanvasContext.prototype.drawImage = function() { };
|
||||
IECanvasContext.prototype.drawImageFromRect = function() { };
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,255 +1,255 @@
|
|||
/*
|
||||
Behaviour v1.1 by Ben Nolan, June 2005. Based largely on the work
|
||||
of Simon Willison (see comments by Simon below).
|
||||
|
||||
Description:
|
||||
|
||||
Uses css selectors to apply javascript behaviours to enable
|
||||
unobtrusive javascript in html documents.
|
||||
|
||||
Usage:
|
||||
|
||||
var myrules = {
|
||||
'b.someclass' : function(element){
|
||||
element.onclick = function(){
|
||||
alert(this.innerHTML);
|
||||
}
|
||||
},
|
||||
'#someid u' : function(element){
|
||||
element.onmouseover = function(){
|
||||
this.innerHTML = "BLAH!";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Behaviour.register(myrules);
|
||||
|
||||
// Call Behaviour.apply() to re-apply the rules (if you
|
||||
// update the dom, etc).
|
||||
|
||||
License:
|
||||
|
||||
This file is entirely BSD licensed.
|
||||
|
||||
More information:
|
||||
|
||||
http://ripcord.co.nz/behaviour/
|
||||
|
||||
*/
|
||||
|
||||
var Behaviour = {
|
||||
list : new Array,
|
||||
|
||||
register : function(sheet){
|
||||
Behaviour.list.push(sheet);
|
||||
},
|
||||
|
||||
start : function(){
|
||||
Behaviour.addLoadEvent(function(){
|
||||
Behaviour.apply();
|
||||
});
|
||||
},
|
||||
|
||||
apply : function(){
|
||||
for (var h=0;sheet=Behaviour.list[h];h++){
|
||||
for (selector in sheet){
|
||||
list = document.getElementsBySelector(selector);
|
||||
|
||||
if (!list){
|
||||
continue;
|
||||
}
|
||||
|
||||
for (var i=0;element=list[i];i++){
|
||||
sheet[selector](element);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
addLoadEvent : function(func){
|
||||
var oldonload = window.onload;
|
||||
if (typeof window.onload != 'function') {
|
||||
window.onload = func;
|
||||
} else {
|
||||
window.onload = function() {
|
||||
oldonload();
|
||||
if(func != null) {
|
||||
func();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Behaviour.start();
|
||||
|
||||
/*
|
||||
The following code is Copyright (C) Simon Willison 2004.
|
||||
|
||||
document.getElementsBySelector(selector)
|
||||
- returns an array of element objects from the current document
|
||||
matching the CSS selector. Selectors can contain element names,
|
||||
class names and ids and can be nested. For example:
|
||||
|
||||
elements = document.getElementsBySelect('div#main p a.external')
|
||||
|
||||
Will return an array of all 'a' elements with 'external' in their
|
||||
class attribute that are contained inside 'p' elements that are
|
||||
contained inside the 'div' element which has id="main"
|
||||
|
||||
New in version 0.4: Support for CSS2 and CSS3 attribute selectors:
|
||||
See http://www.w3.org/TR/css3-selectors/#attribute-selectors
|
||||
|
||||
Version 0.4 - Simon Willison, March 25th 2003
|
||||
-- Works in Phoenix 0.5, Mozilla 1.3, Opera 7, Internet Explorer 6, Internet Explorer 5 on Windows
|
||||
-- Opera 7 fails
|
||||
*/
|
||||
|
||||
function getAllChildren(e) {
|
||||
// Returns all children of element. Workaround required for IE5/Windows. Ugh.
|
||||
return e.all ? e.all : e.getElementsByTagName('*');
|
||||
}
|
||||
|
||||
document.getElementsBySelector = function(selector) {
|
||||
// Attempt to fail gracefully in lesser browsers
|
||||
if (!document.getElementsByTagName) {
|
||||
return new Array();
|
||||
}
|
||||
// Split selector in to tokens
|
||||
var tokens = selector.split(' ');
|
||||
var currentContext = new Array(document);
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
token = tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');;
|
||||
if (token.indexOf('#') > -1) {
|
||||
// Token is an ID selector
|
||||
var bits = token.split('#');
|
||||
var tagName = bits[0];
|
||||
var id = bits[1];
|
||||
var element = document.getElementById(id);
|
||||
if (tagName && element.nodeName.toLowerCase() != tagName) {
|
||||
// tag with that ID not found, return false
|
||||
return new Array();
|
||||
}
|
||||
// Set currentContext to contain just this element
|
||||
currentContext = new Array(element);
|
||||
continue; // Skip to next token
|
||||
}
|
||||
if (token.indexOf('.') > -1) {
|
||||
// Token contains a class selector
|
||||
var bits = token.split('.');
|
||||
var tagName = bits[0];
|
||||
var className = bits[1];
|
||||
if (!tagName) {
|
||||
tagName = '*';
|
||||
}
|
||||
// Get elements matching tag, filter them for class selector
|
||||
var found = new Array;
|
||||
var foundCount = 0;
|
||||
for (var h = 0; h < currentContext.length; h++) {
|
||||
var elements;
|
||||
if (tagName == '*') {
|
||||
elements = getAllChildren(currentContext[h]);
|
||||
} else {
|
||||
elements = currentContext[h].getElementsByTagName(tagName);
|
||||
}
|
||||
for (var j = 0; j < elements.length; j++) {
|
||||
found[foundCount++] = elements[j];
|
||||
}
|
||||
}
|
||||
currentContext = new Array;
|
||||
var currentContextIndex = 0;
|
||||
for (var k = 0; k < found.length; k++) {
|
||||
if (found[k].className && found[k].className.match(new RegExp('\\b'+className+'\\b'))) {
|
||||
currentContext[currentContextIndex++] = found[k];
|
||||
}
|
||||
}
|
||||
continue; // Skip to next token
|
||||
}
|
||||
// Code to deal with attribute selectors
|
||||
if (token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)) {
|
||||
var tagName = RegExp.$1;
|
||||
var attrName = RegExp.$2;
|
||||
var attrOperator = RegExp.$3;
|
||||
var attrValue = RegExp.$4;
|
||||
if (!tagName) {
|
||||
tagName = '*';
|
||||
}
|
||||
// Grab all of the tagName elements within current context
|
||||
var found = new Array;
|
||||
var foundCount = 0;
|
||||
for (var h = 0; h < currentContext.length; h++) {
|
||||
var elements;
|
||||
if (tagName == '*') {
|
||||
elements = getAllChildren(currentContext[h]);
|
||||
} else {
|
||||
elements = currentContext[h].getElementsByTagName(tagName);
|
||||
}
|
||||
for (var j = 0; j < elements.length; j++) {
|
||||
found[foundCount++] = elements[j];
|
||||
}
|
||||
}
|
||||
currentContext = new Array;
|
||||
var currentContextIndex = 0;
|
||||
var checkFunction; // This function will be used to filter the elements
|
||||
switch (attrOperator) {
|
||||
case '=': // Equality
|
||||
checkFunction = function(e) { return (e.getAttribute(attrName) == attrValue); };
|
||||
break;
|
||||
case '~': // Match one of space seperated words
|
||||
checkFunction = function(e) { return (e.getAttribute(attrName).match(new RegExp('\\b'+attrValue+'\\b'))); };
|
||||
break;
|
||||
case '|': // Match start with value followed by optional hyphen
|
||||
checkFunction = function(e) { return (e.getAttribute(attrName).match(new RegExp('^'+attrValue+'-?'))); };
|
||||
break;
|
||||
case '^': // Match starts with value
|
||||
checkFunction = function(e) { return (e.getAttribute(attrName).indexOf(attrValue) == 0); };
|
||||
break;
|
||||
case '$': // Match ends with value - fails with "Warning" in Opera 7
|
||||
checkFunction = function(e) { return (e.getAttribute(attrName).lastIndexOf(attrValue) == e.getAttribute(attrName).length - attrValue.length); };
|
||||
break;
|
||||
case '*': // Match ends with value
|
||||
checkFunction = function(e) { return (e.getAttribute(attrName).indexOf(attrValue) > -1); };
|
||||
break;
|
||||
default :
|
||||
// Just test for existence of attribute
|
||||
checkFunction = function(e) { return e.getAttribute(attrName); };
|
||||
}
|
||||
currentContext = new Array;
|
||||
var currentContextIndex = 0;
|
||||
for (var k = 0; k < found.length; k++) {
|
||||
if (checkFunction(found[k])) {
|
||||
currentContext[currentContextIndex++] = found[k];
|
||||
}
|
||||
}
|
||||
// alert('Attribute Selector: '+tagName+' '+attrName+' '+attrOperator+' '+attrValue);
|
||||
continue; // Skip to next token
|
||||
}
|
||||
|
||||
if (!currentContext[0]){
|
||||
return;
|
||||
}
|
||||
|
||||
// If we get here, token is JUST an element (not a class or ID selector)
|
||||
tagName = token;
|
||||
var found = new Array;
|
||||
var foundCount = 0;
|
||||
for (var h = 0; h < currentContext.length; h++) {
|
||||
var elements = currentContext[h].getElementsByTagName(tagName);
|
||||
for (var j = 0; j < elements.length; j++) {
|
||||
found[foundCount++] = elements[j];
|
||||
}
|
||||
}
|
||||
currentContext = found;
|
||||
}
|
||||
return currentContext;
|
||||
}
|
||||
|
||||
/* That revolting regular expression explained
|
||||
/^(\w+)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/
|
||||
\---/ \---/\-------------/ \-------/
|
||||
| | | |
|
||||
| | | The value
|
||||
| | ~,|,^,$,* or =
|
||||
| Attribute
|
||||
Tag
|
||||
*/
|
||||
/*
|
||||
Behaviour v1.1 by Ben Nolan, June 2005. Based largely on the work
|
||||
of Simon Willison (see comments by Simon below).
|
||||
|
||||
Description:
|
||||
|
||||
Uses css selectors to apply javascript behaviours to enable
|
||||
unobtrusive javascript in html documents.
|
||||
|
||||
Usage:
|
||||
|
||||
var myrules = {
|
||||
'b.someclass' : function(element){
|
||||
element.onclick = function(){
|
||||
alert(this.innerHTML);
|
||||
}
|
||||
},
|
||||
'#someid u' : function(element){
|
||||
element.onmouseover = function(){
|
||||
this.innerHTML = "BLAH!";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Behaviour.register(myrules);
|
||||
|
||||
// Call Behaviour.apply() to re-apply the rules (if you
|
||||
// update the dom, etc).
|
||||
|
||||
License:
|
||||
|
||||
This file is entirely BSD licensed.
|
||||
|
||||
More information:
|
||||
|
||||
http://ripcord.co.nz/behaviour/
|
||||
|
||||
*/
|
||||
|
||||
var Behaviour = {
|
||||
list : new Array,
|
||||
|
||||
register : function(sheet){
|
||||
Behaviour.list.push(sheet);
|
||||
},
|
||||
|
||||
start : function(){
|
||||
Behaviour.addLoadEvent(function(){
|
||||
Behaviour.apply();
|
||||
});
|
||||
},
|
||||
|
||||
apply : function(){
|
||||
for (var h=0;sheet=Behaviour.list[h];h++){
|
||||
for (selector in sheet){
|
||||
list = document.getElementsBySelector(selector);
|
||||
|
||||
if (!list){
|
||||
continue;
|
||||
}
|
||||
|
||||
for (var i=0;element=list[i];i++){
|
||||
sheet[selector](element);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
addLoadEvent : function(func){
|
||||
var oldonload = window.onload;
|
||||
if (typeof window.onload != 'function') {
|
||||
window.onload = func;
|
||||
} else {
|
||||
window.onload = function() {
|
||||
oldonload();
|
||||
if(func != null) {
|
||||
func();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Behaviour.start();
|
||||
|
||||
/*
|
||||
The following code is Copyright (C) Simon Willison 2004.
|
||||
|
||||
document.getElementsBySelector(selector)
|
||||
- returns an array of element objects from the current document
|
||||
matching the CSS selector. Selectors can contain element names,
|
||||
class names and ids and can be nested. For example:
|
||||
|
||||
elements = document.getElementsBySelect('div#main p a.external')
|
||||
|
||||
Will return an array of all 'a' elements with 'external' in their
|
||||
class attribute that are contained inside 'p' elements that are
|
||||
contained inside the 'div' element which has id="main"
|
||||
|
||||
New in version 0.4: Support for CSS2 and CSS3 attribute selectors:
|
||||
See http://www.w3.org/TR/css3-selectors/#attribute-selectors
|
||||
|
||||
Version 0.4 - Simon Willison, March 25th 2003
|
||||
-- Works in Phoenix 0.5, Mozilla 1.3, Opera 7, Internet Explorer 6, Internet Explorer 5 on Windows
|
||||
-- Opera 7 fails
|
||||
*/
|
||||
|
||||
function getAllChildren(e) {
|
||||
// Returns all children of element. Workaround required for IE5/Windows. Ugh.
|
||||
return e.all ? e.all : e.getElementsByTagName('*');
|
||||
}
|
||||
|
||||
document.getElementsBySelector = function(selector) {
|
||||
// Attempt to fail gracefully in lesser browsers
|
||||
if (!document.getElementsByTagName) {
|
||||
return new Array();
|
||||
}
|
||||
// Split selector in to tokens
|
||||
var tokens = selector.split(' ');
|
||||
var currentContext = new Array(document);
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
token = tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');;
|
||||
if (token.indexOf('#') > -1) {
|
||||
// Token is an ID selector
|
||||
var bits = token.split('#');
|
||||
var tagName = bits[0];
|
||||
var id = bits[1];
|
||||
var element = document.getElementById(id);
|
||||
if (tagName && element.nodeName.toLowerCase() != tagName) {
|
||||
// tag with that ID not found, return false
|
||||
return new Array();
|
||||
}
|
||||
// Set currentContext to contain just this element
|
||||
currentContext = new Array(element);
|
||||
continue; // Skip to next token
|
||||
}
|
||||
if (token.indexOf('.') > -1) {
|
||||
// Token contains a class selector
|
||||
var bits = token.split('.');
|
||||
var tagName = bits[0];
|
||||
var className = bits[1];
|
||||
if (!tagName) {
|
||||
tagName = '*';
|
||||
}
|
||||
// Get elements matching tag, filter them for class selector
|
||||
var found = new Array;
|
||||
var foundCount = 0;
|
||||
for (var h = 0; h < currentContext.length; h++) {
|
||||
var elements;
|
||||
if (tagName == '*') {
|
||||
elements = getAllChildren(currentContext[h]);
|
||||
} else {
|
||||
elements = currentContext[h].getElementsByTagName(tagName);
|
||||
}
|
||||
for (var j = 0; j < elements.length; j++) {
|
||||
found[foundCount++] = elements[j];
|
||||
}
|
||||
}
|
||||
currentContext = new Array;
|
||||
var currentContextIndex = 0;
|
||||
for (var k = 0; k < found.length; k++) {
|
||||
if (found[k].className && found[k].className.match(new RegExp('\\b'+className+'\\b'))) {
|
||||
currentContext[currentContextIndex++] = found[k];
|
||||
}
|
||||
}
|
||||
continue; // Skip to next token
|
||||
}
|
||||
// Code to deal with attribute selectors
|
||||
if (token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)) {
|
||||
var tagName = RegExp.$1;
|
||||
var attrName = RegExp.$2;
|
||||
var attrOperator = RegExp.$3;
|
||||
var attrValue = RegExp.$4;
|
||||
if (!tagName) {
|
||||
tagName = '*';
|
||||
}
|
||||
// Grab all of the tagName elements within current context
|
||||
var found = new Array;
|
||||
var foundCount = 0;
|
||||
for (var h = 0; h < currentContext.length; h++) {
|
||||
var elements;
|
||||
if (tagName == '*') {
|
||||
elements = getAllChildren(currentContext[h]);
|
||||
} else {
|
||||
elements = currentContext[h].getElementsByTagName(tagName);
|
||||
}
|
||||
for (var j = 0; j < elements.length; j++) {
|
||||
found[foundCount++] = elements[j];
|
||||
}
|
||||
}
|
||||
currentContext = new Array;
|
||||
var currentContextIndex = 0;
|
||||
var checkFunction; // This function will be used to filter the elements
|
||||
switch (attrOperator) {
|
||||
case '=': // Equality
|
||||
checkFunction = function(e) { return (e.getAttribute(attrName) == attrValue); };
|
||||
break;
|
||||
case '~': // Match one of space seperated words
|
||||
checkFunction = function(e) { return (e.getAttribute(attrName).match(new RegExp('\\b'+attrValue+'\\b'))); };
|
||||
break;
|
||||
case '|': // Match start with value followed by optional hyphen
|
||||
checkFunction = function(e) { return (e.getAttribute(attrName).match(new RegExp('^'+attrValue+'-?'))); };
|
||||
break;
|
||||
case '^': // Match starts with value
|
||||
checkFunction = function(e) { return (e.getAttribute(attrName).indexOf(attrValue) == 0); };
|
||||
break;
|
||||
case '$': // Match ends with value - fails with "Warning" in Opera 7
|
||||
checkFunction = function(e) { return (e.getAttribute(attrName).lastIndexOf(attrValue) == e.getAttribute(attrName).length - attrValue.length); };
|
||||
break;
|
||||
case '*': // Match ends with value
|
||||
checkFunction = function(e) { return (e.getAttribute(attrName).indexOf(attrValue) > -1); };
|
||||
break;
|
||||
default :
|
||||
// Just test for existence of attribute
|
||||
checkFunction = function(e) { return e.getAttribute(attrName); };
|
||||
}
|
||||
currentContext = new Array;
|
||||
var currentContextIndex = 0;
|
||||
for (var k = 0; k < found.length; k++) {
|
||||
if (checkFunction(found[k])) {
|
||||
currentContext[currentContextIndex++] = found[k];
|
||||
}
|
||||
}
|
||||
// alert('Attribute Selector: '+tagName+' '+attrName+' '+attrOperator+' '+attrValue);
|
||||
continue; // Skip to next token
|
||||
}
|
||||
|
||||
if (!currentContext[0]){
|
||||
return;
|
||||
}
|
||||
|
||||
// If we get here, token is JUST an element (not a class or ID selector)
|
||||
tagName = token;
|
||||
var found = new Array;
|
||||
var foundCount = 0;
|
||||
for (var h = 0; h < currentContext.length; h++) {
|
||||
var elements = currentContext[h].getElementsByTagName(tagName);
|
||||
for (var j = 0; j < elements.length; j++) {
|
||||
found[foundCount++] = elements[j];
|
||||
}
|
||||
}
|
||||
currentContext = found;
|
||||
}
|
||||
return currentContext;
|
||||
}
|
||||
|
||||
/* That revolting regular expression explained
|
||||
/^(\w+)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/
|
||||
\---/ \---/\-------------/ \-------/
|
||||
| | | |
|
||||
| | | The value
|
||||
| | ~,|,^,$,* or =
|
||||
| Attribute
|
||||
Tag
|
||||
*/
|
||||
|
|
|
@ -1,117 +1,117 @@
|
|||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
|
||||
|
||||
if "%OS%"=="Windows_NT" @setlocal
|
||||
|
||||
rem %~dp0 is expanded pathname of the current script under NT
|
||||
set DEFAULT_ACTIVEMQ_HOME=%~dp0..
|
||||
|
||||
if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
|
||||
set DEFAULT_ACTIVEMQ_HOME=
|
||||
|
||||
rem Slurp the command line arguments. This loop allows for an unlimited number
|
||||
rem of arguments (up to the command line limit, anyway).
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%1
|
||||
if ""%1""=="""" goto doneStart
|
||||
shift
|
||||
:setupArgs
|
||||
if ""%1""=="""" goto doneStart
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%ACTIVEMQ_CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setupArgs
|
||||
rem This label provides a place for the argument list loop to break out
|
||||
rem and for NT handling to skip to.
|
||||
|
||||
:doneStart
|
||||
rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
|
||||
rem by the user or the %0 problem on Windows 9x
|
||||
if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
|
||||
|
||||
rem check for activemq in Program Files on system drive
|
||||
if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkSystemDrive
|
||||
rem check for activemq in root directory of system drive
|
||||
if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkCDrive
|
||||
rem check for activemq in C:\activemq for Win9X users
|
||||
if not exist C:\activemq\README.txt goto noAntHome
|
||||
set ACTIVEMQ_HOME=C:\activemq
|
||||
goto checkJava
|
||||
|
||||
:noAntHome
|
||||
echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
|
||||
goto end
|
||||
|
||||
:checkJava
|
||||
set _JAVACMD=%JAVACMD%
|
||||
|
||||
set JAVA_EXT_DIRS=%JAVA_HOME%\lib\ext;%ACTIVEMQ_HOME%;%ACTIVEMQ_HOME%\lib;%ACTIVEMQ_HOME%\lib\optional
|
||||
|
||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
|
||||
goto runAnt
|
||||
|
||||
:noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
|
||||
echo.
|
||||
echo Warning: JAVA_HOME environment variable is not set.
|
||||
echo.
|
||||
|
||||
:runAnt
|
||||
|
||||
if "%ACTIVEMQ_BASE%" == "" set ACTIVEMQ_BASE=%ACTIVEMQ_HOME%
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Dderby.system.home="%ACTIVEMQ_BASE%\data" -Dderby.storage.fileSyncTransactionLog=true
|
||||
|
||||
if "%SUNJMX%" == "" set SUNJMX=-Dcom.sun.management.jmxremote
|
||||
REM set SUNJMX=-Dcom.sun.management.jmxremote.port=1616 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
|
||||
|
||||
if "%SSL_OPTS%" == "" set SSL_OPTS=-Djavax.net.ssl.keyStorePassword=password -Djavax.net.ssl.trustStorePassword=password -Djavax.net.ssl.keyStore="%ACTIVEMQ_BASE%/conf/broker.ks" -Djavax.net.ssl.trustStore="%ACTIVEMQ_BASE%/conf/broker.ts"
|
||||
|
||||
REM Uncomment to enable YourKit profiling
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS="-Xrunyjpagent"
|
||||
|
||||
REM Uncomment to enable remote debugging
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
|
||||
set ACTIVEMQ_TASK="start"
|
||||
"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% %SSL_OPTS% -classpath "%ACTIVEMQ_CLASSPATH%" -Dactivemq.home="%ACTIVEMQ_HOME%" -Dactivemq.base="%ACTIVEMQ_BASE%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
goto end
|
||||
|
||||
|
||||
:end
|
||||
set _JAVACMD=
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=
|
||||
|
||||
if "%OS%"=="Windows_NT" @endlocal
|
||||
|
||||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
|
||||
|
||||
if "%OS%"=="Windows_NT" @setlocal
|
||||
|
||||
rem %~dp0 is expanded pathname of the current script under NT
|
||||
set DEFAULT_ACTIVEMQ_HOME=%~dp0..
|
||||
|
||||
if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
|
||||
set DEFAULT_ACTIVEMQ_HOME=
|
||||
|
||||
rem Slurp the command line arguments. This loop allows for an unlimited number
|
||||
rem of arguments (up to the command line limit, anyway).
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%1
|
||||
if ""%1""=="""" goto doneStart
|
||||
shift
|
||||
:setupArgs
|
||||
if ""%1""=="""" goto doneStart
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%ACTIVEMQ_CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setupArgs
|
||||
rem This label provides a place for the argument list loop to break out
|
||||
rem and for NT handling to skip to.
|
||||
|
||||
:doneStart
|
||||
rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
|
||||
rem by the user or the %0 problem on Windows 9x
|
||||
if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
|
||||
|
||||
rem check for activemq in Program Files on system drive
|
||||
if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkSystemDrive
|
||||
rem check for activemq in root directory of system drive
|
||||
if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkCDrive
|
||||
rem check for activemq in C:\activemq for Win9X users
|
||||
if not exist C:\activemq\README.txt goto noAntHome
|
||||
set ACTIVEMQ_HOME=C:\activemq
|
||||
goto checkJava
|
||||
|
||||
:noAntHome
|
||||
echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
|
||||
goto end
|
||||
|
||||
:checkJava
|
||||
set _JAVACMD=%JAVACMD%
|
||||
|
||||
set JAVA_EXT_DIRS=%JAVA_HOME%\lib\ext;%ACTIVEMQ_HOME%;%ACTIVEMQ_HOME%\lib;%ACTIVEMQ_HOME%\lib\optional
|
||||
|
||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
|
||||
goto runAnt
|
||||
|
||||
:noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
|
||||
echo.
|
||||
echo Warning: JAVA_HOME environment variable is not set.
|
||||
echo.
|
||||
|
||||
:runAnt
|
||||
|
||||
if "%ACTIVEMQ_BASE%" == "" set ACTIVEMQ_BASE=%ACTIVEMQ_HOME%
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Dderby.system.home="%ACTIVEMQ_BASE%\data" -Dderby.storage.fileSyncTransactionLog=true
|
||||
|
||||
if "%SUNJMX%" == "" set SUNJMX=-Dcom.sun.management.jmxremote
|
||||
REM set SUNJMX=-Dcom.sun.management.jmxremote.port=1616 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
|
||||
|
||||
if "%SSL_OPTS%" == "" set SSL_OPTS=-Djavax.net.ssl.keyStorePassword=password -Djavax.net.ssl.trustStorePassword=password -Djavax.net.ssl.keyStore="%ACTIVEMQ_BASE%/conf/broker.ks" -Djavax.net.ssl.trustStore="%ACTIVEMQ_BASE%/conf/broker.ts"
|
||||
|
||||
REM Uncomment to enable YourKit profiling
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS="-Xrunyjpagent"
|
||||
|
||||
REM Uncomment to enable remote debugging
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
|
||||
set ACTIVEMQ_TASK="start"
|
||||
"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% %SSL_OPTS% -classpath "%ACTIVEMQ_CLASSPATH%" -Dactivemq.home="%ACTIVEMQ_HOME%" -Dactivemq.base="%ACTIVEMQ_BASE%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
goto end
|
||||
|
||||
|
||||
:end
|
||||
set _JAVACMD=
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=
|
||||
|
||||
if "%OS%"=="Windows_NT" @endlocal
|
||||
|
||||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
|
|
|
@ -1,115 +1,115 @@
|
|||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
|
||||
|
||||
if "%OS%"=="Windows_NT" @setlocal
|
||||
|
||||
rem %~dp0 is expanded pathname of the current script under NT
|
||||
set DEFAULT_ACTIVEMQ_HOME=%~dp0..
|
||||
|
||||
if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
|
||||
set DEFAULT_ACTIVEMQ_HOME=
|
||||
|
||||
rem Slurp the command line arguments. This loop allows for an unlimited number
|
||||
rem of arguments (up to the command line limit, anyway).
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%1
|
||||
if ""%1""=="""" goto doneStart
|
||||
shift
|
||||
:setupArgs
|
||||
if ""%1""=="""" goto doneStart
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%ACTIVEMQ_CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setupArgs
|
||||
rem This label provides a place for the argument list loop to break out
|
||||
rem and for NT handling to skip to.
|
||||
|
||||
:doneStart
|
||||
rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
|
||||
rem by the user or the %0 problem on Windows 9x
|
||||
if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
|
||||
|
||||
rem check for activemq in Program Files on system drive
|
||||
if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkSystemDrive
|
||||
rem check for activemq in root directory of system drive
|
||||
if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkCDrive
|
||||
rem check for activemq in C:\activemq for Win9X users
|
||||
if not exist C:\activemq\README.txt goto noAntHome
|
||||
set ACTIVEMQ_HOME=C:\activemq
|
||||
goto checkJava
|
||||
|
||||
:noAntHome
|
||||
echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
|
||||
goto end
|
||||
|
||||
:checkJava
|
||||
set _JAVACMD=%JAVACMD%
|
||||
set LOCALCLASSPATH=%CLASSPATH%
|
||||
|
||||
set JAVA_EXT_DIRS=%JAVA_HOME%\lib\ext;%ACTIVEMQ_HOME%;%ACTIVEMQ_HOME%\lib;%ACTIVEMQ_HOME%\lib\optional
|
||||
|
||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
|
||||
goto runAnt
|
||||
|
||||
:noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
|
||||
echo.
|
||||
echo Warning: JAVA_HOME environment variable is not set.
|
||||
echo.
|
||||
|
||||
:runAnt
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dderby.system.home="..\data" -Dderby.storage.fileSyncTransactionLog=true
|
||||
|
||||
REM Uncomment to enable YourKit profiling
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS="-Xrunyjpagent"
|
||||
|
||||
REM Uncomment to enable remote debugging
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
|
||||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="browse"
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
|
||||
goto end
|
||||
|
||||
|
||||
:end
|
||||
set LOCALCLASSPATH=
|
||||
set _JAVACMD=
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=
|
||||
|
||||
if "%OS%"=="Windows_NT" @endlocal
|
||||
|
||||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
|
||||
|
||||
if "%OS%"=="Windows_NT" @setlocal
|
||||
|
||||
rem %~dp0 is expanded pathname of the current script under NT
|
||||
set DEFAULT_ACTIVEMQ_HOME=%~dp0..
|
||||
|
||||
if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
|
||||
set DEFAULT_ACTIVEMQ_HOME=
|
||||
|
||||
rem Slurp the command line arguments. This loop allows for an unlimited number
|
||||
rem of arguments (up to the command line limit, anyway).
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%1
|
||||
if ""%1""=="""" goto doneStart
|
||||
shift
|
||||
:setupArgs
|
||||
if ""%1""=="""" goto doneStart
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%ACTIVEMQ_CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setupArgs
|
||||
rem This label provides a place for the argument list loop to break out
|
||||
rem and for NT handling to skip to.
|
||||
|
||||
:doneStart
|
||||
rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
|
||||
rem by the user or the %0 problem on Windows 9x
|
||||
if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
|
||||
|
||||
rem check for activemq in Program Files on system drive
|
||||
if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkSystemDrive
|
||||
rem check for activemq in root directory of system drive
|
||||
if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkCDrive
|
||||
rem check for activemq in C:\activemq for Win9X users
|
||||
if not exist C:\activemq\README.txt goto noAntHome
|
||||
set ACTIVEMQ_HOME=C:\activemq
|
||||
goto checkJava
|
||||
|
||||
:noAntHome
|
||||
echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
|
||||
goto end
|
||||
|
||||
:checkJava
|
||||
set _JAVACMD=%JAVACMD%
|
||||
set LOCALCLASSPATH=%CLASSPATH%
|
||||
|
||||
set JAVA_EXT_DIRS=%JAVA_HOME%\lib\ext;%ACTIVEMQ_HOME%;%ACTIVEMQ_HOME%\lib;%ACTIVEMQ_HOME%\lib\optional
|
||||
|
||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
|
||||
goto runAnt
|
||||
|
||||
:noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
|
||||
echo.
|
||||
echo Warning: JAVA_HOME environment variable is not set.
|
||||
echo.
|
||||
|
||||
:runAnt
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dderby.system.home="..\data" -Dderby.storage.fileSyncTransactionLog=true
|
||||
|
||||
REM Uncomment to enable YourKit profiling
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS="-Xrunyjpagent"
|
||||
|
||||
REM Uncomment to enable remote debugging
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
|
||||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="browse"
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
|
||||
goto end
|
||||
|
||||
|
||||
:end
|
||||
set LOCALCLASSPATH=
|
||||
set _JAVACMD=
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=
|
||||
|
||||
if "%OS%"=="Windows_NT" @endlocal
|
||||
|
||||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
|
|
|
@ -1,139 +1,139 @@
|
|||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
|
||||
|
||||
if "%OS%"=="Windows_NT" @setlocal
|
||||
|
||||
rem %~dp0 is expanded pathname of the current script under NT
|
||||
set DEFAULT_ACTIVEMQ_HOME=%~dp0..
|
||||
|
||||
if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
|
||||
set DEFAULT_ACTIVEMQ_HOME=
|
||||
|
||||
rem Assume first parameter is broker name
|
||||
set BROKER_NAME=%1
|
||||
if "%BROKER_NAME%" == "--help" goto dispHelp
|
||||
if "%BROKER_NAME%" == "-h" goto dispHelp
|
||||
if "%BROKER_NAME%" == "-?" goto dispHelp
|
||||
if "%BROKER_NAME%" == "" set BROKER_NAME=*
|
||||
|
||||
shift
|
||||
|
||||
rem Slurp the command line arguments. This loop allows for an unlimited number
|
||||
rem of arguments (up to the command line limit, anyway).
|
||||
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%1
|
||||
if ""%1""=="""" goto doneStart
|
||||
shift
|
||||
:setupArgs
|
||||
if ""%1""=="""" goto doneStart
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%ACTIVEMQ_CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setupArgs
|
||||
|
||||
rem This label provides a place for the argument list loop to break out
|
||||
rem and for NT handling to skip to.
|
||||
|
||||
:doneStart
|
||||
rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
|
||||
rem by the user or the %0 problem on Windows 9x
|
||||
if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
|
||||
|
||||
rem check for activemq in Program Files on system drive
|
||||
if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkSystemDrive
|
||||
rem check for activemq in root directory of system drive
|
||||
if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkCDrive
|
||||
rem check for activemq in C:\activemq for Win9X users
|
||||
if not exist C:\activemq\README.txt goto noAntHome
|
||||
set ACTIVEMQ_HOME=C:\activemq
|
||||
goto checkJava
|
||||
|
||||
:noAntHome
|
||||
echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
|
||||
goto end
|
||||
|
||||
:checkJava
|
||||
set _JAVACMD=%JAVACMD%
|
||||
set LOCALCLASSPATH=%CLASSPATH%
|
||||
|
||||
set JAVA_EXT_DIRS=%JAVA_HOME%\lib\ext;%ACTIVEMQ_HOME%;%ACTIVEMQ_HOME%\lib;%ACTIVEMQ_HOME%\lib\optional
|
||||
|
||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
|
||||
goto runAnt
|
||||
|
||||
:noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
|
||||
echo.
|
||||
echo Warning: JAVA_HOME environment variable is not set.
|
||||
echo.
|
||||
|
||||
:runAnt
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dderby.system.home="..\data" -Dderby.storage.fileSyncTransactionLog=true
|
||||
|
||||
REM Uncomment to enable YourKit profiling
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS="-Xrunyjpagent"
|
||||
|
||||
REM Uncomment to enable remote debugging
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
|
||||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="query"
|
||||
|
||||
rem Select all components that belongs to the specified broker except advisory topics
|
||||
rem and display the specified attributes
|
||||
set QUERY_PARAM=--objname "Type=*,BrokerName=%BROKER_NAME%" "-xQTopic=ActiveMQ.Advisory.*" --view "Type,BrokerName,Destination,ConnectorName,EnqueueCount,DequeueCount,TotalEnqueueCount,TotalDequeueCount,Messages,TotalMessages,ConsumerCount,TotalConsumerCount,DispatchQueueSize"
|
||||
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %QUERY_PARAM% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
goto end
|
||||
|
||||
:dispHelp
|
||||
|
||||
echo.
|
||||
echo Performs a predefined query that displays useful statistics regarding the specified broker.
|
||||
echo If no broker name is specified, it will try and select from all registered brokers.
|
||||
echo Usage: bstat [brokerName] [--jmxurl url]
|
||||
echo.
|
||||
|
||||
goto end
|
||||
|
||||
:end
|
||||
set LOCALCLASSPATH=
|
||||
set _JAVACMD=
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=
|
||||
|
||||
if "%OS%"=="Windows_NT" @endlocal
|
||||
|
||||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
|
||||
|
||||
if "%OS%"=="Windows_NT" @setlocal
|
||||
|
||||
rem %~dp0 is expanded pathname of the current script under NT
|
||||
set DEFAULT_ACTIVEMQ_HOME=%~dp0..
|
||||
|
||||
if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
|
||||
set DEFAULT_ACTIVEMQ_HOME=
|
||||
|
||||
rem Assume first parameter is broker name
|
||||
set BROKER_NAME=%1
|
||||
if "%BROKER_NAME%" == "--help" goto dispHelp
|
||||
if "%BROKER_NAME%" == "-h" goto dispHelp
|
||||
if "%BROKER_NAME%" == "-?" goto dispHelp
|
||||
if "%BROKER_NAME%" == "" set BROKER_NAME=*
|
||||
|
||||
shift
|
||||
|
||||
rem Slurp the command line arguments. This loop allows for an unlimited number
|
||||
rem of arguments (up to the command line limit, anyway).
|
||||
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%1
|
||||
if ""%1""=="""" goto doneStart
|
||||
shift
|
||||
:setupArgs
|
||||
if ""%1""=="""" goto doneStart
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%ACTIVEMQ_CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setupArgs
|
||||
|
||||
rem This label provides a place for the argument list loop to break out
|
||||
rem and for NT handling to skip to.
|
||||
|
||||
:doneStart
|
||||
rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
|
||||
rem by the user or the %0 problem on Windows 9x
|
||||
if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
|
||||
|
||||
rem check for activemq in Program Files on system drive
|
||||
if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkSystemDrive
|
||||
rem check for activemq in root directory of system drive
|
||||
if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkCDrive
|
||||
rem check for activemq in C:\activemq for Win9X users
|
||||
if not exist C:\activemq\README.txt goto noAntHome
|
||||
set ACTIVEMQ_HOME=C:\activemq
|
||||
goto checkJava
|
||||
|
||||
:noAntHome
|
||||
echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
|
||||
goto end
|
||||
|
||||
:checkJava
|
||||
set _JAVACMD=%JAVACMD%
|
||||
set LOCALCLASSPATH=%CLASSPATH%
|
||||
|
||||
set JAVA_EXT_DIRS=%JAVA_HOME%\lib\ext;%ACTIVEMQ_HOME%;%ACTIVEMQ_HOME%\lib;%ACTIVEMQ_HOME%\lib\optional
|
||||
|
||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
|
||||
goto runAnt
|
||||
|
||||
:noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
|
||||
echo.
|
||||
echo Warning: JAVA_HOME environment variable is not set.
|
||||
echo.
|
||||
|
||||
:runAnt
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dderby.system.home="..\data" -Dderby.storage.fileSyncTransactionLog=true
|
||||
|
||||
REM Uncomment to enable YourKit profiling
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS="-Xrunyjpagent"
|
||||
|
||||
REM Uncomment to enable remote debugging
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
|
||||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="query"
|
||||
|
||||
rem Select all components that belongs to the specified broker except advisory topics
|
||||
rem and display the specified attributes
|
||||
set QUERY_PARAM=--objname "Type=*,BrokerName=%BROKER_NAME%" "-xQTopic=ActiveMQ.Advisory.*" --view "Type,BrokerName,Destination,ConnectorName,EnqueueCount,DequeueCount,TotalEnqueueCount,TotalDequeueCount,Messages,TotalMessages,ConsumerCount,TotalConsumerCount,DispatchQueueSize"
|
||||
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %QUERY_PARAM% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
goto end
|
||||
|
||||
:dispHelp
|
||||
|
||||
echo.
|
||||
echo Performs a predefined query that displays useful statistics regarding the specified broker.
|
||||
echo If no broker name is specified, it will try and select from all registered brokers.
|
||||
echo Usage: bstat [brokerName] [--jmxurl url]
|
||||
echo.
|
||||
|
||||
goto end
|
||||
|
||||
:end
|
||||
set LOCALCLASSPATH=
|
||||
set _JAVACMD=
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=
|
||||
|
||||
if "%OS%"=="Windows_NT" @endlocal
|
||||
|
||||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
set _CLASSPATHCOMPONENT=%1
|
||||
if ""%1""=="""" goto gotAllArgs
|
||||
shift
|
||||
|
||||
:argCheck
|
||||
if ""%1""=="""" goto gotAllArgs
|
||||
set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
|
||||
shift
|
||||
goto argCheck
|
||||
|
||||
:gotAllArgs
|
||||
set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
|
||||
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
set _CLASSPATHCOMPONENT=%1
|
||||
if ""%1""=="""" goto gotAllArgs
|
||||
shift
|
||||
|
||||
:argCheck
|
||||
if ""%1""=="""" goto gotAllArgs
|
||||
set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
|
||||
shift
|
||||
goto argCheck
|
||||
|
||||
:gotAllArgs
|
||||
set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
|
||||
|
||||
|
||||
|
|
|
@ -1,115 +1,115 @@
|
|||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
|
||||
|
||||
if "%OS%"=="Windows_NT" @setlocal
|
||||
|
||||
rem %~dp0 is expanded pathname of the current script under NT
|
||||
set DEFAULT_ACTIVEMQ_HOME=%~dp0..
|
||||
|
||||
if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
|
||||
set DEFAULT_ACTIVEMQ_HOME=
|
||||
|
||||
rem Slurp the command line arguments. This loop allows for an unlimited number
|
||||
rem of arguments (up to the command line limit, anyway).
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%1
|
||||
if ""%1""=="""" goto doneStart
|
||||
shift
|
||||
:setupArgs
|
||||
if ""%1""=="""" goto doneStart
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%ACTIVEMQ_CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setupArgs
|
||||
rem This label provides a place for the argument list loop to break out
|
||||
rem and for NT handling to skip to.
|
||||
|
||||
:doneStart
|
||||
rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
|
||||
rem by the user or the %0 problem on Windows 9x
|
||||
if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
|
||||
|
||||
rem check for activemq in Program Files on system drive
|
||||
if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkSystemDrive
|
||||
rem check for activemq in root directory of system drive
|
||||
if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkCDrive
|
||||
rem check for activemq in C:\activemq for Win9X users
|
||||
if not exist C:\activemq\README.txt goto noAntHome
|
||||
set ACTIVEMQ_HOME=C:\activemq
|
||||
goto checkJava
|
||||
|
||||
:noAntHome
|
||||
echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
|
||||
goto end
|
||||
|
||||
:checkJava
|
||||
set _JAVACMD=%JAVACMD%
|
||||
set LOCALCLASSPATH=%CLASSPATH%
|
||||
|
||||
set JAVA_EXT_DIRS=%JAVA_HOME%\lib\ext;%ACTIVEMQ_HOME%;%ACTIVEMQ_HOME%\lib;%ACTIVEMQ_HOME%\lib\optional
|
||||
|
||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
|
||||
goto runAnt
|
||||
|
||||
:noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
|
||||
echo.
|
||||
echo Warning: JAVA_HOME environment variable is not set.
|
||||
echo.
|
||||
|
||||
:runAnt
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dderby.system.home="..\data" -Dderby.storage.fileSyncTransactionLog=true
|
||||
|
||||
REM Uncomment to enable YourKit profiling
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS="-Xrunyjpagent"
|
||||
|
||||
REM Uncomment to enable remote debugging
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
|
||||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="list"
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
|
||||
goto end
|
||||
|
||||
|
||||
:end
|
||||
set LOCALCLASSPATH=
|
||||
set _JAVACMD=
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=
|
||||
|
||||
if "%OS%"=="Windows_NT" @endlocal
|
||||
|
||||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
|
||||
|
||||
if "%OS%"=="Windows_NT" @setlocal
|
||||
|
||||
rem %~dp0 is expanded pathname of the current script under NT
|
||||
set DEFAULT_ACTIVEMQ_HOME=%~dp0..
|
||||
|
||||
if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
|
||||
set DEFAULT_ACTIVEMQ_HOME=
|
||||
|
||||
rem Slurp the command line arguments. This loop allows for an unlimited number
|
||||
rem of arguments (up to the command line limit, anyway).
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%1
|
||||
if ""%1""=="""" goto doneStart
|
||||
shift
|
||||
:setupArgs
|
||||
if ""%1""=="""" goto doneStart
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%ACTIVEMQ_CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setupArgs
|
||||
rem This label provides a place for the argument list loop to break out
|
||||
rem and for NT handling to skip to.
|
||||
|
||||
:doneStart
|
||||
rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
|
||||
rem by the user or the %0 problem on Windows 9x
|
||||
if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
|
||||
|
||||
rem check for activemq in Program Files on system drive
|
||||
if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkSystemDrive
|
||||
rem check for activemq in root directory of system drive
|
||||
if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkCDrive
|
||||
rem check for activemq in C:\activemq for Win9X users
|
||||
if not exist C:\activemq\README.txt goto noAntHome
|
||||
set ACTIVEMQ_HOME=C:\activemq
|
||||
goto checkJava
|
||||
|
||||
:noAntHome
|
||||
echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
|
||||
goto end
|
||||
|
||||
:checkJava
|
||||
set _JAVACMD=%JAVACMD%
|
||||
set LOCALCLASSPATH=%CLASSPATH%
|
||||
|
||||
set JAVA_EXT_DIRS=%JAVA_HOME%\lib\ext;%ACTIVEMQ_HOME%;%ACTIVEMQ_HOME%\lib;%ACTIVEMQ_HOME%\lib\optional
|
||||
|
||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
|
||||
goto runAnt
|
||||
|
||||
:noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
|
||||
echo.
|
||||
echo Warning: JAVA_HOME environment variable is not set.
|
||||
echo.
|
||||
|
||||
:runAnt
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dderby.system.home="..\data" -Dderby.storage.fileSyncTransactionLog=true
|
||||
|
||||
REM Uncomment to enable YourKit profiling
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS="-Xrunyjpagent"
|
||||
|
||||
REM Uncomment to enable remote debugging
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
|
||||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="list"
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
|
||||
goto end
|
||||
|
||||
|
||||
:end
|
||||
set LOCALCLASSPATH=
|
||||
set _JAVACMD=
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=
|
||||
|
||||
if "%OS%"=="Windows_NT" @endlocal
|
||||
|
||||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
|
|
|
@ -1,115 +1,115 @@
|
|||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
|
||||
|
||||
if "%OS%"=="Windows_NT" @setlocal
|
||||
|
||||
rem %~dp0 is expanded pathname of the current script under NT
|
||||
set DEFAULT_ACTIVEMQ_HOME=%~dp0..
|
||||
|
||||
if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
|
||||
set DEFAULT_ACTIVEMQ_HOME=
|
||||
|
||||
rem Slurp the command line arguments. This loop allows for an unlimited number
|
||||
rem of arguments (up to the command line limit, anyway).
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%1
|
||||
if ""%1""=="""" goto doneStart
|
||||
shift
|
||||
:setupArgs
|
||||
if ""%1""=="""" goto doneStart
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%ACTIVEMQ_CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setupArgs
|
||||
rem This label provides a place for the argument list loop to break out
|
||||
rem and for NT handling to skip to.
|
||||
|
||||
:doneStart
|
||||
rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
|
||||
rem by the user or the %0 problem on Windows 9x
|
||||
if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
|
||||
|
||||
rem check for activemq in Program Files on system drive
|
||||
if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkSystemDrive
|
||||
rem check for activemq in root directory of system drive
|
||||
if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkCDrive
|
||||
rem check for activemq in C:\activemq for Win9X users
|
||||
if not exist C:\activemq\README.txt goto noAntHome
|
||||
set ACTIVEMQ_HOME=C:\activemq
|
||||
goto checkJava
|
||||
|
||||
:noAntHome
|
||||
echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
|
||||
goto end
|
||||
|
||||
:checkJava
|
||||
set _JAVACMD=%JAVACMD%
|
||||
set LOCALCLASSPATH=%CLASSPATH%
|
||||
|
||||
set JAVA_EXT_DIRS=%JAVA_HOME%\lib\ext;%ACTIVEMQ_HOME%;%ACTIVEMQ_HOME%\lib;%ACTIVEMQ_HOME%\lib\optional
|
||||
|
||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
|
||||
goto runAnt
|
||||
|
||||
:noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
|
||||
echo.
|
||||
echo Warning: JAVA_HOME environment variable is not set.
|
||||
echo.
|
||||
|
||||
:runAnt
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dderby.system.home="..\data" -Dderby.storage.fileSyncTransactionLog=true
|
||||
|
||||
REM Uncomment to enable YourKit profiling
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS="-Xrunyjpagent"
|
||||
|
||||
REM Uncomment to enable remote debugging
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
|
||||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="query"
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
|
||||
goto end
|
||||
|
||||
|
||||
:end
|
||||
set LOCALCLASSPATH=
|
||||
set _JAVACMD=
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=
|
||||
|
||||
if "%OS%"=="Windows_NT" @endlocal
|
||||
|
||||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
|
||||
|
||||
if "%OS%"=="Windows_NT" @setlocal
|
||||
|
||||
rem %~dp0 is expanded pathname of the current script under NT
|
||||
set DEFAULT_ACTIVEMQ_HOME=%~dp0..
|
||||
|
||||
if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
|
||||
set DEFAULT_ACTIVEMQ_HOME=
|
||||
|
||||
rem Slurp the command line arguments. This loop allows for an unlimited number
|
||||
rem of arguments (up to the command line limit, anyway).
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%1
|
||||
if ""%1""=="""" goto doneStart
|
||||
shift
|
||||
:setupArgs
|
||||
if ""%1""=="""" goto doneStart
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%ACTIVEMQ_CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setupArgs
|
||||
rem This label provides a place for the argument list loop to break out
|
||||
rem and for NT handling to skip to.
|
||||
|
||||
:doneStart
|
||||
rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
|
||||
rem by the user or the %0 problem on Windows 9x
|
||||
if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
|
||||
|
||||
rem check for activemq in Program Files on system drive
|
||||
if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkSystemDrive
|
||||
rem check for activemq in root directory of system drive
|
||||
if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkCDrive
|
||||
rem check for activemq in C:\activemq for Win9X users
|
||||
if not exist C:\activemq\README.txt goto noAntHome
|
||||
set ACTIVEMQ_HOME=C:\activemq
|
||||
goto checkJava
|
||||
|
||||
:noAntHome
|
||||
echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
|
||||
goto end
|
||||
|
||||
:checkJava
|
||||
set _JAVACMD=%JAVACMD%
|
||||
set LOCALCLASSPATH=%CLASSPATH%
|
||||
|
||||
set JAVA_EXT_DIRS=%JAVA_HOME%\lib\ext;%ACTIVEMQ_HOME%;%ACTIVEMQ_HOME%\lib;%ACTIVEMQ_HOME%\lib\optional
|
||||
|
||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
|
||||
goto runAnt
|
||||
|
||||
:noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
|
||||
echo.
|
||||
echo Warning: JAVA_HOME environment variable is not set.
|
||||
echo.
|
||||
|
||||
:runAnt
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dderby.system.home="..\data" -Dderby.storage.fileSyncTransactionLog=true
|
||||
|
||||
REM Uncomment to enable YourKit profiling
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS="-Xrunyjpagent"
|
||||
|
||||
REM Uncomment to enable remote debugging
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
|
||||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="query"
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
|
||||
goto end
|
||||
|
||||
|
||||
:end
|
||||
set LOCALCLASSPATH=
|
||||
set _JAVACMD=
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=
|
||||
|
||||
if "%OS%"=="Windows_NT" @endlocal
|
||||
|
||||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
|
|
|
@ -1,115 +1,115 @@
|
|||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
|
||||
|
||||
if "%OS%"=="Windows_NT" @setlocal
|
||||
|
||||
rem %~dp0 is expanded pathname of the current script under NT
|
||||
set DEFAULT_ACTIVEMQ_HOME=%~dp0..
|
||||
|
||||
if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
|
||||
set DEFAULT_ACTIVEMQ_HOME=
|
||||
|
||||
rem Slurp the command line arguments. This loop allows for an unlimited number
|
||||
rem of arguments (up to the command line limit, anyway).
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%1
|
||||
if ""%1""=="""" goto doneStart
|
||||
shift
|
||||
:setupArgs
|
||||
if ""%1""=="""" goto doneStart
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%ACTIVEMQ_CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setupArgs
|
||||
rem This label provides a place for the argument list loop to break out
|
||||
rem and for NT handling to skip to.
|
||||
|
||||
:doneStart
|
||||
rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
|
||||
rem by the user or the %0 problem on Windows 9x
|
||||
if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
|
||||
|
||||
rem check for activemq in Program Files on system drive
|
||||
if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkSystemDrive
|
||||
rem check for activemq in root directory of system drive
|
||||
if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkCDrive
|
||||
rem check for activemq in C:\activemq for Win9X users
|
||||
if not exist C:\activemq\README.txt goto noAntHome
|
||||
set ACTIVEMQ_HOME=C:\activemq
|
||||
goto checkJava
|
||||
|
||||
:noAntHome
|
||||
echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
|
||||
goto end
|
||||
|
||||
:checkJava
|
||||
set _JAVACMD=%JAVACMD%
|
||||
set LOCALCLASSPATH=%CLASSPATH%
|
||||
|
||||
set JAVA_EXT_DIRS=%JAVA_HOME%\lib\ext;%ACTIVEMQ_HOME%;%ACTIVEMQ_HOME%\lib;%ACTIVEMQ_HOME%\lib\optional
|
||||
|
||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
|
||||
goto runAnt
|
||||
|
||||
:noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
|
||||
echo.
|
||||
echo Warning: JAVA_HOME environment variable is not set.
|
||||
echo.
|
||||
|
||||
:runAnt
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dderby.system.home="..\data" -Dderby.storage.fileSyncTransactionLog=true
|
||||
|
||||
REM Uncomment to enable YourKit profiling
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS="-Xrunyjpagent"
|
||||
|
||||
REM Uncomment to enable remote debugging
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
|
||||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="stop"
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
|
||||
goto end
|
||||
|
||||
|
||||
:end
|
||||
set LOCALCLASSPATH=
|
||||
set _JAVACMD=
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=
|
||||
|
||||
if "%OS%"=="Windows_NT" @endlocal
|
||||
|
||||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
if exist "%HOME%\activemqrc_pre.bat" call "%HOME%\activemqrc_pre.bat"
|
||||
|
||||
if "%OS%"=="Windows_NT" @setlocal
|
||||
|
||||
rem %~dp0 is expanded pathname of the current script under NT
|
||||
set DEFAULT_ACTIVEMQ_HOME=%~dp0..
|
||||
|
||||
if "%ACTIVEMQ_HOME%"=="" set ACTIVEMQ_HOME=%DEFAULT_ACTIVEMQ_HOME%
|
||||
set DEFAULT_ACTIVEMQ_HOME=
|
||||
|
||||
rem Slurp the command line arguments. This loop allows for an unlimited number
|
||||
rem of arguments (up to the command line limit, anyway).
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%1
|
||||
if ""%1""=="""" goto doneStart
|
||||
shift
|
||||
:setupArgs
|
||||
if ""%1""=="""" goto doneStart
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=%ACTIVEMQ_CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setupArgs
|
||||
rem This label provides a place for the argument list loop to break out
|
||||
rem and for NT handling to skip to.
|
||||
|
||||
:doneStart
|
||||
rem find ACTIVEMQ_HOME if it does not exist due to either an invalid value passed
|
||||
rem by the user or the %0 problem on Windows 9x
|
||||
if exist "%ACTIVEMQ_HOME%\README.txt" goto checkJava
|
||||
|
||||
rem check for activemq in Program Files on system drive
|
||||
if not exist "%SystemDrive%\Program Files\activemq" goto checkSystemDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\Program Files\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkSystemDrive
|
||||
rem check for activemq in root directory of system drive
|
||||
if not exist %SystemDrive%\activemq\README.txt goto checkCDrive
|
||||
set ACTIVEMQ_HOME=%SystemDrive%\activemq
|
||||
goto checkJava
|
||||
|
||||
:checkCDrive
|
||||
rem check for activemq in C:\activemq for Win9X users
|
||||
if not exist C:\activemq\README.txt goto noAntHome
|
||||
set ACTIVEMQ_HOME=C:\activemq
|
||||
goto checkJava
|
||||
|
||||
:noAntHome
|
||||
echo ACTIVEMQ_HOME is set incorrectly or activemq could not be located. Please set ACTIVEMQ_HOME.
|
||||
goto end
|
||||
|
||||
:checkJava
|
||||
set _JAVACMD=%JAVACMD%
|
||||
set LOCALCLASSPATH=%CLASSPATH%
|
||||
|
||||
set JAVA_EXT_DIRS=%JAVA_HOME%\lib\ext;%ACTIVEMQ_HOME%;%ACTIVEMQ_HOME%\lib;%ACTIVEMQ_HOME%\lib\optional
|
||||
|
||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
|
||||
goto runAnt
|
||||
|
||||
:noJavaHome
|
||||
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
|
||||
echo.
|
||||
echo Warning: JAVA_HOME environment variable is not set.
|
||||
echo.
|
||||
|
||||
:runAnt
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dderby.system.home="..\data" -Dderby.storage.fileSyncTransactionLog=true
|
||||
|
||||
REM Uncomment to enable YourKit profiling
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS="-Xrunyjpagent"
|
||||
|
||||
REM Uncomment to enable remote debugging
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
|
||||
set LOCALCLASSPATH=%ACTIVEMQ_HOME%\conf;%LOCALCLASSPATH%
|
||||
|
||||
set ACTIVEMQ_TASK="stop"
|
||||
"%_JAVACMD%" %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% -Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%LOCALCLASSPATH%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %ACTIVEMQ_TASK% %ACTIVEMQ_CMD_LINE_ARGS%
|
||||
|
||||
|
||||
goto end
|
||||
|
||||
|
||||
:end
|
||||
set LOCALCLASSPATH=
|
||||
set _JAVACMD=
|
||||
set ACTIVEMQ_CMD_LINE_ARGS=
|
||||
|
||||
if "%OS%"=="Windows_NT" @endlocal
|
||||
|
||||
:mainEnd
|
||||
if exist "%HOME%\activemqrc_post.bat" call "%HOME%\activemqrc_post.bat"
|
||||
|
||||
|
||||
|
|
|
@ -1,52 +1,52 @@
|
|||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
setlocal
|
||||
|
||||
rem Java Service Wrapper general NT service install script
|
||||
|
||||
|
||||
if "%OS%"=="Windows_NT" goto nt
|
||||
echo This script only works with NT-based versions of Windows.
|
||||
goto :eof
|
||||
|
||||
:nt
|
||||
rem
|
||||
rem Find the application home.
|
||||
rem
|
||||
rem %~dp0 is location of current script under NT
|
||||
set _REALPATH=%~dp0
|
||||
|
||||
set ACTIVEMQ_HOME=%~dp0..\..
|
||||
set ACTIVEMQ_BASE=%~dp0..\..
|
||||
|
||||
:conf
|
||||
set _WRAPPER_CONF="%ACTIVEMQ_HOME%\bin\win32\wrapper.conf"
|
||||
|
||||
set _ACTIVEMQ_HOME="set.ACTIVEMQ_HOME=%ACTIVEMQ_HOME%"
|
||||
set _ACTIVEMQ_BASE="set.ACTIVEMQ_BASE=%ACTIVEMQ_BASE%"
|
||||
|
||||
rem
|
||||
rem Install the Wrapper as an NT service.
|
||||
rem
|
||||
:startup
|
||||
"wrapper.exe" -i %_WRAPPER_CONF% %_ACTIVEMQ_HOME% %_ACTIVEMQ_BASE%
|
||||
if not errorlevel 1 goto :eof
|
||||
pause
|
||||
|
||||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
setlocal
|
||||
|
||||
rem Java Service Wrapper general NT service install script
|
||||
|
||||
|
||||
if "%OS%"=="Windows_NT" goto nt
|
||||
echo This script only works with NT-based versions of Windows.
|
||||
goto :eof
|
||||
|
||||
:nt
|
||||
rem
|
||||
rem Find the application home.
|
||||
rem
|
||||
rem %~dp0 is location of current script under NT
|
||||
set _REALPATH=%~dp0
|
||||
|
||||
set ACTIVEMQ_HOME=%~dp0..\..
|
||||
set ACTIVEMQ_BASE=%~dp0..\..
|
||||
|
||||
:conf
|
||||
set _WRAPPER_CONF="%ACTIVEMQ_HOME%\bin\win32\wrapper.conf"
|
||||
|
||||
set _ACTIVEMQ_HOME="set.ACTIVEMQ_HOME=%ACTIVEMQ_HOME%"
|
||||
set _ACTIVEMQ_BASE="set.ACTIVEMQ_BASE=%ACTIVEMQ_BASE%"
|
||||
|
||||
rem
|
||||
rem Install the Wrapper as an NT service.
|
||||
rem
|
||||
:startup
|
||||
"wrapper.exe" -i %_WRAPPER_CONF% %_ACTIVEMQ_HOME% %_ACTIVEMQ_BASE%
|
||||
if not errorlevel 1 goto :eof
|
||||
pause
|
||||
|
||||
|
|
|
@ -1,48 +1,48 @@
|
|||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
setlocal
|
||||
|
||||
rem Java Service Wrapper general NT service uninstall script
|
||||
|
||||
if "%OS%"=="Windows_NT" goto nt
|
||||
echo This script only works with NT-based versions of Windows.
|
||||
goto :eof
|
||||
|
||||
:nt
|
||||
rem
|
||||
rem Find the application home.
|
||||
rem
|
||||
rem %~dp0 is location of current script under NT
|
||||
set _REALPATH=%~dp0
|
||||
|
||||
set ACTIVEMQ_HOME=%~dp0\..\..
|
||||
|
||||
:conf
|
||||
set _WRAPPER_CONF="%ACTIVEMQ_HOME%\bin\win32\wrapper.conf"
|
||||
|
||||
|
||||
rem
|
||||
rem Uninstall the Wrapper as an NT service.
|
||||
rem
|
||||
:startup
|
||||
"%_APP_HOME%wrapper.exe" -r %_WRAPPER_CONF%
|
||||
if not errorlevel 1 goto :eof
|
||||
pause
|
||||
|
||||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
setlocal
|
||||
|
||||
rem Java Service Wrapper general NT service uninstall script
|
||||
|
||||
if "%OS%"=="Windows_NT" goto nt
|
||||
echo This script only works with NT-based versions of Windows.
|
||||
goto :eof
|
||||
|
||||
:nt
|
||||
rem
|
||||
rem Find the application home.
|
||||
rem
|
||||
rem %~dp0 is location of current script under NT
|
||||
set _REALPATH=%~dp0
|
||||
|
||||
set ACTIVEMQ_HOME=%~dp0\..\..
|
||||
|
||||
:conf
|
||||
set _WRAPPER_CONF="%ACTIVEMQ_HOME%\bin\win32\wrapper.conf"
|
||||
|
||||
|
||||
rem
|
||||
rem Uninstall the Wrapper as an NT service.
|
||||
rem
|
||||
:startup
|
||||
"%_APP_HOME%wrapper.exe" -r %_WRAPPER_CONF%
|
||||
if not errorlevel 1 goto :eof
|
||||
pause
|
||||
|
||||
|
|
|
@ -1,50 +1,50 @@
|
|||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
rem
|
||||
rem Find the application home.
|
||||
rem
|
||||
if "%OS%"=="Windows_NT" goto nt
|
||||
|
||||
echo This is not NT, so please edit this script and set _APP_HOME manually
|
||||
set _APP_HOME=..
|
||||
|
||||
goto conf
|
||||
|
||||
:nt
|
||||
rem %~dp0 is name of current script under NT
|
||||
set _APP_HOME=%~dp0
|
||||
|
||||
rem
|
||||
rem Find the wrapper.conf
|
||||
rem
|
||||
:conf
|
||||
set _WRAPPER_CONF=wrapper.conf
|
||||
|
||||
rem
|
||||
rem Run the application.
|
||||
rem At runtime, the current directory will be that of Wrapper.exe
|
||||
rem
|
||||
"%_APP_HOME%wrapper.exe" -c %_WRAPPER_CONF%
|
||||
if not errorlevel 1 goto end
|
||||
pause
|
||||
|
||||
:end
|
||||
set _APP_HOME=
|
||||
set _WRAPPER_CONF=
|
||||
@echo off
|
||||
|
||||
REM ------------------------------------------------------------------------
|
||||
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
REM contributor license agreements. See the NOTICE file distributed with
|
||||
REM this work for additional information regarding copyright ownership.
|
||||
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
REM (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM
|
||||
REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
REM
|
||||
REM Unless required by applicable law or agreed to in writing, software
|
||||
REM distributed under the License is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM See the License for the specific language governing permissions and
|
||||
REM limitations under the License.
|
||||
REM ------------------------------------------------------------------------
|
||||
|
||||
rem
|
||||
rem Find the application home.
|
||||
rem
|
||||
if "%OS%"=="Windows_NT" goto nt
|
||||
|
||||
echo This is not NT, so please edit this script and set _APP_HOME manually
|
||||
set _APP_HOME=..
|
||||
|
||||
goto conf
|
||||
|
||||
:nt
|
||||
rem %~dp0 is name of current script under NT
|
||||
set _APP_HOME=%~dp0
|
||||
|
||||
rem
|
||||
rem Find the wrapper.conf
|
||||
rem
|
||||
:conf
|
||||
set _WRAPPER_CONF=wrapper.conf
|
||||
|
||||
rem
|
||||
rem Run the application.
|
||||
rem At runtime, the current directory will be that of Wrapper.exe
|
||||
rem
|
||||
"%_APP_HOME%wrapper.exe" -c %_WRAPPER_CONF%
|
||||
if not errorlevel 1 goto end
|
||||
pause
|
||||
|
||||
:end
|
||||
set _APP_HOME=
|
||||
set _WRAPPER_CONF=
|
||||
|
|
Loading…
Reference in New Issue