rebuild-wekan.bat 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. @ECHO OFF
  2. REM TODO: Test how to fix this
  3. REM Installing NPM on Windows: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
  4. REM Install meteor with: npm -g install meteor
  5. REM Old info: https://github.com/wekan/wekan/wiki/Install-Wekan-from-source-on-Windows
  6. REM Please add fix PRs, like config of MongoDB etc.
  7. md C:\repos
  8. cd C:\repos
  9. REM Install chocolatey
  10. @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
  11. choco install -y git curl python2 dotnet4.5.2 nano mongodb-4 mongoclient
  12. curl -O https://nodejs.org/dist/v14.21.3/node-v14.21.3-x64.msi
  13. call node-v14.21.3-x64.msi
  14. call npm config -g set msvs_version 2015
  15. call meteor npm config -g set msvs_version 2015
  16. call npm -g install npm
  17. call npm -g install meteor
  18. call npm -g install node-gyp
  19. call npm -g install fibers
  20. cd C:\repos
  21. git clone https://github.com/wekan/wekan.git
  22. cd wekan
  23. echo "Building Wekan."
  24. REM del /S /F /Q packages
  25. REM ## REPOS BELOW ARE INCLUDED TO WEKAN
  26. REM md packages
  27. REM cd packages
  28. REM git clone --depth 1 -b master https://github.com/wekan/flow-router.git kadira-flow-router
  29. REM git clone --depth 1 -b master https://github.com/meteor-useraccounts/core.git meteor-useraccounts-core
  30. REM git clone --depth 1 -b master https://github.com/wekan/meteor-accounts-cas.git
  31. REM git clone --depth 1 -b master https://github.com/wekan/wekan-ldap.git
  32. REM git clone --depth 1 -b master https://github.com/wekan/wekan-scrollbar.git
  33. REM git clone --depth 1 -b master https://github.com/wekan/meteor-accounts-oidc.git
  34. REM git clone --depth 1 -b master --recurse-submodules https://github.com/wekan/markdown.git
  35. REM move meteor-accounts-oidc/packages/switch_accounts-oidc wekan_accounts-oidc
  36. REM move meteor-accounts-oidc/packages/switch_oidc wekan_oidc
  37. REM del /S /F /Q meteor-accounts-oidc
  38. REM sed -i 's/api\.versionsFrom/\/\/api.versionsFrom/' ~/repos/wekan/packages/meteor-useraccounts-core/package.js
  39. cd ..
  40. REM del /S /F /Q node_modules
  41. call meteor npm install
  42. REM del /S /F /Q .build
  43. call meteor build .build --directory
  44. REM ## Remove legacy webbroser bundle, so that Wekan works also at Android Firefox, iOS Safari, etc.
  45. del /S /F /Q rm .build/bundle/programs/web.browser.legacy
  46. REM ## Install some NPM packages
  47. cd .build\bundle\programs\server
  48. call meteor npm install
  49. REM cd C:\repos\wekan\.meteor\local\build\programs\server
  50. REM del node_modules
  51. cd C:\repos\wekan
  52. call start-wekan.bat