You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. BUILD_DIR = build
  2. CLEANCSS = ./node_modules/.bin/cleancss
  3. DEPLOY_DIR = libs
  4. LIBJITSIMEET_DIR = node_modules/lib-jitsi-meet
  5. OLM_DIR = node_modules/@matrix-org/olm
  6. TF_WASM_DIR = node_modules/@tensorflow/tfjs-backend-wasm/dist/
  7. RNNOISE_WASM_DIR = node_modules/@jitsi/rnnoise-wasm/dist
  8. EXCALIDRAW_DIR = node_modules/@jitsi/excalidraw/dist/excalidraw-assets
  9. EXCALIDRAW_DIR_DEV = node_modules/@jitsi/excalidraw/dist/excalidraw-assets-dev
  10. TFLITE_WASM = react/features/stream-effects/virtual-background/vendor/tflite
  11. MEET_MODELS_DIR = react/features/stream-effects/virtual-background/vendor/models
  12. FACE_MODELS_DIR = node_modules/@vladmandic/human-models/models
  13. NODE_SASS = ./node_modules/.bin/sass
  14. NPM = npm
  15. OUTPUT_DIR = .
  16. STYLES_BUNDLE = css/all.bundle.css
  17. STYLES_DESTINATION = css/all.css
  18. STYLES_MAIN = css/main.scss
  19. ifeq ($(OS),Windows_NT)
  20. WEBPACK = .\node_modules\.bin\webpack --progress
  21. WEBPACK_DEV_SERVER = .\node_modules\.bin\webpack serve --mode development --progress
  22. else
  23. WEBPACK = ./node_modules/.bin/webpack --progress
  24. WEBPACK_DEV_SERVER = ./node_modules/.bin/webpack serve --mode development --progress
  25. endif
  26. all: compile deploy
  27. compile: clean
  28. NODE_OPTIONS=--max-old-space-size=8192 \
  29. $(WEBPACK)
  30. clean:
  31. rm -fr $(BUILD_DIR)
  32. .NOTPARALLEL:
  33. deploy: deploy-init deploy-appbundle deploy-rnnoise-binary deploy-excalidraw deploy-tflite deploy-meet-models deploy-lib-jitsi-meet deploy-olm deploy-tf-wasm deploy-css deploy-local deploy-face-landmarks
  34. deploy-init:
  35. rm -fr $(DEPLOY_DIR)
  36. mkdir -p $(DEPLOY_DIR)
  37. deploy-appbundle:
  38. cp \
  39. $(BUILD_DIR)/app.bundle.min.js \
  40. $(BUILD_DIR)/app.bundle.min.js.map \
  41. $(BUILD_DIR)/external_api.min.js \
  42. $(BUILD_DIR)/external_api.min.js.map \
  43. $(BUILD_DIR)/alwaysontop.min.js \
  44. $(BUILD_DIR)/alwaysontop.min.js.map \
  45. $(BUILD_DIR)/face-landmarks-worker.min.js \
  46. $(BUILD_DIR)/face-landmarks-worker.min.js.map \
  47. $(BUILD_DIR)/noise-suppressor-worklet.min.js \
  48. $(BUILD_DIR)/noise-suppressor-worklet.min.js.map \
  49. $(BUILD_DIR)/screenshot-capture-worker.min.js \
  50. $(BUILD_DIR)/screenshot-capture-worker.min.js.map \
  51. $(DEPLOY_DIR)
  52. cp \
  53. $(BUILD_DIR)/close3.min.js \
  54. $(BUILD_DIR)/close3.min.js.map \
  55. $(DEPLOY_DIR) || true
  56. deploy-lib-jitsi-meet:
  57. cp \
  58. $(LIBJITSIMEET_DIR)/dist/umd/lib-jitsi-meet.* \
  59. $(DEPLOY_DIR)
  60. deploy-olm:
  61. cp \
  62. $(OLM_DIR)/olm.wasm \
  63. $(DEPLOY_DIR)
  64. deploy-tf-wasm:
  65. cp \
  66. $(TF_WASM_DIR)/*.wasm \
  67. $(DEPLOY_DIR)
  68. deploy-rnnoise-binary:
  69. cp \
  70. $(RNNOISE_WASM_DIR)/rnnoise.wasm \
  71. $(DEPLOY_DIR)
  72. deploy-tflite:
  73. cp \
  74. $(TFLITE_WASM)/*.wasm \
  75. $(DEPLOY_DIR)
  76. deploy-excalidraw:
  77. cp -R \
  78. $(EXCALIDRAW_DIR) \
  79. $(DEPLOY_DIR)/
  80. deploy-excalidraw-dev:
  81. cp -R \
  82. $(EXCALIDRAW_DIR_DEV) \
  83. $(DEPLOY_DIR)/
  84. deploy-meet-models:
  85. cp \
  86. $(MEET_MODELS_DIR)/*.tflite \
  87. $(DEPLOY_DIR)
  88. deploy-face-landmarks:
  89. cp \
  90. $(FACE_MODELS_DIR)/blazeface-front.bin \
  91. $(FACE_MODELS_DIR)/blazeface-front.json \
  92. $(FACE_MODELS_DIR)/emotion.bin \
  93. $(FACE_MODELS_DIR)/emotion.json \
  94. $(DEPLOY_DIR)
  95. deploy-css:
  96. $(NODE_SASS) $(STYLES_MAIN) $(STYLES_BUNDLE) && \
  97. $(CLEANCSS) --skip-rebase $(STYLES_BUNDLE) > $(STYLES_DESTINATION) && \
  98. rm $(STYLES_BUNDLE)
  99. deploy-local:
  100. ([ ! -x deploy-local.sh ] || ./deploy-local.sh)
  101. .NOTPARALLEL:
  102. dev: deploy-init deploy-css deploy-rnnoise-binary deploy-tflite deploy-meet-models deploy-lib-jitsi-meet deploy-olm deploy-tf-wasm deploy-excalidraw-dev deploy-face-landmarks
  103. $(WEBPACK_DEV_SERVER)
  104. source-package: compile deploy
  105. mkdir -p source_package/jitsi-meet/css && \
  106. cp -r *.js *.html resources/*.txt fonts images libs static sounds LICENSE lang source_package/jitsi-meet && \
  107. cp css/all.css source_package/jitsi-meet/css && \
  108. (cd source_package ; tar cjf ../jitsi-meet.tar.bz2 jitsi-meet) && \
  109. rm -rf source_package