create one Makefile in the top root directory (WIP - need to remove build path from resulting archives)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@563 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
ZIP = zip
|
||||
PACKAGE = svgedit-2.3
|
||||
FILEMASK = \*.html \*.css \*.js \*.txt \*.png \*.jpg \*.gif \*.svg \*.xml \*.manifest \*.rdf \*.xul
|
||||
|
||||
clean:
|
||||
rm -f *.*~
|
||||
rm -rf ./content/editor/
|
||||
|
||||
all: clean
|
||||
rm -f $(PACKAGE).xpi
|
||||
cp -r ../editor ./content/
|
||||
$(ZIP) $(PACKAGE).xpi -r . -i $(FILEMASK)
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
DST="content/editor"
|
||||
if [ -e "${DST}" ]; then
|
||||
rm -rf "${DST}"
|
||||
fi
|
||||
cp -R ../editor content/
|
||||
SVNS=`find content/editor -name '.svn'`
|
||||
rm -rf ${SVNS}
|
||||
@@ -1,2 +1,2 @@
|
||||
content SVG-edit content/
|
||||
overlay chrome://browser/content/browser.xul chrome://SVG-edit/content/SVG-edit-overlay.xul
|
||||
content svg-edit content/
|
||||
overlay chrome://browser/content/browser.xul chrome://svg-edit/content/svg-edit-overlay.xul
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
function start_svg_edit() {
|
||||
var url = "chrome://SVG-edit/content/editor/svg-editor.html";
|
||||
|
||||
window.openDialog(url, "SVG Editor",
|
||||
"width=1024,height=700,menubar=no,toolbar=no");
|
||||
}
|
||||
4
firefox-extension/content/svg-edit-overlay.js
Normal file
4
firefox-extension/content/svg-edit-overlay.js
Normal file
@@ -0,0 +1,4 @@
|
||||
function start_svg_edit() {
|
||||
var url = "chrome://svg-edit/content/editor/svg-editor.html";
|
||||
window.openDialog(url, "SVG Editor", "width=1024,height=700,menubar=no,toolbar=no");
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<script type="application/x-javascript"
|
||||
src="chrome://SVG-edit/content/SVG-edit-overlay.js" />
|
||||
src="chrome://svg-edit/content/svg-edit-overlay.js" />
|
||||
|
||||
<menupopup id="menu_ToolsPopup">
|
||||
<menuitem insertafter="devToolsSeparator" label="SVG Editor"
|
||||
@@ -1,7 +1,7 @@
|
||||
// Note: This JavaScript file must be included as the last script on the main HTML editor page to override the open/save handlers
|
||||
$(function() {
|
||||
if(!window.Components) return;
|
||||
|
||||
|
||||
function moz_file_picker(readflag) {
|
||||
var fp = window.Components.classes["@mozilla.org/filepicker;1"].
|
||||
createInstance(Components.interfaces.nsIFilePicker);
|
||||
@@ -13,7 +13,7 @@ $(function() {
|
||||
fp.show();
|
||||
return fp.file;
|
||||
}
|
||||
|
||||
|
||||
svgCanvas.setCustomHandlers({
|
||||
'open':function() {
|
||||
try {
|
||||
@@ -22,12 +22,12 @@ $(function() {
|
||||
var file = moz_file_picker(true);
|
||||
if(!file)
|
||||
return(null);
|
||||
|
||||
var inputStream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
|
||||
inputStream.init(file, 0x01, 00004, null);
|
||||
var sInputStream = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream);
|
||||
sInputStream.init(inputStream);
|
||||
svgCanvas.setSvgString(sInputStream.
|
||||
|
||||
var inputStream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
|
||||
inputStream.init(file, 0x01, 00004, null);
|
||||
var sInputStream = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream);
|
||||
sInputStream.init(inputStream);
|
||||
svgCanvas.setSvgString(sInputStream.
|
||||
read(sInputStream.available()));
|
||||
} catch(e) {
|
||||
console.log("Exception while attempting to load" + e);
|
||||
@@ -38,10 +38,10 @@ $(function() {
|
||||
var file = moz_file_picker(false);
|
||||
if(!file)
|
||||
return;
|
||||
|
||||
|
||||
if (!file.exists())
|
||||
file.create(0, 0664);
|
||||
|
||||
|
||||
var out = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
|
||||
out.init(file, 0x20 | 0x02, 00004,null);
|
||||
out.write(str, str.length);
|
||||
@@ -52,4 +52,4 @@ $(function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<!-- required properties -->
|
||||
<em:id>svg-edit@googlegroups.com</em:id>
|
||||
<em:version>2.2</em:version>
|
||||
<em:version>2.3</em:version>
|
||||
<em:type>2</em:type>
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
./build.sh
|
||||
zip -r ../svg-edit.xpi *
|
||||
13
minify.sh
13
minify.sh
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
YUI=yuicompressor-*.jar
|
||||
|
||||
# minify spin button
|
||||
java -jar $YUI editor/spinbtn/JQuerySpinBtn.js > editor/spinbtn/JQuerySpinBtn.min.js
|
||||
|
||||
# minify SVG-edit files
|
||||
java -jar $YUI editor/svg-editor.js > editor/svg-editor.min.js
|
||||
java -jar $YUI editor/svgcanvas.js > editor/svgcanvas.min.js
|
||||
|
||||
# CSS files do not work remotely
|
||||
# java -jar $YUI editor/spinbtn/JQuerySpinBtn.css > editor/spinbtn/JQuerySpinBtn.min.css
|
||||
# java -jar $YUI editor/svg-editor.css > editor/svg-editor.min.css
|
||||
@@ -1,12 +0,0 @@
|
||||
ZIP = zip
|
||||
PACKAGE = svgedit-2.3
|
||||
FILEMASK = \*.html \*.css \*.js \*.txt \*.png \*.jpg \*.gif \*.svg \*.xml
|
||||
|
||||
clean:
|
||||
rm -f *.*~
|
||||
rm -rf ./editor/
|
||||
|
||||
all: clean
|
||||
rm -f $(PACKAGE).wgt
|
||||
cp -r ../editor .
|
||||
$(ZIP) $(PACKAGE).wgt -r . -i $(FILEMASK)
|
||||
@@ -8,7 +8,7 @@
|
||||
<height>600</height>
|
||||
<id>
|
||||
<name>SVG Edit</name>
|
||||
<revised>2009-08</revised>
|
||||
<revised>2009-09</revised>
|
||||
</id>
|
||||
<feature name="http://xmlns.opera.com/fileio">
|
||||
<param name="folderhint" value="home" />
|
||||
|
||||
Reference in New Issue
Block a user