2009-09-05 16:46:41 +00:00
|
|
|
NAME=svg-edit
|
2010-09-01 09:20:05 +00:00
|
|
|
VERSION=2.6
|
2009-09-05 16:46:41 +00:00
|
|
|
PACKAGE=$(NAME)-$(VERSION)
|
2010-03-28 13:59:52 +00:00
|
|
|
MAKEDOCS=naturaldocs/NaturalDocs
|
|
|
|
CLOSURE=build/tools/closure-compiler.jar
|
|
|
|
YUICOMPRESS=build/tools/yuicompressor.jar
|
2009-09-05 16:46:41 +00:00
|
|
|
ZIP=zip
|
|
|
|
|
|
|
|
all: release firefox opera
|
|
|
|
|
|
|
|
build/$(PACKAGE):
|
2009-10-09 19:15:18 +00:00
|
|
|
rm -rf config
|
|
|
|
mkdir config
|
2010-03-28 13:59:52 +00:00
|
|
|
if [ -x $(MAKEDOCS) ] ; then $(MAKEDOCS) -i editor/ -o html docs/ -p config/ -oft -r ; fi
|
2009-09-05 16:46:41 +00:00
|
|
|
mkdir -p build/$(PACKAGE)
|
2009-09-05 18:52:39 +00:00
|
|
|
cp -r editor/* build/$(PACKAGE)
|
2009-09-05 16:46:41 +00:00
|
|
|
-find build/$(PACKAGE) -name .svn -type d -exec rm -rf {} \;
|
|
|
|
# minify spin button
|
2010-03-28 13:59:52 +00:00
|
|
|
java -jar $(YUICOMPRESS) build/$(PACKAGE)/spinbtn/JQuerySpinBtn.js > build/$(PACKAGE)/spinbtn/JQuerySpinBtn.min.js
|
2009-09-05 16:46:41 +00:00
|
|
|
# minify SVG-edit files
|
2010-03-28 13:59:52 +00:00
|
|
|
java -jar $(YUICOMPRESS) build/$(PACKAGE)/svg-editor.js > build/$(PACKAGE)/svg-editor.min.js
|
|
|
|
java -jar $(YUICOMPRESS) build/$(PACKAGE)/svgcanvas.js > build/$(PACKAGE)/svgcanvas.min.js
|
2010-10-28 16:47:39 +00:00
|
|
|
|
2010-10-29 05:23:25 +00:00
|
|
|
# codedread: NOTE: Some files are not ready for the Closure compiler: (jquery)
|
|
|
|
java -jar $(CLOSURE) \
|
|
|
|
--js browsersupport.js \
|
|
|
|
--js svgtransformlist.js \
|
|
|
|
--js math.js \
|
2010-11-05 17:03:26 +00:00
|
|
|
--js units.js \
|
2010-10-29 05:23:25 +00:00
|
|
|
--js svgutils.js \
|
2010-11-07 20:14:05 +00:00
|
|
|
--js sanitize.js \
|
2010-10-29 05:23:25 +00:00
|
|
|
--js svgcanvas.js \
|
|
|
|
--js svg-editor.js \
|
|
|
|
--js locale/locale.js \
|
|
|
|
--js_output_file svgedit.compiled.js
|
2010-10-28 16:47:39 +00:00
|
|
|
|
2009-09-05 16:46:41 +00:00
|
|
|
# CSS files do not work remotely
|
2010-03-28 13:59:52 +00:00
|
|
|
# java -jar $(YUICOMPRESS) build/$(PACKAGE)/spinbtn/JQuerySpinBtn.css > build/$(PACKAGE)/spinbtn/JQuerySpinBtn.min.css
|
|
|
|
# java -jar $(YUICOMPRESS) build/$(PACKAGE)/svg-editor.css > build/$(PACKAGE)/svg-editor.min.css
|
2009-09-05 16:46:41 +00:00
|
|
|
|
|
|
|
release: build/$(PACKAGE)
|
2009-09-05 18:36:44 +00:00
|
|
|
cd build ; $(ZIP) $(PACKAGE).zip -r $(PACKAGE) ; cd ..
|
2010-09-09 16:36:17 +00:00
|
|
|
tar -z -c -f build/$(PACKAGE)-src.tar.gz \
|
|
|
|
--exclude-vcs \
|
|
|
|
--exclude='build/*' \
|
|
|
|
.
|
2009-09-05 16:46:41 +00:00
|
|
|
|
|
|
|
firefox: build/$(PACKAGE)
|
2009-09-05 18:46:53 +00:00
|
|
|
mkdir -p build/firefox/content/editor
|
2009-09-05 18:52:39 +00:00
|
|
|
cp -r firefox-extension/* build/firefox
|
2009-09-05 18:46:53 +00:00
|
|
|
rm -rf build/firefox/content/.svn
|
2009-09-05 18:52:39 +00:00
|
|
|
cp -r build/$(PACKAGE)/* build/firefox/content/editor
|
2009-09-05 18:36:44 +00:00
|
|
|
cd build/firefox ; $(ZIP) ../$(PACKAGE).xpi -r * ; cd ../..
|
2009-09-05 16:46:41 +00:00
|
|
|
|
|
|
|
opera: build/$(PACKAGE)
|
|
|
|
mkdir -p build/opera/editor
|
2009-09-05 18:52:39 +00:00
|
|
|
cp opera-widget/* build/opera
|
|
|
|
cp -r build/$(PACKAGE)/* build/opera/editor
|
2009-09-05 18:36:44 +00:00
|
|
|
cd build/opera ; $(ZIP) ../$(PACKAGE).wgt -r * ; cd ../..
|
2009-09-05 16:46:41 +00:00
|
|
|
|
|
|
|
clean:
|
2009-10-09 19:15:18 +00:00
|
|
|
rm -rf config
|
2009-09-05 16:46:41 +00:00
|
|
|
rm -rf build/$(PACKAGE)
|
|
|
|
rm -rf build/firefox
|
|
|
|
rm -rf build/opera
|