Commit 12256b8acbf5770853ac55736e4f365528f56f78
Merge branch 'ww' into 'main'
fix: build war package exist messy code See merge request yunteng/thingskit-scada!58
Showing
1 changed file
with
92 additions
and
92 deletions
| @@ -6,32 +6,32 @@ | @@ -6,32 +6,32 @@ | ||
| 6 | <taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask" classpath="${jscompiler}" /> | 6 | <taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask" classpath="${jscompiler}" /> | 
| 7 | 7 | ||
| 8 | <target name="merge"> | 8 | <target name="merge"> | 
| 9 | - <concat destfile="${basedir}/../../build/shapes.js" fixlastline="yes" append="no"> | ||
| 10 | - <fileset dir="${war.dir}/shapes" includes="**/*.js"/> | ||
| 11 | - <fileset dir="${war.dir}/stencils" includes="**/*.js"/> | ||
| 12 | - </concat> | 9 | + <concat encoding="utf-8" destfile="${basedir}/../../build/shapes.js" fixlastline="yes" append="no"> | 
| 10 | + <fileset dir="${war.dir}/shapes" includes="**/*.js"/> | ||
| 11 | + <fileset dir="${war.dir}/stencils" includes="**/*.js"/> | ||
| 12 | + </concat> | ||
| 13 | 13 | ||
| 14 | <java fork="false" classname="Xml2Js" classpath="."> | 14 | <java fork="false" classname="Xml2Js" classpath="."> | 
| 15 | <arg value="../../src/main/webapp/stencils"/> | 15 | <arg value="../../src/main/webapp/stencils"/> | 
| 16 | <arg value="../../src/main/webapp/js/stencils.min.js"/> | 16 | <arg value="../../src/main/webapp/js/stencils.min.js"/> | 
| 17 | </java> | 17 | </java> | 
| 18 | 18 | ||
| 19 | - <jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${war.dir}/js/shapes-14-6-5.min.js"> | 19 | + <jscomp encoding="utf-8" compilationLevel="simple" debug="false" forceRecompile="true" output="${war.dir}/js/shapes-14-6-5.min.js"> | 
| 20 | <sources dir="${basedir}/../../build"> | 20 | <sources dir="${basedir}/../../build"> | 
| 21 | <file name="shapes.js" /> | 21 | <file name="shapes.js" /> | 
| 22 | </sources> | 22 | </sources> | 
| 23 | </jscomp> | 23 | </jscomp> | 
| 24 | 24 | ||
| 25 | <tstamp> | 25 | <tstamp> | 
| 26 | - <format property="time.stamp" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/> | ||
| 27 | - </tstamp> | 26 | + <format property="time.stamp" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/> | 
| 27 | + </tstamp> | ||
| 28 | 28 | ||
| 29 | <delete dir="${basedir}/../../build"/> | 29 | <delete dir="${basedir}/../../build"/> | 
| 30 | </target> | 30 | </target> | 
| 31 | 31 | ||
| 32 | <target name="app" depends="merge"> | 32 | <target name="app" depends="merge"> | 
| 33 | <delete file="${basedir}/.tmp0.js"/> | 33 | <delete file="${basedir}/.tmp0.js"/> | 
| 34 | - <echo file="${basedir}/.tmp0.js"> | 34 | + <echo encoding="utf-8" file="${basedir}/.tmp0.js"> | 
| 35 | window.PROXY_URL = window.PROXY_URL || 'https://viewer.diagrams.net/proxy'; | 35 | window.PROXY_URL = window.PROXY_URL || 'https://viewer.diagrams.net/proxy'; | 
| 36 | window.SHAPES_PATH = window.SHAPES_PATH || 'https://viewer.diagrams.net/shapes'; | 36 | window.SHAPES_PATH = window.SHAPES_PATH || 'https://viewer.diagrams.net/shapes'; | 
| 37 | window.STENCIL_PATH = window.STENCIL_PATH || 'https://viewer.diagrams.net/stencils'; | 37 | window.STENCIL_PATH = window.STENCIL_PATH || 'https://viewer.diagrams.net/stencils'; | 
| @@ -42,32 +42,32 @@ | @@ -42,32 +42,32 @@ | ||
| 42 | </echo> | 42 | </echo> | 
| 43 | 43 | ||
| 44 | <delete file="${basedir}/.tmp1.js"/> | 44 | <delete file="${basedir}/.tmp1.js"/> | 
| 45 | - <copy file="${war.dir}/styles/default.xml" tofile="${basedir}/.tmp1.xml" overwrite="true"/> | ||
| 46 | - <replaceregexp file="${basedir}/.tmp1.xml" match="${line.separator}" flags="g" replace=""/> | ||
| 47 | - <replaceregexp file="${basedir}/.tmp1.xml" match="\t" flags="g" replace=""/> | ||
| 48 | - <replaceregexp file="${basedir}/.tmp1.xml" match="'" flags="g" replace="\\\\'" byline="true"/> | 45 | + <copy encoding="utf-8" file="${war.dir}/styles/default.xml" tofile="${basedir}/.tmp1.xml" overwrite="true"/> | 
| 46 | + <replaceregexp encoding="utf-8" file="${basedir}/.tmp1.xml" match="${line.separator}" flags="g" replace=""/> | ||
| 47 | + <replaceregexp encoding="utf-8" file="${basedir}/.tmp1.xml" match="\t" flags="g" replace=""/> | ||
| 48 | + <replaceregexp encoding="utf-8" file="${basedir}/.tmp1.xml" match="'" flags="g" replace="\\\\'" byline="true"/> | ||
| 49 | 49 | ||
| 50 | <delete file="${basedir}/Graph-Stylesheet.js"/> | 50 | <delete file="${basedir}/Graph-Stylesheet.js"/> | 
| 51 | - <echo file="${basedir}/Graph-Stylesheet.js">Graph.prototype.defaultThemes['default-style2'] = mxUtils.parseXml(`</echo> | ||
| 52 | - <concat destfile="${basedir}/Graph-Stylesheet.js" fixlastline="no" append="true"> | 51 | + <echo encoding="utf-8" file="${basedir}/Graph-Stylesheet.js">Graph.prototype.defaultThemes['default-style2'] = mxUtils.parseXml(`</echo> | 
| 52 | + <concat encoding="utf-8" destfile="${basedir}/Graph-Stylesheet.js" fixlastline="no" append="true"> | ||
| 53 | <filelist dir="${basedir}" files=".tmp1.xml"/> | 53 | <filelist dir="${basedir}" files=".tmp1.xml"/> | 
| 54 | </concat> | 54 | </concat> | 
| 55 | - <echo file="${basedir}/Graph-Stylesheet.js" append="true">`).documentElement;</echo> | ||
| 56 | - <echo file="${basedir}/Graph-Stylesheet.js" append="true">Graph.prototype.defaultThemes['darkTheme'] = Graph.prototype.defaultThemes['default-style2'];</echo> | 55 | + <echo encoding="utf-8" file="${basedir}/Graph-Stylesheet.js" append="true">`).documentElement;</echo> | 
| 56 | + <echo encoding="utf-8" file="${basedir}/Graph-Stylesheet.js" append="true">Graph.prototype.defaultThemes['darkTheme'] = Graph.prototype.defaultThemes['default-style2'];</echo> | ||
| 57 | 57 | ||
| 58 | <delete file="${basedir}/.tmp2.xml"/> | 58 | <delete file="${basedir}/.tmp2.xml"/> | 
| 59 | - <copy file="${war.dir}/resources/dia.txt" tofile="${basedir}/.tmp2.xml" overwrite="true"/> | ||
| 60 | - <replaceregexp file="${basedir}/.tmp2.xml" match="${line.separator}" flags="g" replace="\\\\n"/> | ||
| 61 | - <replaceregexp file="${basedir}/.tmp2.xml" match="'" flags="g" replace="\\\\'" byline="true"/> | 59 | + <copy encoding="utf-8" file="${war.dir}/resources/dia.txt" tofile="${basedir}/.tmp2.xml" overwrite="true"/> | 
| 60 | + <replaceregexp encoding="utf-8" file="${basedir}/.tmp2.xml" match="${line.separator}" flags="g" replace="\\\\n"/> | ||
| 61 | + <replaceregexp encoding="utf-8" file="${basedir}/.tmp2.xml" match="'" flags="g" replace="\\\\'" byline="true"/> | ||
| 62 | 62 | ||
| 63 | <delete file="${basedir}/Graph-Resources.js"/> | 63 | <delete file="${basedir}/Graph-Resources.js"/> | 
| 64 | - <echo file="${basedir}/Graph-Resources.js">mxResources.parse(`</echo> | ||
| 65 | - <concat destfile="${basedir}/Graph-Resources.js" fixlastline="no" append="true"> | 64 | + <echo encoding="utf-8" file="${basedir}/Graph-Resources.js">mxResources.parse(`</echo> | 
| 65 | + <concat encoding="utf-8" destfile="${basedir}/Graph-Resources.js" fixlastline="no" append="true"> | ||
| 66 | <filelist dir="${basedir}" files=".tmp2.xml"/> | 66 | <filelist dir="${basedir}" files=".tmp2.xml"/> | 
| 67 | </concat> | 67 | </concat> | 
| 68 | - <echo file="${basedir}/Graph-Resources.js" append="true">`);</echo> | 68 | + <echo encoding="utf-8" file="${basedir}/Graph-Resources.js" append="true">`);</echo> | 
| 69 | 69 | ||
| 70 | - <jscomp compilationLevel="simple" forceRecompile="true" debug="false" output="${basedir}/grapheditor.min.js"> | 70 | + <jscomp encoding="utf-8" compilationLevel="simple" forceRecompile="true" debug="false" output="${basedir}/grapheditor.min.js"> | 
| 71 | <sources dir="${grapheditor.dir}"> | 71 | <sources dir="${grapheditor.dir}"> | 
| 72 | <file name="Editor.js" /> | 72 | <file name="Editor.js" /> | 
| 73 | <file name="EditorUi.js" /> | 73 | <file name="EditorUi.js" /> | 
| @@ -81,8 +81,8 @@ | @@ -81,8 +81,8 @@ | ||
| 81 | <file name="Dialogs.js" /> | 81 | <file name="Dialogs.js" /> | 
| 82 | </sources> | 82 | </sources> | 
| 83 | </jscomp> | 83 | </jscomp> | 
| 84 | - | ||
| 85 | - <jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/sidebar.min.js"> | 84 | + | 
| 85 | + <jscomp encoding="utf-8" compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/sidebar.min.js"> | ||
| 86 | <sources dir="${war.dir}/js/diagramly/sidebar"> | 86 | <sources dir="${war.dir}/js/diagramly/sidebar"> | 
| 87 | <file name="Sidebar.js" /> | 87 | <file name="Sidebar.js" /> | 
| 88 | <file name="Sidebar-ActiveDirectory.js" /> | 88 | <file name="Sidebar-ActiveDirectory.js" /> | 
| @@ -194,7 +194,7 @@ | @@ -194,7 +194,7 @@ | ||
| 194 | </sources> | 194 | </sources> | 
| 195 | </jscomp> | 195 | </jscomp> | 
| 196 | 196 | ||
| 197 | - <jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/client.min.js"> | 197 | + <jscomp encoding="utf-8" compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/client.min.js"> | 
| 198 | <sources dir="${war.dir}/js/deflate"> | 198 | <sources dir="${war.dir}/js/deflate"> | 
| 199 | <file name="base64.js" /> | 199 | <file name="base64.js" /> | 
| 200 | </sources> | 200 | </sources> | 
| @@ -216,13 +216,13 @@ | @@ -216,13 +216,13 @@ | ||
| 216 | </sources> | 216 | </sources> | 
| 217 | </jscomp> | 217 | </jscomp> | 
| 218 | 218 | ||
| 219 | - <jscomp compilationLevel="simple" forceRecompile="true" debug="false" output="${basedir}/.tmp0.min.js"> | 219 | + <jscomp encoding="utf-8" compilationLevel="simple" forceRecompile="true" debug="false" output="${basedir}/.tmp0.min.js"> | 
| 220 | <sources dir="${basedir}"> | 220 | <sources dir="${basedir}"> | 
| 221 | <file name=".tmp0.js"/> | 221 | <file name=".tmp0.js"/> | 
| 222 | </sources> | 222 | </sources> | 
| 223 | </jscomp> | 223 | </jscomp> | 
| 224 | 224 | ||
| 225 | - <jscomp compilationLevel="simple" forceRecompile="true" debug="false" output="${basedir}/.tmp1.js"> | 225 | + <jscomp encoding="utf-8" compilationLevel="simple" forceRecompile="true" debug="false" output="${basedir}/.tmp1.js"> | 
| 226 | <sources dir="${grapheditor.dir}"> | 226 | <sources dir="${grapheditor.dir}"> | 
| 227 | <file name="Editor.js" /> | 227 | <file name="Editor.js" /> | 
| 228 | <file name="EditorUi.js" /> | 228 | <file name="EditorUi.js" /> | 
| @@ -253,69 +253,69 @@ | @@ -253,69 +253,69 @@ | ||
| 253 | </sources> | 253 | </sources> | 
| 254 | </jscomp> | 254 | </jscomp> | 
| 255 | 255 | ||
| 256 | - <concat destfile="${basedir}/base-viewer.min.js" fixlastline="yes" append="no"> | 256 | + <concat encoding="utf-8" destfile="${basedir}/base-viewer.min.js" fixlastline="yes" append="no"> | 
| 257 | <filelist dir="${basedir}" files=".tmp0.min.js"/> | 257 | <filelist dir="${basedir}" files=".tmp0.min.js"/> | 
| 258 | <filelist dir="${war.dir}/js/spin" files="spin.min.js"/> | 258 | <filelist dir="${war.dir}/js/spin" files="spin.min.js"/> | 
| 259 | <filelist dir="${war.dir}/js/sanitizer" files="sanitizer.min.js"/> | 259 | <filelist dir="${war.dir}/js/sanitizer" files="sanitizer.min.js"/> | 
| 260 | <filelist dir="${war.dir}/js/deflate" files="pako.min.js"/> | 260 | <filelist dir="${war.dir}/js/deflate" files="pako.min.js"/> | 
| 261 | <filelist dir="${war.dir}/js/rough" files="rough.min.js"/> | 261 | <filelist dir="${war.dir}/js/rough" files="rough.min.js"/> | 
| 262 | <filelist dir="${basedir}" files="client.min.js,.tmp1.js"/> | 262 | <filelist dir="${basedir}" files="client.min.js,.tmp1.js"/> | 
| 263 | - </concat> | 263 | + </concat> | 
| 264 | 264 | ||
| 265 | - <loadfile property="version" srcFile="../../VERSION"/> | ||
| 266 | - <replace file="${basedir}/base-viewer.min.js" token="@DRAWIO-VERSION@" value="${version}"/> | 265 | + <loadfile encoding="utf-8" property="version" srcFile="../../VERSION"/> | 
| 266 | + <replace encoding="utf-8" file="${basedir}/base-viewer.min.js" token="@DRAWIO-VERSION@" value="${version}"/> | ||
| 267 | 267 | ||
| 268 | - <echo file="${basedir}/.tmp2.js"> | 268 | + <echo encoding="utf-8" file="${basedir}/.tmp2.js"> | 
| 269 | (function() | 269 | (function() | 
| 270 | { | 270 | { | 
| 271 | - Editor.initMath(); | ||
| 272 | - GraphViewer.initCss(); | ||
| 273 | - | ||
| 274 | - if (window.onDrawioViewerLoad != null) | ||
| 275 | - { | ||
| 276 | - window.onDrawioViewerLoad(); | ||
| 277 | - } | ||
| 278 | - else | ||
| 279 | - { | ||
| 280 | - GraphViewer.processElements(); | ||
| 281 | - } | 271 | + Editor.initMath(); | 
| 272 | + GraphViewer.initCss(); | ||
| 273 | + | ||
| 274 | + if (window.onDrawioViewerLoad != null) | ||
| 275 | + { | ||
| 276 | + window.onDrawioViewerLoad(); | ||
| 277 | + } | ||
| 278 | + else | ||
| 279 | + { | ||
| 280 | + GraphViewer.processElements(); | ||
| 281 | + } | ||
| 282 | })(); | 282 | })(); | 
| 283 | </echo> | 283 | </echo> | 
| 284 | 284 | ||
| 285 | - <jscomp compilationLevel="simple" forceRecompile="true" debug="false" output="${basedir}/.tmp2.min.js"> | 285 | + <jscomp encoding="utf-8" compilationLevel="simple" forceRecompile="true" debug="false" output="${basedir}/.tmp2.min.js"> | 
| 286 | <sources dir="${basedir}"> | 286 | <sources dir="${basedir}"> | 
| 287 | <file name=".tmp2.js"/> | 287 | <file name=".tmp2.js"/> | 
| 288 | </sources> | 288 | </sources> | 
| 289 | </jscomp> | 289 | </jscomp> | 
| 290 | 290 | ||
| 291 | - <concat destfile="${war.dir}/js/viewer.min.js" fixlastline="yes" append="no"> | 291 | + <concat encoding="utf-8" destfile="${war.dir}/js/viewer.min.js" fixlastline="yes" append="no"> | 
| 292 | <filelist dir="${basedir}" files="base-viewer.min.js,.tmp2.min.js"/> | 292 | <filelist dir="${basedir}" files="base-viewer.min.js,.tmp2.min.js"/> | 
| 293 | - </concat> | 293 | + </concat> | 
| 294 | 294 | ||
| 295 | <!-- Disables eval for JS (uses shapes-14-6-5.min.js) and registers PWA --> | 295 | <!-- Disables eval for JS (uses shapes-14-6-5.min.js) and registers PWA --> | 
| 296 | - <echo file="${basedir}/.tmp3.js"> | 296 | + <echo encoding="utf-8" file="${basedir}/.tmp3.js"> | 
| 297 | mxStencilRegistry.allowEval = false; | 297 | mxStencilRegistry.allowEval = false; | 
| 298 | 298 | ||
| 299 | (function() | 299 | (function() | 
| 300 | { | 300 | { | 
| 301 | - try | ||
| 302 | - { | ||
| 303 | - if (Editor.enableServiceWorker) | ||
| 304 | - { | ||
| 305 | - navigator.serviceWorker.register('/service-worker.js'); | ||
| 306 | - } | ||
| 307 | - } | ||
| 308 | - catch (e) | ||
| 309 | - { | ||
| 310 | - if (window.console != null) | ||
| 311 | - { | ||
| 312 | - console.error(e); | ||
| 313 | - } | ||
| 314 | - } | 301 | + try | 
| 302 | + { | ||
| 303 | + if (Editor.enableServiceWorker) | ||
| 304 | + { | ||
| 305 | + navigator.serviceWorker.register('/service-worker.js'); | ||
| 306 | + } | ||
| 307 | + } | ||
| 308 | + catch (e) | ||
| 309 | + { | ||
| 310 | + if (window.console != null) | ||
| 311 | + { | ||
| 312 | + console.error(e); | ||
| 313 | + } | ||
| 314 | + } | ||
| 315 | })(); | 315 | })(); | 
| 316 | </echo> | 316 | </echo> | 
| 317 | 317 | ||
| 318 | - <concat destfile="${war.dir}/js/viewer-static.min.js" fixlastline="yes" append="no"> | 318 | + <concat encoding="utf-8" destfile="${war.dir}/js/viewer-static.min.js" fixlastline="yes" append="no"> | 
| 319 | <filelist dir="${basedir}" files="base-viewer.min.js"/> | 319 | <filelist dir="${basedir}" files="base-viewer.min.js"/> | 
| 320 | <filelist dir="${war.dir}/js" files="shapes-14-6-5.min.js"/> | 320 | <filelist dir="${war.dir}/js" files="shapes-14-6-5.min.js"/> | 
| 321 | <filelist dir="${basedir}" files=".tmp3.js,.tmp2.min.js"/> | 321 | <filelist dir="${basedir}" files=".tmp3.js,.tmp2.min.js"/> | 
| @@ -331,7 +331,7 @@ | @@ -331,7 +331,7 @@ | ||
| 331 | <delete file="${basedir}/.tmp1.xml"/> | 331 | <delete file="${basedir}/.tmp1.xml"/> | 
| 332 | <delete file="${basedir}/.tmp2.xml"/> | 332 | <delete file="${basedir}/.tmp2.xml"/> | 
| 333 | 333 | ||
| 334 | - <jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/.tmp1.js"> | 334 | + <jscomp encoding="utf-8" compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/.tmp1.js"> | 
| 335 | <sources dir="${war.dir}/js/diagramly"> | 335 | <sources dir="${war.dir}/js/diagramly"> | 
| 336 | <file name="DrawioFile.js" /> | 336 | <file name="DrawioFile.js" /> | 
| 337 | <file name="LocalFile.js" /> | 337 | <file name="LocalFile.js" /> | 
| @@ -365,7 +365,7 @@ | @@ -365,7 +365,7 @@ | ||
| 365 | </sources> | 365 | </sources> | 
| 366 | </jscomp> | 366 | </jscomp> | 
| 367 | 367 | ||
| 368 | - <concat destfile="${basedir}/base.min.js" fixlastline="yes" append="no"> | 368 | + <concat encoding="utf-8" destfile="${basedir}/base.min.js" fixlastline="yes" append="no"> | 
| 369 | <filelist dir="${war.dir}/js/spin" files="spin.min.js"/> | 369 | <filelist dir="${war.dir}/js/spin" files="spin.min.js"/> | 
| 370 | <filelist dir="${war.dir}/js/sanitizer" files="sanitizer.min.js"/> | 370 | <filelist dir="${war.dir}/js/sanitizer" files="sanitizer.min.js"/> | 
| 371 | <filelist dir="${war.dir}/js/cryptojs" files="aes.min.js"/> | 371 | <filelist dir="${war.dir}/js/cryptojs" files="aes.min.js"/> | 
| @@ -373,11 +373,11 @@ | @@ -373,11 +373,11 @@ | ||
| 373 | <filelist dir="${war.dir}/js/rough" files="rough.min.js"/> | 373 | <filelist dir="${war.dir}/js/rough" files="rough.min.js"/> | 
| 374 | <filelist dir="${war.dir}/js/freehand" files="perfect-freehand.js"/> | 374 | <filelist dir="${war.dir}/js/freehand" files="perfect-freehand.js"/> | 
| 375 | <filelist dir="${basedir}" files="client.min.js,grapheditor.min.js,sidebar.min.js,.tmp1.js"/> | 375 | <filelist dir="${basedir}" files="client.min.js,grapheditor.min.js,sidebar.min.js,.tmp1.js"/> | 
| 376 | - </concat> | 376 | + </concat> | 
| 377 | 377 | ||
| 378 | - <replace file="${basedir}/base.min.js" token="@DRAWIO-VERSION@" value="${version}"/> | 378 | + <replace encoding="utf-8" file="${basedir}/base.min.js" token="@DRAWIO-VERSION@" value="${version}"/> | 
| 379 | 379 | ||
| 380 | - <jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${war.dir}/js/extensions.min.js"> | 380 | + <jscomp encoding="utf-8" compilationLevel="simple" debug="false" forceRecompile="true" output="${war.dir}/js/extensions.min.js"> | 
| 381 | <sources dir="${war.dir}/js/diagramly"> | 381 | <sources dir="${war.dir}/js/diagramly"> | 
| 382 | <file name="Extensions.js" /> | 382 | <file name="Extensions.js" /> | 
| 383 | </sources> | 383 | </sources> | 
| @@ -393,28 +393,28 @@ | @@ -393,28 +393,28 @@ | ||
| 393 | </jscomp> | 393 | </jscomp> | 
| 394 | 394 | ||
| 395 | <delete file="${war.dir}/js/orgchart.min.js"/> | 395 | <delete file="${war.dir}/js/orgchart.min.js"/> | 
| 396 | - <concat destfile="${war.dir}/js/orgchart.min.js" fixlastline="yes" append="no"> | 396 | + <concat encoding="utf-8" destfile="${war.dir}/js/orgchart.min.js" fixlastline="yes" append="no"> | 
| 397 | <filelist dir="${war.dir}/js/orgchart" files="bridge.min.js,bridge.collections.min.js,OrgChart.Layout.min.js"/> | 397 | <filelist dir="${war.dir}/js/orgchart" files="bridge.min.js,bridge.collections.min.js,OrgChart.Layout.min.js"/> | 
| 398 | - </concat> | ||
| 399 | - <jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/.tmp3.js"> | 398 | + </concat> | 
| 399 | + <jscomp encoding="utf-8" compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/.tmp3.js"> | ||
| 400 | <sources dir="${war.dir}/js/orgchart"> | 400 | <sources dir="${war.dir}/js/orgchart"> | 
| 401 | <file name="mxOrgChartLayout.js" /> | 401 | <file name="mxOrgChartLayout.js" /> | 
| 402 | </sources> | 402 | </sources> | 
| 403 | </jscomp> | 403 | </jscomp> | 
| 404 | - <concat destfile="${war.dir}/js/orgchart.min.js" fixlastline="yes" append="yes"> | 404 | + <concat encoding="utf-8" destfile="${war.dir}/js/orgchart.min.js" fixlastline="yes" append="yes"> | 
| 405 | <filelist dir="${basedir}" files=".tmp3.js"/> | 405 | <filelist dir="${basedir}" files=".tmp3.js"/> | 
| 406 | - </concat> | 406 | + </concat> | 
| 407 | <delete file="${basedir}/.tmp3.js"/> | 407 | <delete file="${basedir}/.tmp3.js"/> | 
| 408 | 408 | ||
| 409 | - <concat destfile="${war.dir}/js/extensions.min.js" fixlastline="yes" append="yes"> | 409 | + <concat encoding="utf-8" destfile="${war.dir}/js/extensions.min.js" fixlastline="yes" append="yes"> | 
| 410 | <fileset file="${war.dir}/js/jszip/jszip.min.js"/> | 410 | <fileset file="${war.dir}/js/jszip/jszip.min.js"/> | 
| 411 | <fileset file="${war.dir}/js/mermaid/mermaid.min.js"/> | 411 | <fileset file="${war.dir}/js/mermaid/mermaid.min.js"/> | 
| 412 | <fileset file="${war.dir}/js/orgchart.min.js"/> | 412 | <fileset file="${war.dir}/js/orgchart.min.js"/> | 
| 413 | - </concat> | 413 | + </concat> | 
| 414 | 414 | ||
| 415 | <delete file="${basedir}/.tmp1.js"/> | 415 | <delete file="${basedir}/.tmp1.js"/> | 
| 416 | 416 | ||
| 417 | - <jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/.tmp1.js"> | 417 | + <jscomp encoding="utf-8" compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/.tmp1.js"> | 
| 418 | <sources dir="${war.dir}/js/diagramly"> | 418 | <sources dir="${war.dir}/js/diagramly"> | 
| 419 | <file name="DrawioFile.js" /> | 419 | <file name="DrawioFile.js" /> | 
| 420 | <file name="LocalFile.js" /> | 420 | <file name="LocalFile.js" /> | 
| @@ -484,7 +484,7 @@ | @@ -484,7 +484,7 @@ | ||
| 484 | </sources> | 484 | </sources> | 
| 485 | </jscomp> | 485 | </jscomp> | 
| 486 | 486 | ||
| 487 | - <concat destfile="${war.dir}/js/app.min.js" fixlastline="yes" append="no"> | 487 | + <concat encoding="utf-8" destfile="${war.dir}/js/app.min.js" fixlastline="yes" append="no"> | 
| 488 | <filelist dir="${war.dir}/js/spin" files="spin.min.js"/> | 488 | <filelist dir="${war.dir}/js/spin" files="spin.min.js"/> | 
| 489 | <filelist dir="${war.dir}/js/sanitizer" files="sanitizer.min.js"/> | 489 | <filelist dir="${war.dir}/js/sanitizer" files="sanitizer.min.js"/> | 
| 490 | <filelist dir="${war.dir}/js/cryptojs" files="aes.min.js"/> | 490 | <filelist dir="${war.dir}/js/cryptojs" files="aes.min.js"/> | 
| @@ -492,9 +492,9 @@ | @@ -492,9 +492,9 @@ | ||
| 492 | <filelist dir="${war.dir}/js/rough" files="rough.min.js"/> | 492 | <filelist dir="${war.dir}/js/rough" files="rough.min.js"/> | 
| 493 | <filelist dir="${war.dir}/js/freehand" files="perfect-freehand.js"/> | 493 | <filelist dir="${war.dir}/js/freehand" files="perfect-freehand.js"/> | 
| 494 | <filelist dir="${basedir}" files="client.min.js,grapheditor.min.js,sidebar.min.js,.tmp1.js"/> | 494 | <filelist dir="${basedir}" files="client.min.js,grapheditor.min.js,sidebar.min.js,.tmp1.js"/> | 
| 495 | - </concat> | 495 | + </concat> | 
| 496 | 496 | ||
| 497 | - <replace file="${war.dir}/js/app.min.js" token="@DRAWIO-VERSION@" value="${version}"/> | 497 | + <replace encoding="utf-8" file="${war.dir}/js/app.min.js" token="@DRAWIO-VERSION@" value="${version}"/> | 
| 498 | 498 | ||
| 499 | <delete file="${basedir}/Graph-Stylesheet.js"/> | 499 | <delete file="${basedir}/Graph-Stylesheet.js"/> | 
| 500 | <delete file="${basedir}/Graph-Resources.js"/> | 500 | <delete file="${basedir}/Graph-Resources.js"/> | 
| @@ -505,37 +505,37 @@ | @@ -505,37 +505,37 @@ | ||
| 505 | </target> | 505 | </target> | 
| 506 | 506 | ||
| 507 | <target name="atlas" depends="app"> | 507 | <target name="atlas" depends="app"> | 
| 508 | - <copy file="${basedir}/base-viewer.min.js" tofile="${war.dir}/js/atlas-viewer.min.js" overwrite="true"/> | 508 | + <copy encoding="utf-8" file="${basedir}/base-viewer.min.js" tofile="${war.dir}/js/atlas-viewer.min.js" overwrite="true"/> | 
| 509 | 509 | ||
| 510 | - <jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/.tmp0.js"> | 510 | + <jscomp encoding="utf-8" compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/.tmp0.js"> | 
| 511 | <sources dir="${war.dir}/connect/common/js"> | 511 | <sources dir="${war.dir}/connect/common/js"> | 
| 512 | <file name="mxReader.js" /> | 512 | <file name="mxReader.js" /> | 
| 513 | </sources> | 513 | </sources> | 
| 514 | </jscomp> | 514 | </jscomp> | 
| 515 | 515 | ||
| 516 | - <concat destfile="${war.dir}/js/atlas.min.js" fixlastline="yes" append="no"> | 516 | + <concat encoding="utf-8" destfile="${war.dir}/js/atlas.min.js" fixlastline="yes" append="no"> | 
| 517 | <file name="${basedir}/base.min.js" /> | 517 | <file name="${basedir}/base.min.js" /> | 
| 518 | <file name="${war.dir}/js/extensions.min.js" /> | 518 | <file name="${war.dir}/js/extensions.min.js" /> | 
| 519 | <file name="${basedir}/.tmp0.js" /> | 519 | <file name="${basedir}/.tmp0.js" /> | 
| 520 | - </concat> | 520 | + </concat> | 
| 521 | 521 | ||
| 522 | <delete file="${basedir}/.tmp0.js"/> | 522 | <delete file="${basedir}/.tmp0.js"/> | 
| 523 | </target> | 523 | </target> | 
| 524 | 524 | ||
| 525 | <target name="integrate" depends="atlas"> | 525 | <target name="integrate" depends="atlas"> | 
| 526 | - <copy file="${war.dir}/js/atlas.min.js" tofile="${war.dir}/js/integrate.min.js" overwrite="true"/> | 526 | + <copy encoding="utf-8" file="${war.dir}/js/atlas.min.js" tofile="${war.dir}/js/integrate.min.js" overwrite="true"/> | 
| 527 | 527 | ||
| 528 | - <jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/.tmp0.js"> | 528 | + <jscomp encoding="utf-8" compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/.tmp0.js"> | 
| 529 | <sources dir="${basedir}/../integrate"> | 529 | <sources dir="${basedir}/../integrate"> | 
| 530 | <file name="Integrate.js" /> | 530 | <file name="Integrate.js" /> | 
| 531 | </sources> | 531 | </sources> | 
| 532 | </jscomp> | 532 | </jscomp> | 
| 533 | 533 | ||
| 534 | - <concat destfile="${war.dir}/js/integrate.min.js" fixlastline="yes" append="yes"> | 534 | + <concat encoding="utf-8" destfile="${war.dir}/js/integrate.min.js" fixlastline="yes" append="yes"> | 
| 535 | <file name="${war.dir}/js/shapes-14-6-5.min.js" /> | 535 | <file name="${war.dir}/js/shapes-14-6-5.min.js" /> | 
| 536 | - <file name="${war.dir}/js/stencils.min.js" /> | ||
| 537 | - <file name="${basedir}/.tmp0.js" /> | ||
| 538 | - </concat> | 536 | + <file name="${war.dir}/js/stencils.min.js" /> | 
| 537 | + <file name="${basedir}/.tmp0.js" /> | ||
| 538 | + </concat> | ||
| 539 | 539 | ||
| 540 | <delete file="${basedir}/.tmp0.js"/> | 540 | <delete file="${basedir}/.tmp0.js"/> | 
| 541 | </target> | 541 | </target> | 
| @@ -553,10 +553,10 @@ | @@ -553,10 +553,10 @@ | ||
| 553 | 553 | ||
| 554 | <target name="javac" description="Java compilation"> | 554 | <target name="javac" description="Java compilation"> | 
| 555 | <mkdir dir="${javac.dir}"/> | 555 | <mkdir dir="${javac.dir}"/> | 
| 556 | - <javac includeantruntime="false" srcdir="${src.dir}" excludes="**/EmbedServlet2.java" destdir="${javac.dir}"> | 556 | + <javac encoding="utf-8" includeantruntime="false" srcdir="${src.dir}" excludes="**/EmbedServlet2.java" destdir="${javac.dir}"> | 
| 557 | <classpath refid="javac.class.path" /> | 557 | <classpath refid="javac.class.path" /> | 
| 558 | </javac> | 558 | </javac> | 
| 559 | - <copy todir="${javac.dir}" file="${src.dir}/log4j.properties" /> | 559 | + <copy encoding="utf-8" todir="${javac.dir}" file="${src.dir}/log4j.properties" /> | 
| 560 | </target> | 560 | </target> | 
| 561 | 561 | ||
| 562 | <target name="clean" description="Cleans build directories"> | 562 | <target name="clean" description="Cleans build directories"> | 
| @@ -567,7 +567,7 @@ | @@ -567,7 +567,7 @@ | ||
| 567 | </target> | 567 | </target> | 
| 568 | 568 | ||
| 569 | <target name="war" depends="app, javac" description="Create the stand-alone war file"> | 569 | <target name="war" depends="app, javac" description="Create the stand-alone war file"> | 
| 570 | - <zip encoding="utf-8" destfile="${build.dir}/${war.name}" basedir="${war.dir}" > | 570 | + <zip encoding="utf-8" destfile="${build.dir}/${war.name}" basedir="${war.dir}" > | 
| 571 | </zip> | 571 | </zip> | 
| 572 | </target> | 572 | </target> | 
| 573 | 573 |