2017-08-11 01:58:46 +02:00
2018-02-02 22:18:33 +01:00
BUILDDIR = build/htdocs/os
2017-08-14 00:20:19 +02:00
BLUE = \0 33[ 1; 34m
2017-08-11 01:58:46 +02:00
NC = \0 33[ 0m
2017-08-16 00:27:32 +02:00
coffees = src/core/core.coffee\
2017-08-14 00:20:19 +02:00
src/core/api.coffee\
2018-02-27 16:40:36 +01:00
src/core/settings.coffee\
2017-08-27 23:40:02 +02:00
src/core/handlers/RemoteHandler.coffee\
2018-01-23 18:16:41 +01:00
src/core/vfs.coffee\
2018-02-13 20:27:41 +01:00
src/core/vfs/GoogleDriveHandler.coffee\
2018-02-05 19:05:41 +01:00
src/core/db.coffee\
2018-01-23 18:16:41 +01:00
src/core/gui.coffee\
2017-08-16 00:27:32 +02:00
src/core/BaseModel.coffee\
src/core/BaseApplication.coffee\
src/core/BaseService.coffee\
src/core/BaseEvent.coffee\
2017-08-24 01:53:13 +02:00
src/core/BaseDialog.coffee\
2017-08-11 01:58:46 +02:00
src/antos.coffee
2017-08-17 00:42:05 +02:00
2017-08-11 01:58:46 +02:00
2018-02-05 19:05:41 +01:00
packages = CoreServices NotePad wTerm ActivityMonitor DummyApp Files MarkOn MarketPlace Blogger
2017-08-14 00:20:19 +02:00
2018-01-22 19:59:08 +01:00
main : build_coffees build_tags build_themes schemes libs build_packages
2017-08-11 01:58:46 +02:00
- cp src/index.html $( BUILDDIR) /
2018-01-22 19:59:08 +01:00
lite : build_coffee build_tag build_theme schemes build_packages
2017-08-11 01:58:46 +02:00
#%.js: %.coffee
# coffee --compile $<
2017-08-16 00:27:32 +02:00
build_coffees :
2017-08-26 16:50:13 +02:00
@echo " $( BLUE) Building coffee files $( NC) "
2017-08-11 01:58:46 +02:00
- mkdir $( BUILDDIR) /scripts
- rm $( BUILDDIR) /scripts/antos.js
2018-01-22 19:59:08 +01:00
- rm $( BUILDDIR) /scripts/antos.coffee
2017-08-11 01:58:46 +02:00
for f in $( coffees) ; do ( cat " $$ {f} " ; echo ) >> $( BUILDDIR) /scripts/antos.coffee; done
coffee --compile $( BUILDDIR) /scripts/antos.coffee
- rm $( BUILDDIR) /scripts/antos.coffee
libs :
2017-08-26 16:50:13 +02:00
@echo " $( BLUE) Copy lib files $( NC) "
2017-08-14 00:20:19 +02:00
cp -rf src/libs/* $( BUILDDIR) /scripts/
2017-08-11 01:58:46 +02:00
schemes :
2017-08-26 16:50:13 +02:00
@echo " $( BLUE) Copy schemes files $( NC) "
2017-08-11 01:58:46 +02:00
- mkdir -p $( BUILDDIR) /resources/schemes
2017-08-16 00:27:32 +02:00
cp src/core/schemes/* $( BUILDDIR) /resources/schemes/
2017-08-26 16:50:13 +02:00
testdata :
@echo " $( BLUE) Copy JSON test files $( NC) "
- mkdir -p $( BUILDDIR) /resources/jsons
cp src/core/handlers/jsons/* $( BUILDDIR) /resources/jsons
2017-08-16 00:27:32 +02:00
build_tags :
2017-08-26 16:50:13 +02:00
@echo " $( BLUE) Building tag files $( NC) "
2017-08-11 01:58:46 +02:00
-mkdir $( BUILDDIR) /resources
-rm $( BUILDDIR) /resources/antos_tags.js
2017-08-17 00:42:05 +02:00
for f in src/core/tags/*; do ( cat " $$ {f} " ; echo ) >> $( BUILDDIR) /resources/antos_tags.js; done
2017-08-11 01:58:46 +02:00
2017-08-16 00:27:32 +02:00
build_themes : antos_themes_build
2017-08-11 01:58:46 +02:00
antos_themes_build :
2017-08-26 16:50:13 +02:00
@echo " $( BLUE) Building themes name: antos $( NC) "
2017-08-14 00:20:19 +02:00
-rm -rf $( BUILDDIR) /resources/themes/antos/*
2017-08-11 01:58:46 +02:00
-mkdir -p $( BUILDDIR) /resources/themes/antos
2017-08-17 00:42:05 +02:00
for f in src/themes/antos/*.css; do ( cat " $$ {f} " ; echo ) >> $( BUILDDIR) /resources/themes/antos/antos.css; done
2017-08-11 01:58:46 +02:00
-mkdir -p $( BUILDDIR) /resources/themes/antos/fonts
2017-08-16 00:27:32 +02:00
cp -rf src/themes/antos/fonts/* $( BUILDDIR) /resources/themes/antos/fonts
2018-02-19 18:54:51 +01:00
cp src/themes/antos/wp* $( BUILDDIR) /resources/themes/antos/
2017-08-11 01:58:46 +02:00
2017-08-14 00:20:19 +02:00
build_packages :
2017-08-11 01:58:46 +02:00
- mkdir $( BUILDDIR) /packages
2017-08-15 02:56:04 +02:00
- for d in $( packages) ; do ( test -d $( BUILDDIR) /packages/$$ d && rm -rf $( BUILDDIR) /packages/$$ d/* ) ; done
2017-08-14 00:20:19 +02:00
for d in $( packages) ; do ( cd src/packages/$$ d; make) ; done
for d in $( packages) ; do ( test -d $( BUILDDIR) /packages/$$ d || mkdir -p $( BUILDDIR) /packages/$$ d && cp -rf src/packages/$$ d/build/* $( BUILDDIR) /packages/$$ d/) ; done
for d in $( packages) ; do ( test -d src/packages/$$ d/build && rm -r src/packages/$$ d/build ) ; done
2018-02-13 04:59:08 +01:00
package :
read -r -p "Enter package name: " PKG; \
test -d $( BUILDDIR) /packages/$$ PKG && rm -rf $( BUILDDIR) /packages/$$ PKG/*; \
cd src/packages/$$ PKG && make; \
cd ../../../; \
test -d $( BUILDDIR) /packages/$$ PKG || mkdir -p $( BUILDDIR) /packages/$$ PKG; \
cp -rf src/packages/$$ PKG/build/* $( BUILDDIR) /packages/$$ PKG/; \
test -d src/packages/$$ PKG/build && rm -r src/packages/$$ PKG/build;
2017-08-11 01:58:46 +02:00
clean :
rm -rf $( BUILDDIR) /*