2020-04-29 07:14:16 -05:00
MAKEFLAGS = --no-builtin-rules
2019-12-23 11:59:16 -06:00
CTAGS = ctags
2021-05-20 11:18:55 -05:00
BUILT_SOURCES = node_modules
2015-05-19 06:29:55 -05:00
2019-03-15 11:27:27 -05:00
L10N_PO = $(wildcard $(srcdir)/po/*.po)
2021-10-13 05:44:41 -05:00
IS_BUNDLE = $(if $(filter true,$(ENABLE_BUNDLE)),true,)
IS_SEPARATE = $(if $(filter false,$(ENABLE_BUNDLE)),true,)
2019-03-15 11:27:27 -05:00
2020-05-27 11:43:29 -05:00
DIST_FOLDER ?= $(builddir)/dist
2020-06-24 15:23:50 -05:00
TYPESCRIPT_JS_DIR = $(builddir)/typescript_js
2020-04-19 18:43:20 -05:00
2020-05-26 07:36:34 -05:00
export NODE_PATH=$(abs_builddir)/node_module
2019-03-15 11:27:27 -05:00
if !ENABLE_MOBILEAPP
2020-04-19 18:43:20 -05:00
L10N_JSON = $(patsubst $(srcdir)/po/%.po,$(DIST_FOLDER)/l10n/%.json,$(L10N_PO))
2019-12-11 04:46:52 -06:00
else
2020-04-19 18:43:20 -05:00
L10N_IOS_ALL_JS = $(DIST_FOLDER)/l10n-all.js
2019-03-15 11:23:28 -05:00
L10N_JSON = $(L10N_IOS_ALL_JS)
2018-11-09 14:28:46 -06:00
2019-12-11 04:46:52 -06:00
$(L10N_IOS_ALL_JS) : $(wildcard $(srcdir)/po/ui-*.po) $(shell find $(srcdir)/l10n -name '*.*') $(srcdir)/util/create-l10n-all-js.pl
2018-11-09 14:28:46 -06:00
for F in $(wildcard $(srcdir)/po/ui-*.po); do \
$(srcdir)/util/po2json.py $$F -o $$F.json; \
done
@mkdir -p $(dir $@)
perl $(srcdir)/util/create-l10n-all-js.pl >$@
for F in $(wildcard $(srcdir)/po/ui-*.po); do \
rm $$F.json; \
done
endif
2017-05-05 04:18:26 -05:00
2021-02-12 05:48:03 -06:00
MOCHA_DIR = $(srcdir)/mocha_tests
MOCHA_TS_FILES = $(wildcard $(MOCHA_DIR)/*.ts)
2021-02-11 06:27:33 -06:00
MOCHA_TS_JS_FILES := $(MOCHA_TS_FILES:.ts=.js)
2021-02-12 05:48:03 -06:00
$(MOCHA_TS_JS_FILES): %.js: %.ts
$(builddir)/node_modules/typescript/bin/tsc $< --outfile $@ --module none --lib dom,es2016 --target ES5
2021-02-11 06:27:33 -06:00
2020-06-02 04:46:39 -05:00
JQUERY_LIGHTNESS_IMAGE_PATH = $(srcdir)/images/jquery-ui-lightness
2019-01-10 05:34:43 -06:00
JQUERY_LIGHTNESS_IMAGES = $(wildcard $(JQUERY_LIGHTNESS_IMAGE_PATH)/*.png)
2020-04-19 18:43:20 -05:00
JQUERY_LIGHTNESS_DIST_IMAGES = $(patsubst $(JQUERY_LIGHTNESS_IMAGE_PATH)/%.png,$(DIST_FOLDER)/images/%.png,$(JQUERY_LIGHTNESS_IMAGES))
2019-01-10 05:34:43 -06:00
2020-06-02 04:46:39 -05:00
JQUERY_MINIFIED_IMAGE_PATH = node_modules/jquery-ui-dist/images
2019-01-10 05:34:43 -06:00
JQUERY_MINIFIED_IMAGES = $(wildcard $(JQUERY_MINIFIED_IMAGE_PATH)/*.png)
2020-04-19 18:43:20 -05:00
JQUERY_MINIFIED_DIST_IMAGES = $(patsubst $(JQUERY_MINIFIED_IMAGE_PATH)/%.png,$(DIST_FOLDER)/images/%.png,$(JQUERY_MINIFIED_IMAGES))
2018-04-12 14:57:00 -05:00
2021-11-01 08:11:04 -05:00
COOL_IMAGES_SRC = $(shell find $(srcdir)/images -name '*.*')
COOL_IMAGES_DST = $(patsubst $(srcdir)/%,$(DIST_FOLDER)/%,$(COOL_IMAGES_SRC))
COOL_IMAGES_CUSTOM_SRC = $(shell if test -n "$(CUSTOM_ICONS_DIRECTORY)"; then find $(CUSTOM_ICONS_DIRECTORY) -name '*.*'; fi)
COOL_IMAGES_CUSTOM_DST = $(patsubst $(CUSTOM_ICONS_DIRECTORY)/%,$(DIST_FOLDER)/images/%,$(COOL_IMAGES_CUSTOM_SRC))
COOL_L10N_SRC = $(shell find $(srcdir)/l10n -name '*.*')
2019-12-11 04:46:52 -06:00
if !ENABLE_MOBILEAPP
2021-11-01 08:11:04 -05:00
COOL_L10N_DST = $(patsubst $(srcdir)/l10n/%,$(DIST_FOLDER)/l10n/%,$(COOL_L10N_SRC))
2019-03-15 11:25:41 -05:00
endif
2021-11-01 08:11:04 -05:00
COOL_HTML_SRC = $(shell find $(srcdir)/html -name '*.html')
COOL_HTML_DST = $(patsubst $(srcdir)/html/%.html,$(DIST_FOLDER)/%.html,$(COOL_HTML_SRC))
2018-04-12 14:57:00 -05:00
2021-11-01 08:11:04 -05:00
COOL_WELCOME_SRC = $(shell find $(srcdir)/welcome -name '*.html')
COOL_WELCOME_DST = $(patsubst $(srcdir)/welcome/%.html,$(DIST_FOLDER)/welcome/%.html,$(COOL_WELCOME_SRC))
2020-05-27 07:20:43 -05:00
2021-11-01 08:11:04 -05:00
COOL_ADMIN_SRC = $(shell find $(srcdir)/admin -name '*.html' -or -name '*.css' -or -name '*.ttf' -or -name 'OFL.txt' -or -name '*.svg')
COOL_ADMIN_ALL = $(shell find $(srcdir)/admin -name '*')
COOL_ADMIN_DST = $(patsubst $(srcdir)/admin/%,$(DIST_FOLDER)/admin/%,$(COOL_ADMIN_SRC))
2018-05-10 12:41:37 -05:00
2018-04-12 14:57:00 -05:00
define file_target
$(1): $(2)
2020-05-26 17:00:51 -05:00
@mkdir -p $$(dir $$@)
2019-02-12 04:47:24 -06:00
@if test -z '$(ENABLE_BROWSERSYNC)'; then \
`cp $$< $$@`; \
else \
`ln -sf ../$$< $$@`; \
fi
2018-04-12 14:57:00 -05:00
endef
define file_targets
$(foreach file,$(1),$(call file_target,\
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/$(notdir $(file)),\
2018-04-12 14:57:00 -05:00
$(file)))
endef
2020-02-19 08:17:31 -06:00
define npm_source
for package in $(1); do \
npm pack $${package}; \
fname=$$(ls *.tgz); \
pdir=$${fname%%.tgz}; \
mkdir -p $${pdir}; \
tar -xzf $${fname} -C $${pdir} --strip-components=1; \
rm $${fname}; \
done
endef
2021-11-01 08:11:04 -05:00
COOL_ADMIN_TS =\
2020-06-24 15:23:50 -05:00
admin/src/ModalDialogCreator.ts
2021-11-01 08:11:04 -05:00
COOL_ADMIN_TS_JS = $(patsubst %.ts,$(TYPESCRIPT_JS_DIR)/%.js,$(COOL_ADMIN_TS))
2020-06-24 15:23:50 -05:00
2021-11-01 08:11:04 -05:00
COOL_ADMIN_JS =\
2020-03-12 15:37:06 -05:00
admin/src/Base.js \
admin/src/Admin.js \
admin/src/AdminSocketBase.js \
admin/src/Util.js \
admin/src/AdminSocketOverview.js \
admin/src/AdminSocketAnalytics.js \
admin/src/AdminSocketSettings.js \
2020-05-13 08:40:05 -05:00
admin/src/AdminSocketHistory.js \
2020-06-24 15:23:50 -05:00
admin/src/AdminSocketLog.js
2020-03-12 15:37:06 -05:00
2020-02-19 08:17:31 -06:00
NODE_MODULES_SRC =\
2020-05-29 14:52:50 -05:00
autolinker@3.14.1 \
2020-02-20 10:04:32 -06:00
json-js@1.1.2 \
2020-06-01 02:27:28 -05:00
select2@4.0.13 \
2020-02-20 06:25:27 -06:00
vex-js@4.1.0 \
l10n-for-node@0.0.1 \
2020-05-29 10:26:47 -05:00
@braintree/sanitize-url@4.0.1
2020-02-19 08:17:31 -06:00
2021-11-01 08:11:04 -05:00
COOL_CSS_LST =\
2018-09-02 09:28:52 -05:00
$(builddir)/node_modules/select2/dist/css/select2.css \
2018-04-12 14:57:00 -05:00
$(srcdir)/css/w2ui-1.5.rc1.css \
$(srcdir)/css/leaflet.css \
2019-04-04 05:57:23 -05:00
$(srcdir)/css/leaflet-spinner.css \
2018-04-12 14:57:00 -05:00
$(srcdir)/css/selectionMarkers.css \
2021-05-24 05:11:57 -05:00
$(srcdir)/css/color-palette.css \
2021-11-03 08:54:18 -05:00
$(srcdir)/css/cool.css \
2018-04-12 14:57:00 -05:00
$(srcdir)/css/toolbar.css \
2019-10-16 05:34:54 -05:00
$(srcdir)/css/toolbar-mobile.css \
2018-04-12 14:57:00 -05:00
$(srcdir)/css/partsPreviewControl.css \
$(srcdir)/css/searchControl.css \
2019-10-16 05:34:54 -05:00
$(srcdir)/css/impress.css \
$(srcdir)/css/impress-mobile.css \
2018-04-12 14:57:00 -05:00
$(srcdir)/css/spreadsheet.css \
2019-10-16 05:34:54 -05:00
$(srcdir)/css/writer-mobile.css \
2018-04-12 14:57:00 -05:00
$(srcdir)/css/editor.css \
$(builddir)/node_modules/jquery-contextmenu/dist/jquery.contextMenu.css \
2019-05-03 04:41:39 -05:00
$(builddir)/node_modules/vex-js/dist/css/vex.css \
$(builddir)/node_modules/vex-js/dist/css/vex-theme-plain.css \
$(builddir)/node_modules/vex-js/dist/css/vex-theme-bottom-right-corner.css \
2018-04-12 14:57:00 -05:00
$(builddir)/node_modules/smartmenus/dist/css/sm-core-css.css \
$(builddir)/node_modules/smartmenus/dist/css/sm-simple/sm-simple.css \
2019-03-20 03:44:39 -05:00
$(srcdir)/css/menubar.css \
2019-10-16 10:40:53 -05:00
$(srcdir)/css/mobilewizard.css \
2020-05-22 08:48:57 -05:00
$(srcdir)/css/jsdialogs.css \
2020-12-08 05:23:14 -06:00
$(srcdir)/css/btns.css \
2020-04-22 06:11:29 -05:00
$(srcdir)/css/notebookbar.css \
2021-05-19 02:47:03 -05:00
$(srcdir)/css/jssidebar.css \
2021-01-08 12:08:43 -06:00
$(srcdir)/css/override-vex.css \
2021-12-15 09:24:47 -06:00
$(srcdir)/css/override-smartmenus.css \
2020-06-02 04:46:39 -05:00
$(srcdir)/css/jquery-ui-lightness.css
2018-04-12 14:57:00 -05:00
2021-05-03 18:53:31 -05:00
if ENABLE_FEEDBACK
2021-11-01 08:11:04 -05:00
COOL_CSS_LST += $(srcdir)/css/iframedialog.css
2021-05-03 18:53:31 -05:00
endif
2021-11-01 08:11:04 -05:00
COOL_CSS = $(filter %,$(COOL_CSS_LST))
2021-05-03 18:53:31 -05:00
2021-11-01 08:11:04 -05:00
COOL_CSS_DST = $(foreach file,$(COOL_CSS),$(DIST_FOLDER)/$(notdir $(file)))
COOL_CSS_M4 = $(strip $(foreach file,$(COOL_CSS),$(notdir $(file))))
2018-04-12 14:57:00 -05:00
2021-11-01 08:11:04 -05:00
$(eval $(call file_targets,$(COOL_CSS)))
2018-04-12 14:57:00 -05:00
NODE_MODULES_JS =\
2021-10-13 05:44:41 -05:00
$(if $(IS_SEPARATE),node_modules/hammerjs/hammer.js,node_modules/hammerjs/hammer.min.js) \
2018-04-12 14:57:00 -05:00
node_modules/jquery/dist/jquery.js \
node_modules/jquery-mousewheel/jquery.mousewheel.js \
2019-05-10 09:03:09 -05:00
node_modules/jquery-contextmenu/dist/jquery.contextMenu.js \
2020-06-02 04:46:39 -05:00
node_modules/jquery-ui-dist/jquery-ui.js \
2020-02-20 10:21:44 -06:00
node_modules/smartmenus/dist/jquery.smartmenus.js
2018-04-12 14:57:00 -05:00
2021-11-01 08:11:04 -05:00
COOL_LIBS_JS =\
2021-06-11 15:28:56 -05:00
ResizeObserverPolyfill.js \
2020-02-20 10:21:44 -06:00
Autolinker.js \
2020-02-20 10:04:32 -06:00
json2.js \
2020-02-20 07:54:53 -06:00
select2.js \
2020-02-20 06:25:27 -06:00
vex.combined.js \
2020-02-19 13:08:17 -06:00
sanitize-url.js
2019-05-02 14:26:05 -05:00
2019-03-15 11:25:41 -05:00
if !ENABLE_MOBILEAPP
2021-11-01 08:11:04 -05:00
COOL_LIBS_JS +=\
2020-02-19 08:17:31 -06:00
l10n.js
2019-03-15 11:25:41 -05:00
endif
2021-11-01 08:11:04 -05:00
COOL_LIBS_JS +=\
2020-09-25 14:35:14 -05:00
w2ui-1.5.rc1.js \
viamapi-client.js
2020-02-19 08:17:31 -06:00
2018-04-12 14:57:00 -05:00
NODE_MODULES_JS_SRC = $(patsubst %.js,$(builddir)/%.js,$(NODE_MODULES_JS))
2020-04-19 18:43:20 -05:00
NODE_MODULES_JS_DST = $(patsubst %.js,$(DIST_FOLDER)/%.js,$(NODE_MODULES_JS))
2018-04-12 14:57:00 -05:00
2021-11-01 08:11:04 -05:00
COOL_LIBS_JS_SRC = $(patsubst %.js,$(srcdir)/js/%.js,$(COOL_LIBS_JS))
COOL_LIBS_JS_DST = $(patsubst %.js,$(DIST_FOLDER)/%.js,$(COOL_LIBS_JS))
2019-05-02 14:26:05 -05:00
2021-04-16 03:50:18 -05:00
# the ordering of this is delicate to get JS initialization right,
# this list includes both Javascript and Typescript generated files
# in a rather precise order.
2021-11-01 08:11:04 -05:00
COOL_JS_LST =\
2020-02-21 11:09:26 -06:00
src/Leaflet.js \
src/errormessages.js \
src/unocommands.js \
src/core/Log.js \
src/core/Util.js \
src/core/LOUtil.js \
src/core/Class.js \
src/core/Events.js \
src/core/Socket.js \
src/core/Matrix.js \
2021-09-22 17:06:53 -05:00
src/geometry/Point.ts \
src/geometry/Bounds.ts \
2021-11-15 03:53:52 -06:00
src/geometry/Transformation.ts \
2020-02-21 11:09:26 -06:00
src/dom/DomUtil.js src/geo/LatLng.js \
src/geo/LatLngBounds.js \
src/geo/projection/Projection.LonLat.js \
src/geo/crs/CRS.js \
src/geo/crs/CRS.Simple.js \
src/map/Map.js \
src/map/Clipboard.js \
src/layer/Layer.js \
2021-09-23 06:39:13 -05:00
src/layer/tile/SheetGeometry.ts \
2021-01-18 05:41:39 -06:00
src/layer/tile/CanvasSectionProps.js \
2021-04-16 09:05:16 -05:00
src/layer/tile/CanvasSectionContainer.ts \
2021-05-10 06:14:27 -05:00
src/layer/tile/CommentSection.ts \
2021-05-31 05:41:33 -05:00
src/layer/tile/CommentListSection.ts \
2021-04-16 09:05:16 -05:00
src/layer/tile/TilesSection.ts \
src/layer/tile/AutoFillMarkerSection.ts \
src/layer/vector/CEventsHandler.ts \
src/layer/vector/CPointSet.ts \
src/layer/vector/CPath.ts \
src/layer/vector/CLineUtil.ts \
src/layer/vector/CPolyline.ts \
src/layer/vector/CPolyUtil.ts \
src/layer/vector/CPolygon.ts \
src/layer/vector/CRectangle.ts \
src/layer/vector/CSplitterLine.ts \
src/layer/marker/Cursor.ts \
src/layer/vector/CanvasOverlay.ts \
src/layer/tile/ScrollSection.ts \
2020-07-07 02:50:34 -05:00
src/layer/tile/CanvasTileLayer.js \
2021-10-15 07:04:01 -05:00
src/layer/SplitPanesContext.ts \
src/layer/CalcSplitPanesContext.ts \
2021-10-13 04:32:35 -05:00
src/layer/vector/CDarkOverlay.ts \
2020-02-21 11:09:26 -06:00
src/layer/tile/TileLayer.TableOverlay.js \
src/layer/ObjectFocusDarkOverlay.js \
src/layer/tile/WriterTileLayer.js \
src/layer/tile/ImpressTileLayer.js \
src/layer/tile/CalcTileLayer.js \
src/layer/BackgroundColor.js \
src/layer/ImageOverlay.js \
src/layer/marker/ProgressOverlay.js \
src/layer/marker/TextInput.js \
src/layer/marker/Icon.js \
src/layer/marker/Icon.Default.js \
src/layer/marker/Marker.js \
src/layer/marker/DivIcon.js \
src/layer/Popup.js \
src/layer/Layer.Popup.js \
src/layer/marker/Marker.Popup.js \
src/layer/LayerGroup.js \
src/layer/FeatureGroup.js \
src/layer/vector/Renderer.js \
src/layer/vector/Path.js \
src/layer/vector/Path.Popup.js \
src/geometry/LineUtil.js \
src/layer/vector/Polyline.js \
src/geometry/PolyUtil.js \
src/layer/vector/Polygon.js \
src/layer/vector/Rectangle.js \
src/layer/vector/CircleMarker.js \
src/layer/vector/Circle.js \
src/layer/vector/SVG.js \
2020-07-07 03:59:54 -05:00
src/layer/vector/SplitPanesRenderer.js \
src/layer/vector/SplitPanesSVG.js \
2020-02-21 11:09:26 -06:00
src/layer/vector/Path.Transform.SVG.js \
src/core/Handler.js \
src/layer/vector/SVGGroup.js \
src/layer/vector/Path.Drag.Transform.js \
src/layer/vector/Path.Drag.js \
src/layer/vector/Path.Transform.Util.js \
src/layer/vector/Path.Transform.js \
src/layer/vector/SVG.VML.js \
src/layer/vector/Path.Transform.SVG.VML.js \
src/layer/vector/Canvas.js \
src/layer/vector/Path.Transform.Canvas.js \
2020-04-29 06:36:05 -05:00
src/layer/FormFieldButtonLayer.js \
2020-02-21 11:09:26 -06:00
src/dom/DomEvent.js \
src/dom/Draggable.js \
src/map/handler/Map.Drag.js \
src/map/handler/Map.Scroll.js \
src/map/handler/Map.DoubleClickZoom.js \
src/dom/DomEvent.Pointer.js \
src/map/handler/Map.TouchGesture.js \
src/map/handler/Map.BoxZoom.js \
src/map/handler/Map.Keyboard.js \
src/dom/DomEvent.MultiClick.js \
src/map/handler/Map.Mouse.js \
src/map/handler/Map.Print.js \
src/map/handler/Map.SlideShow.js \
src/map/handler/Map.FileInserter.js \
src/map/handler/Map.StateChanges.js \
src/map/handler/Map.WOPI.js \
src/layer/marker/Marker.Drag.js \
src/control/Control.Toolbar.js \
2021-09-13 14:24:50 -05:00
src/control/Control.Command.js \
2020-02-21 11:09:26 -06:00
src/control/Control.js \
src/control/Control.PartsPreview.js \
2021-02-02 06:22:18 -06:00
src/control/Control.GroupBase.js \
2021-01-25 15:28:34 -06:00
src/control/Control.CornerGroup.js \
src/control/Control.RowGroup.js \
src/control/Control.ColumnGroup.js \
2021-01-25 05:45:04 -06:00
src/control/Control.CornerHeader.js \
2020-02-21 11:09:26 -06:00
src/control/Control.Header.js \
src/control/Control.ColumnHeader.js \
src/control/Control.RowHeader.js \
src/control/Control.DocumentRepair.js \
src/control/Control.DownloadProgress.js \
src/control/Control.ContextMenu.js \
src/control/Control.Menubar.js \
src/control/Control.Tabs.js \
src/control/Control.Permission.js \
src/control/Control.Selection.js \
src/control/Control.LokDialog.js \
src/control/Control.AlertDialog.js \
src/control/Control.Infobar.js src/control/ColorPicker.js \
2020-11-16 05:54:27 -06:00
src/control/Control.JSDialog.js \
2020-02-21 11:09:26 -06:00
src/control/Control.JSDialogBuilder.js \
2020-11-25 06:48:06 -06:00
src/control/Control.MobileWizardBuilder.js \
2020-02-21 11:09:26 -06:00
src/control/Control.MobileWizard.js \
2021-08-26 09:33:59 -05:00
src/control/Control.MobileWizardPopup.js \
2020-02-21 11:09:26 -06:00
src/control/Control.LanguageDialog.js \
src/control/Control.Attribution.js \
src/control/Control.MobileSlide.js \
src/control/Control.Scale.js \
2020-04-10 04:29:52 -05:00
src/control/Control.StatusBar.js \
2020-04-10 08:19:56 -05:00
src/control/Control.SearchBar.js \
2020-04-10 10:36:40 -05:00
src/control/Control.MobileTopBar.js \
2020-04-10 12:44:21 -05:00
src/control/Control.MobileBottomBar.js \
2020-04-14 11:07:25 -05:00
src/control/Control.UserList.js \
2020-04-15 06:38:46 -05:00
src/control/Control.FormulaBar.js \
2020-04-15 07:15:22 -05:00
src/control/Control.SheetsBar.js \
2020-04-15 08:25:22 -05:00
src/control/Control.PresentationBar.js \
2020-04-16 04:13:21 -05:00
src/control/Control.SigningBar.js \
2020-04-16 06:19:55 -05:00
src/control/Control.TopToolbar.js \
2020-04-16 11:21:44 -05:00
src/control/Control.UIManager.js \
2020-04-20 06:55:35 -05:00
src/control/Control.DocumentNameInput.js \
2020-04-21 07:10:38 -05:00
src/control/Control.Notebookbar.js \
2020-05-01 05:19:29 -05:00
src/control/Control.NotebookbarWriter.js \
src/control/Control.NotebookbarCalc.js \
2020-05-07 04:33:18 -05:00
src/control/Control.NotebookbarImpress.js \
2021-02-26 03:00:19 -06:00
src/control/Control.NotebookbarDraw.js \
2020-04-22 04:29:31 -05:00
src/control/Control.NotebookbarBuilder.js \
2020-10-27 02:57:14 -05:00
src/control/Control.AutofilterDropdown.js \
2020-02-21 11:09:26 -06:00
src/control/Control.Layers.js \
2021-05-19 02:47:03 -05:00
src/control/Control.Sidebar.js \
2020-02-21 11:09:26 -06:00
src/control/Search.js \
src/control/Permission.js \
src/control/Toolbar.js \
src/control/Signing.js \
src/control/Parts.js \
src/control/Scroll.js \
src/control/Styles.js \
src/control/Ruler.js \
src/dom/PosAnimation.js \
src/map/anim/Map.PanAnimation.js \
src/dom/PosAnimation.Timer.js \
src/control/Control.Scroll.Annotation.js \
2021-05-03 18:53:31 -05:00
src/layer/marker/DivOverlay.js
if ENABLE_FEEDBACK
2021-11-01 08:11:04 -05:00
COOL_JS_LST +=\
2021-04-20 16:31:47 -05:00
src/control/IFrameDialog.js \
src/map/handler/Map.Feedback.js
2021-05-03 18:53:31 -05:00
endif
2021-11-01 08:11:04 -05:00
COOL_JS_LST +=\
2020-02-21 11:09:26 -06:00
src/main.js
2018-04-12 14:57:00 -05:00
2021-11-01 08:11:04 -05:00
COOL_JS_WEBORDER = $(filter %,$(COOL_JS_LST))
2021-05-03 18:53:31 -05:00
2021-11-01 08:11:04 -05:00
COOL_JS_SRC = $(filter %.js,$(COOL_JS_WEBORDER))
COOL_TS_SRC = $(filter %.ts,$(COOL_JS_WEBORDER))
2021-04-16 03:50:18 -05:00
2021-04-16 09:05:16 -05:00
# beware these are not helpfully ordered
2021-11-01 08:11:04 -05:00
COOL_TS_JS_DST = $(patsubst src/%.ts,$(DIST_FOLDER)/src/%.js,$(COOL_TS_SRC))
COOL_JS_DST = $(patsubst src/%.js,$(DIST_FOLDER)/src/%.js,$(COOL_JS_SRC)) $(COOL_TS_JS_DST)
2021-04-15 11:41:15 -05:00
# should be no lingering / obsolete files:
2021-11-01 08:11:04 -05:00
COOL_ASSERT_INTERSECT = $(filter $(COOL_JS_SRC), $(patsubst %.ts,%.js,$(COOL_TS_SRC)))
2018-04-12 14:57:00 -05:00
COMMA := ,
EMPTY :=
SPACE := $(EMPTY) $(EMPTY)
2021-11-01 08:11:04 -05:00
COOL_VERSION = $(shell cd $(srcdir) && git log -1 --pretty=format:"%h")
2021-10-13 05:44:41 -05:00
INTERMEDIATE_DIR ?= $(if $(IS_SEPARATE),$(abs_builddir)/debug,$(abs_builddir)/release)
2017-11-10 00:00:06 -06:00
2020-09-29 07:54:22 -05:00
EXTRA_DIST = $(shell find . -type f -not -path './.git/*' -not -path './node_modules/*' | sed 's/.\///')
2017-01-03 22:24:55 -06:00
2021-11-03 08:54:18 -05:00
define bundle_cool
2021-10-13 05:44:41 -05:00
$(if $(IS_SEPARATE),\
2020-05-26 14:25:28 -05:00
@touch $@,
@m4 -PE -DIOSAPP=$(ENABLE_IOSAPP) \
-DGTKAPP=$(ENABLE_GTKAPP) \
-DANDROIDAPP=$(ENABLE_ANDROIDAPP) \
-DMOBILEAPPNAME="$(APP_NAME)" \
2021-11-01 08:11:04 -05:00
-DVERSION=$(COOL_VERSION) \
2020-05-26 14:25:28 -05:00
-DCOPYRIGHT=$(srcdir)/src/copyright.js \
2021-11-01 08:11:04 -05:00
-DCOOL_JS=$(subst $(SPACE),$(COMMA),$(patsubst src/%.ts,$(DIST_FOLDER)/src/%.js,$(COOL_JS_WEBORDER))) \
2021-11-03 08:54:18 -05:00
$(srcdir)/cool-src.js.m4 > $@)
2020-05-26 14:25:28 -05:00
endef
2021-11-03 08:54:18 -05:00
define prereq_cool
2021-11-01 08:11:04 -05:00
$(if $(IS_SEPARATE),$(COOL_JS_DST),$(COOL_JS_SRC))
2020-05-26 14:25:28 -05:00
endef
2020-05-26 17:00:51 -05:00
define bundle_css
2021-10-13 05:44:41 -05:00
$(if $(IS_SEPARATE),\
2020-05-26 17:00:51 -05:00
@touch $@,\
2021-11-03 08:54:18 -05:00
@echo "Uglify cool css files..."
2021-11-01 08:11:04 -05:00
@$(NODE) node_modules/uglifycss/uglifycss $(COOL_CSS) > $@)
2020-05-26 17:00:51 -05:00
endef
define prereq_css
2021-11-01 08:11:04 -05:00
$(if $(IS_SEPARATE),$(COOL_CSS_DST),$(COOL_CSS))
2020-05-26 17:00:51 -05:00
endef
2020-05-26 18:28:52 -05:00
define bundle_all
2021-10-13 05:44:41 -05:00
$(if $(IS_SEPARATE),\
2020-05-26 18:28:52 -05:00
@touch $@,\
2021-11-03 08:54:18 -05:00
@echo "Uglify cool js files..."
2020-05-26 18:28:52 -05:00
@m4 -PE -DL10N_IOS_ALL_JS=$(L10N_IOS_ALL_JS) \
-DNODE_MODULES_JS=$(subst $(SPACE),$(COMMA),$(NODE_MODULES_JS)) \
2021-11-01 08:11:04 -05:00
-DCOOL_LIBS_JS=$(subst $(SPACE),$(COMMA),$(COOL_LIBS_JS_SRC)) \
2021-11-03 08:54:18 -05:00
-DCOOL_JS=$(INTERMEDIATE_DIR)/cool-src.js \
2020-05-26 18:28:52 -05:00
$(srcdir)/bundle.js.m4 > $(INTERMEDIATE_DIR)/bundle.js
@$(NODE) node_modules/uglify-js/bin/uglifyjs \
$(INTERMEDIATE_DIR)/bundle.js \
--output $@)
endef
define prereq_all
2021-11-01 08:11:04 -05:00
$(if $(IS_SEPARATE),$(NODE_MODULES_JS_DST) $(COOL_LIBS_JS_DST),\
$(NODE_MODULES_JS_SRC) $(COOL_LIBS_JS_SRC))
2020-05-26 18:28:52 -05:00
endef
2020-05-26 19:17:22 -05:00
define global_file
2021-10-13 05:44:41 -05:00
$(if $(IS_SEPARATE),
2020-05-26 19:17:22 -05:00
@cp $< $@,
@echo "Uglify global.js file..."
@$(NODE) node_modules/uglify-js/bin/uglifyjs $< --output $@)
endef
2021-11-03 08:54:18 -05:00
.PHONY: build-cool
2020-05-27 10:00:13 -05:00
2021-11-03 08:54:18 -05:00
all-local: build-cool
2018-05-26 09:26:47 -05:00
2019-02-13 06:22:25 -06:00
if !ENABLE_MOBILEAPP
2020-04-19 18:43:20 -05:00
ADMIN_BUNDLE = $(DIST_FOLDER)/admin-bundle.js
2018-11-08 17:03:45 -06:00
endif
2020-06-24 15:23:50 -05:00
$(TYPESCRIPT_JS_DIR)/%.js: $(srcdir)/%.ts
@mkdir -p $(dir $@)
2020-07-06 14:25:36 -05:00
$(builddir)/node_modules/typescript/bin/tsc --outFile $@ $<
2020-06-09 03:13:52 -05:00
2021-11-03 08:54:18 -05:00
build-cool: \
2021-11-01 08:11:04 -05:00
$(COOL_L10N_DST) \
2019-03-15 11:27:27 -05:00
$(L10N_JSON) \
2021-01-31 09:56:12 -06:00
$(SRC_TS_JS_DST) \
2021-11-01 08:11:04 -05:00
$(COOL_IMAGES_DST) \
$(COOL_IMAGES_CUSTOM_DST) \
2019-01-10 05:34:43 -06:00
$(JQUERY_LIGHTNESS_DIST_IMAGES) \
$(JQUERY_MINIFIED_DIST_IMAGES) \
2018-11-08 17:03:45 -06:00
$(ADMIN_BUNDLE) \
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/bundle.css \
$(DIST_FOLDER)/device-mobile.css \
$(DIST_FOLDER)/device-tablet.css \
$(DIST_FOLDER)/device-desktop.css \
$(DIST_FOLDER)/bundle.js \
2021-10-26 08:23:28 -05:00
$(DIST_FOLDER)/cool.html
2021-11-03 08:54:18 -05:00
@echo "build cool completed"
2019-02-13 06:22:25 -06:00
if ENABLE_ANDROIDAPP
2020-05-27 11:43:29 -05:00
@if test -d "$(APP_BRANDING_DIR)" ; then cp -a "$(APP_BRANDING_DIR)/branding.css" "$(APP_BRANDING_DIR)/branding.js" $(DIST_FOLDER)/ ; else touch $(DIST_FOLDER)/branding.css ; fi
@if test -d "$(APP_BRANDING_DIR)" ; then cp -a "$(APP_BRANDING_DIR)"/images/*.svg $(DIST_FOLDER)/images/ ; fi
@if test -d "$(APP_BRANDING_DIR)" ; then cp -a "$(APP_BRANDING_DIR)/images/toolbar-bg-logo.svg" $(DIST_FOLDER)/images/toolbar-bg.svg ; fi
2019-02-13 06:22:25 -06:00
@echo
2020-04-21 17:11:13 -05:00
@echo "JS, HTML and CSS has been updated (android/lib/src/main/assets/dist)."
2019-02-13 06:22:25 -06:00
endif
2018-04-12 14:57:00 -05:00
2021-07-12 04:46:50 -05:00
if ENABLE_CYPRESS
cp -a "$(srcdir)/../cypress_test/data/multiuser/cypress-multiuser.html" "$(DIST_FOLDER)/cypress-multiuser.html"
@echo "Added HTML file for multiuser tests"
endif
2021-11-01 08:11:04 -05:00
$(DIST_FOLDER)/admin-bundle.js: $(COOL_ADMIN_DST) \
2020-05-26 09:45:55 -05:00
$(INTERMEDIATE_DIR)/admin-src.js
2021-10-13 05:44:41 -05:00
@NODE_PATH=$(abs_builddir)/node_modules:$(INTERMEDIATE_DIR) $(NODE) node_modules/browserify/bin/cmd.js -g browserify-css $(if $(IS_SEPARATE),--debug,-g uglifyify) -o $@ $(srcdir)/admin/main-admin.js
2018-05-26 15:57:40 -05:00
2021-11-01 08:11:04 -05:00
$(INTERMEDIATE_DIR)/admin-src.js: $(COOL_ADMIN_TS_JS) $(COOL_ADMIN_JS)
2020-05-27 10:16:08 -05:00
@mkdir -p $(dir $@)
2018-05-26 15:57:40 -05:00
@echo "Checking for admin JS errors..."
2021-05-18 07:35:14 -05:00
@$(NODE) node_modules/eslint/bin/eslint.js --resolve-plugins-relative-to $(abs_builddir) --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc --no-eslintrc $(srcdir)/admin/src
2021-11-01 08:11:04 -05:00
@awk 'FNR == 1 {print ""} 1' $(COOL_ADMIN_TS_JS) $(patsubst %.js,$(srcdir)/%.js,$(COOL_ADMIN_JS)) > $@
2020-03-12 15:37:06 -05:00
2021-11-03 08:54:18 -05:00
$(INTERMEDIATE_DIR)/cool-src.js: tscompile.done $(call prereq_cool) $(COOL_JS_DST)
2020-04-19 18:43:20 -05:00
@mkdir -p $(dir $@)
2020-05-27 09:08:16 -05:00
$(abs_top_srcdir)/scripts/unocommands.py --check $(abs_top_srcdir)
2021-05-20 09:59:12 -05:00
@printf "Checking for obsolete JS build intermediates in this makefile... "
2021-11-01 08:11:04 -05:00
@if ! test "z$(COOL_ASSERT_INTERSECT)" == "z"; then echo; echo "Error: please remove obsolete files:"; echo "$(COOL_ASSERT_INTERSECT)"; exit 1; else echo "clean"; fi
2021-11-03 08:54:18 -05:00
@echo "Checking for cool JS errors..."
2021-05-18 07:35:14 -05:00
@$(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/src --resolve-plugins-relative-to $(abs_builddir) \
$(srcdir)/js --ignore-path $(srcdir)/.eslintignore --no-eslintrc --config $(srcdir)/.eslintrc
2021-11-03 08:54:18 -05:00
@echo "Bundling cool..."
$(call bundle_cool)
2018-04-12 14:57:00 -05:00
2020-05-28 11:08:06 -05:00
$(DIST_FOLDER)/bundle.css: $(call prereq_css)
2020-05-26 17:00:51 -05:00
@mkdir -p $(dir $@)
2020-09-07 14:22:38 -05:00
@echo "Checking for CSS errors..."
@$(NODE) node_modules/stylelint/bin/stylelint.js --config $(srcdir)/.stylelintrc.json $(srcdir)/css/*.css
2020-05-28 11:08:06 -05:00
$(call bundle_css)
2018-04-12 14:57:00 -05:00
2021-11-03 08:54:18 -05:00
$(DIST_FOLDER)/bundle.js: $(INTERMEDIATE_DIR)/cool-src.js $(call prereq_all)
2020-05-26 18:28:52 -05:00
@mkdir -p $(dir $@)
2020-05-28 11:08:06 -05:00
$(call bundle_all)
2020-05-26 18:28:52 -05:00
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/global.js: $(srcdir)/js/global.js
2020-05-26 19:17:22 -05:00
@mkdir -p $(dir $@)
2020-05-28 11:08:06 -05:00
$(call global_file)
2018-04-12 14:57:00 -05:00
2021-10-26 08:23:28 -05:00
$(DIST_FOLDER)/cool.html: $(srcdir)/html/cool.html.m4 \
2021-11-01 08:11:04 -05:00
$(COOL_HTML_DST) \
$(COOL_WELCOME_DST) \
2020-05-26 08:20:50 -05:00
$(DIST_FOLDER)/bundle.css \
$(DIST_FOLDER)/global.js \
$(DIST_FOLDER)/bundle.js
2021-10-26 08:23:28 -05:00
@echo "Generating cool.html..."
2021-10-13 05:44:41 -05:00
m4 -PE -DBUNDLE=$(IS_BUNDLE) \
2021-07-19 11:39:28 -05:00
-DENABLE_FEEDBACK=$(ENABLE_FEEDBACK) \
2018-08-31 05:24:17 -05:00
-DIOSAPP=$(ENABLE_IOSAPP) \
2018-10-16 17:22:24 -05:00
-DGTKAPP=$(ENABLE_GTKAPP) \
2019-02-13 06:22:25 -06:00
-DANDROIDAPP=$(ENABLE_ANDROIDAPP) \
2019-03-30 13:12:19 -05:00
-DMOBILEAPPNAME="$(APP_NAME)" \
2021-11-01 08:11:04 -05:00
-DCOOL_CSS="$(subst $(SPACE),$(COMMA),$(COOL_CSS_M4))" \
2020-04-19 18:43:20 -05:00
-DGLOBAL_JS="$(DIST_FOLDER)/global.js" \
2021-11-01 08:11:04 -05:00
-DCOOL_JS="$(subst $(SPACE),$(COMMA),$(NODE_MODULES_JS) \
$(COOL_LIBS_JS) \
$(patsubst %.ts,%.js,$(COOL_JS_WEBORDER)))" \
2019-04-03 09:26:51 -05:00
-DVENDOR="$(VENDOR)" \
2021-10-26 08:23:28 -05:00
$(srcdir)/html/cool.html.m4 > $@
2016-08-07 11:27:29 -05:00
2020-04-28 16:25:49 -05:00
node_modules: package.json archived-packages
2018-05-26 09:26:47 -05:00
@npm install
@touch node_modules
2016-12-12 04:24:43 -06:00
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/device-%.css: $(srcdir)/css/device-%.css
2020-03-30 04:59:20 -05:00
@mkdir -p $(dir $@)
@if test -z '$(ENABLE_BROWSERSYNC)'; then \
2020-05-26 07:36:34 -05:00
$(NODE) node_modules/uglifycss/uglifycss $< > $@ ; \
2020-03-30 04:59:20 -05:00
else \
ln -sf $(abs_srcdir)/$< $@ ; \
fi
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/plugins/%.js: $(srcdir)/plugins/%.js
2018-05-17 16:13:24 -05:00
@mkdir -p $(dir $@)
2019-02-12 04:47:24 -06:00
@if test -z '$(ENABLE_BROWSERSYNC)'; then \
`cp $< $@`; \
else \
`ln -sf $(abs_srcdir)/$< $@`; \
fi
2018-05-17 16:13:24 -05:00
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/images/%: $(CUSTOM_ICONS_DIRECTORY)/%
2019-06-21 03:43:53 -05:00
@mkdir -p $(dir $@)
@cp $< $@
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/images/%: $(srcdir)/images/%
2018-04-12 14:57:00 -05:00
@mkdir -p $(dir $@)
@cp $< $@
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/%.html: $(srcdir)/html/%.html
2018-04-12 14:57:00 -05:00
@mkdir -p $(dir $@)
2019-05-17 04:26:47 -05:00
@if test -z '$(ENABLE_BROWSERSYNC)'; then \
`cp $< $@`; \
2020-05-27 07:20:43 -05:00
else \
`ln -sf $(abs_srcdir)/$< $@`; \
fi
$(DIST_FOLDER)/welcome/%.html: $(srcdir)/welcome/%.html
@mkdir -p $(dir $@)
@if test -z '$(ENABLE_BROWSERSYNC)'; then \
`cp $< $@`; \
2019-05-17 04:26:47 -05:00
else \
`ln -sf $(abs_srcdir)/$< $@`; \
fi
2018-04-12 14:57:00 -05:00
2021-12-21 17:38:20 -06:00
if ENABLE_DEBUG
2021-12-24 06:21:05 -06:00
SourceMap=--allowJs true --sourceMap true --inlineSources true
2021-12-21 17:38:20 -06:00
endif
2021-11-01 08:11:04 -05:00
tscompile.done: $(COOL_JS_SRC) $(COOL_TS_SRC)
2021-12-21 17:38:20 -06:00
$(builddir)/node_modules/typescript/bin/tsc --typeRoots $(builddir)/node_modules/@types --outDir $(DIST_FOLDER)/src --rootDir $(srcdir)/src --checkJs false --project $(srcdir)/tsconfig.json $(SourceMap)
2021-04-08 01:24:50 -05:00
@touch $@
2021-04-07 06:22:50 -05:00
2021-11-01 08:11:04 -05:00
$(COOL_TS_JS_DST): tscompile.done
2021-05-20 09:59:12 -05:00
@:
2018-04-12 14:57:00 -05:00
2021-04-27 15:35:22 -05:00
$(DIST_FOLDER)/src/%.js: $(srcdir)/src/%.js
@mkdir -p $(dir $@)
@if test -z '$(ENABLE_BROWSERSYNC)'; then \
`cp $< $@`; \
else \
`echo $< $@`; \
`ln -sf $(abs_srcdir)/$< $@`; \
fi
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/%.js: $(srcdir)/js/%.js
2018-04-12 14:57:00 -05:00
@mkdir -p $(dir $@)
2019-02-12 04:47:24 -06:00
@if test -z '$(ENABLE_BROWSERSYNC)'; then \
`cp $< $@`; \
else \
`ln -sf $(abs_srcdir)/$< $@`; \
fi
2018-04-12 14:57:00 -05:00
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/node_modules/%.js: $(builddir)/node_modules/%.js
2018-04-12 14:57:00 -05:00
@mkdir -p $(dir $@)
@cp $< $@
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/$(JQUERY_LIGHTNESS_IMAGE_PATH)/%.png: $(JQUERY_LIGHTNESS_IMAGE_PATH)/%.png
2019-01-10 05:34:43 -06:00
@mkdir -p $(dir $@)
@cp $< $@
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/images/%.png: $(JQUERY_LIGHTNESS_IMAGE_PATH)/%.png
2019-01-10 05:34:43 -06:00
@mkdir -p $(dir $@)
@cp $< $@
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/$(JQUERY_MINIFIED_IMAGE_PATH)/%.png: $(JQUERY_MINIFIED_IMAGE_PATH)/%.png
2018-04-12 14:57:00 -05:00
@mkdir -p $(dir $@)
@cp $< $@
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/images/%.png: $(JQUERY_MINIFIED_IMAGE_PATH)/%.png
2018-04-12 14:57:00 -05:00
@mkdir -p $(dir $@)
@cp $< $@
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/l10n/%: $(srcdir)/l10n/%
2018-04-12 14:57:00 -05:00
@mkdir -p $(dir $@)
2019-03-15 11:27:27 -05:00
@cp $< $@
2017-11-10 00:00:06 -06:00
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/l10n/%.json: $(srcdir)/po/%.po
2020-10-20 05:50:00 -05:00
@$(srcdir)/util/po2json.py --quiet $< -o $@
2019-03-18 08:20:26 -05:00
2020-04-19 18:43:20 -05:00
$(DIST_FOLDER)/admin/%: $(srcdir)/admin/%
2018-05-10 12:41:37 -05:00
@mkdir -p $(dir $@)
@cp $< $@
2017-01-04 08:08:33 -06:00
install-data-hook:
2021-11-03 08:54:18 -05:00
mkdir -p $(DESTDIR)$(pkgdatadir)/browser; \
2021-11-26 08:56:22 -06:00
cp -a dist/ $(DESTDIR)$(pkgdatadir)/browser/;
2017-01-04 08:08:33 -06:00
2020-02-19 08:17:31 -06:00
libs:
@mkdir -p $(abs_srcdir)/libs
@cd $(abs_srcdir)/libs \
&& $(call npm_source,$(NODE_MODULES_SRC))
2016-02-08 10:20:05 -06:00
pot:
2021-11-03 08:54:18 -05:00
xgettext --from-code=UTF-8 --language=JavaScript --keyword=_ --output=po/templates/cool-ui.pot \
2018-05-26 15:57:40 -05:00
admin/admin.strings.js \
2018-05-26 22:24:34 -05:00
admin/src/AdminSocketAnalytics.js \
admin/src/AdminSocketBase.js \
admin/src/AdminSocketOverview.js \
admin/src/AdminSocketSettings.js \
admin/src/Util.js \
2022-01-13 05:47:24 -06:00
js/w2ui-1.5.rc1.js \
2020-04-16 07:23:59 -05:00
src/control/ColorPicker.js \
2018-01-17 09:55:11 -06:00
src/control/Control.AlertDialog.js \
2021-10-21 07:22:27 -05:00
src/control/Control.Command.js \
2017-04-12 15:22:49 -05:00
src/control/Control.ContextMenu.js \
2022-01-13 05:47:24 -06:00
src/control/Control.DocumentNameInput.js \
2016-09-20 02:52:24 -05:00
src/control/Control.DocumentRepair.js \
2019-06-24 07:32:43 -05:00
src/control/Control.DownloadProgress.js \
2020-04-16 07:23:59 -05:00
src/control/Control.FormulaBar.js \
2019-09-23 06:31:20 -05:00
src/control/Control.JSDialogBuilder.js \
2019-07-22 04:44:05 -05:00
src/control/Control.LanguageDialog.js \
2016-05-23 15:49:11 -05:00
src/control/Control.Menubar.js \
2020-04-16 07:23:59 -05:00
src/control/Control.MobileBottomBar.js \
src/control/Control.MobileTopBar.js \
2021-10-21 07:22:27 -05:00
src/control/Control.MobileWizardBuilder.js \
src/control/Control.Notebookbar.js \
src/control/Control.NotebookbarBuilder.js \
src/control/Control.NotebookbarCalc.js \
src/control/Control.NotebookbarDraw.js \
src/control/Control.NotebookbarImpress.js \
src/control/Control.NotebookbarWriter.js \
2021-10-28 08:19:24 -05:00
src/control/Control.PartsPreview.js \
2020-04-16 07:23:59 -05:00
src/control/Control.PresentationBar.js \
2017-03-13 07:03:00 -05:00
src/control/Control.Scroll.Annotation.js \
2020-04-16 07:23:59 -05:00
src/control/Control.SearchBar.js \
src/control/Control.SheetsBar.js \
src/control/Control.StatusBar.js \
2016-05-31 16:26:02 -05:00
src/control/Control.Tabs.js \
2019-04-01 03:27:32 -05:00
src/control/Control.Toolbar.js \
2020-04-16 06:19:55 -05:00
src/control/Control.TopToolbar.js \
2020-04-16 07:23:59 -05:00
src/control/Control.UserList.js \
2020-10-21 07:30:34 -05:00
src/control/Parts.js \
2020-07-14 12:33:13 -05:00
src/control/Permission.js \
2018-11-15 04:13:06 -06:00
src/control/Ruler.js \
2019-09-17 03:52:53 -05:00
src/control/Signing.js \
2016-06-09 08:26:08 -05:00
src/control/Toolbar.js \
2016-05-31 09:36:21 -05:00
src/core/Socket.js \
2018-11-15 04:13:06 -06:00
src/errormessages.js \
2021-04-16 15:08:09 -05:00
src/layer/tile/CanvasTileLayer.js \
2021-10-21 07:22:27 -05:00
src/layer/tile/CommentListSection.ts \
src/layer/tile/CommentSection.ts \
src/main.js \
2019-06-22 12:42:48 -05:00
src/map/Clipboard.js \
2019-09-17 03:52:53 -05:00
src/map/Map.js \
2018-11-15 04:13:06 -06:00
src/map/handler/Map.FileInserter.js \
2021-10-21 04:46:33 -05:00
src/map/handler/Map.Keyboard.js \
2018-11-15 04:13:06 -06:00
src/map/handler/Map.WOPI.js
2016-05-31 16:26:02 -05:00
2021-11-01 07:25:21 -05:00
html2po --pot --input=html/cool-help.html --output=po/templates/cool-help.pot --duplicates=merge
2016-02-08 10:20:05 -06:00
l10n: pot
2021-11-03 08:54:18 -05:00
for i in po/ui-*.po; do pot2po --input=po/templates/cool-ui.pot --template=$$i --output=$$i.new; mv $$i.new $$i;done
2021-11-01 07:25:21 -05:00
for i in po/help-*.po; do pot2po --input=po/templates/cool-help.pot --template=$$i --output=$$i.new; mv $$i.new $$i;done
2016-02-08 10:20:05 -06:00
2016-12-12 06:23:32 -06:00
clean-local:
2020-04-27 10:20:10 -05:00
@rm -rf $(DIST_FOLDER)
2020-05-27 10:16:08 -05:00
@rm -rf $(INTERMEDIATE_DIR)
2021-04-10 17:00:21 -05:00
@rm -rf node_modules
2020-04-05 08:47:27 -05:00
@rm -f $(abs_srcdir)/jsconfig.json
@rm -f $(abs_srcdir)/admin/jsconfig.json
2016-12-12 06:23:32 -06:00
2021-11-03 08:54:18 -05:00
CLEANFILES = tscompile.done $(INTERMEDIATE_DIR)/cool-src.js $(DIST_FOLDER)/bundle.css $(DIST_FOLDER)/bundle.js $(INTERMEDIATE_DIR)/cool-src.js
2021-04-10 17:00:21 -05:00
2019-12-23 11:59:16 -06:00
ctags:
2021-11-01 08:11:04 -05:00
@$(CTAGS) --language-force=JavaScript $(COOL_JS_SRC) $(srcdir)/js/global.js
2020-04-05 08:47:27 -05:00
$(abs_srcdir)/jsconfig.json:
@printf "{\n \
\"compilerOptions\" : {},\n \
\"include\" : [\"src/**/*\", \"js/**/*\"],\n \
\"exclude\" : [\"node_modules\", \"admin/**/*\"]\n}" > $@
$(abs_srcdir)/admin/jsconfig.json:
@printf "{\n \
\"compilerOptions\" : {},\n \
\"include\" : [\"./**/*\"],\n \
\"exclude\" : [\"node_modules\"]\n}" > $@
jsconfig: $(abs_srcdir)/jsconfig.json $(abs_srcdir)/admin/jsconfig.json
2021-02-11 06:27:33 -06:00
2021-09-24 07:24:42 -05:00
build-tests: $(MOCHA_TS_JS_FILES)
@echo "Build of mocha test finished."
2021-06-14 07:54:53 -05:00
check-local: $(MOCHA_TS_JS_FILES)
2021-02-11 06:27:33 -06:00
@echo "Running mocha tests..."
2021-06-14 09:44:18 -05:00
@$(NODE) node_modules/mocha/bin/mocha "$(srcdir)/mocha_tests/**/*.js"
2021-04-16 09:05:16 -05:00
2021-11-18 06:08:14 -06:00
SSL_FLAG = `xmllint --xpath 'string(/config/ssl/enable)' $(abs_top_builddir)/coolwsd.xml`
2021-07-06 07:50:42 -05:00
2021-07-15 07:44:28 -05:00
# the delay (in miliseconds) between each emulated key stroke for each view
typing_speed=100
# The duration of the typing (in miliseconds)
typing_duration=30000
# By default 6 views are spawned in the document.
single_view="false"
# --inspect flag for the first view. Ideally should be used with single_view=true
node_inspect="false"
2021-07-23 02:03:49 -05:00
# Record tile stats and dump it into the file "test/tilestats.txt"
# Pipe it with | grep "tilestats"
2022-01-07 13:06:22 -06:00
record_stats="true"
2021-06-12 17:18:42 -05:00
perf-test:
@echo "Running perf tests..."
@mkdir -p $(abs_top_builddir)/test/data
2021-07-06 09:05:58 -05:00
@if [ ! -f $(abs_top_srcdir)/test/data/perf-test-edit.odt -o "`md5sum <$(abs_top_srcdir)/test/data/perf-test.odt`" != "`md5sum <$(abs_top_srcdir)/test/data/perf-test-edit.odt`" ]; then \
echo 'Making fresh copy of the perf-test-edit.odt document'; \
cp $(abs_top_srcdir)/test/data/perf-test.odt $(abs_top_builddir)/test/data/perf-test-edit.odt; \
fi
2021-07-23 02:03:49 -05:00
$(NODE) $(abs_srcdir)/test/bootstrap.js $(SSL_FLAG) $(abs_top_builddir) $(abs_srcdir) $(typing_speed) $(single_view) $(typing_duration) $(node_inspect) ${record_stats}
2021-04-16 09:05:16 -05:00
# for now - unwinding ts and js deps for different targets is a real pain.
.NOTPARALLEL: