Files
logseq/docs/develop-logseq-on-windows.md
Adam Hupp 34e806999f Simplify Windows development docs (#8857)
* Simplify Windows development docs

This PR simplifies the Windows development setup documentation, specifically:

 * Uses `winget` for installing pre-requisites.  This is installed by default on modern windows and is now the "standard" package manager.
 * Use clj-msi to install clj.exe, rather than the clojure-tools powershell module.  This allows the build to work without modifying package.json
 * Remove build instructions that are out of date and now inconsistent with the develop-logseq.md doc.

* Update develop-logseq-on-windows.md

Include scoop and chocolately instructions, explicitly redirect to develop-logseq.md for build info.
2023-04-05 12:56:48 -04:00

2.0 KiB

Setup Logseq development dependencies on Windows

This is a guide on setting up Logseq development dependencies on Windows. Once these dependencies are installed, you can follow the develop-logseq docs for build instructions.

Winget

Winget is a package manager installed by default on windows.

winget install --id CoreyButler.NVMforWindows
nvm install 18
nvm use 18
npm install -g yarn
winget install --id Microsoft.OpenJDK.17
winget install --id Microsoft.VisualStudio.2022.Community

An installer for clojure is available from casselc/clj-msi

chocolatey

choco install nvm
nvm install 18
nvm use 18
npm install -g yarn
choco install visualstudio2022community
choco install javaruntime
choco install clojure

scoop

scoop bucket add scoop-clojure https://github.com/littleli/scoop-clojure
scoop bucket add extras
scoop bucket add java
scoop install java/openjdk clojure clj-deps babashka leiningen nodejs-lts

Troubleshooting

Configuring a proxy for internet access

$env:GLOBAL_AGENT_HTTPS_PROXY='http://<proxy-host>:<proxy-port>'
$env:ELECTRON_GET_USE_PROXY='true'
$env:HTTPS_PROXY='http://<proxy-host>:<proxy-port>'
$env:HTTP_PROXY='http://<proxy-host>:<proxy-port>'

node-gyp cannot find visual studio

During the build process node-gyp may complain that it cannot find Visual Studio. Try building the app in Developer Powershell for VS(shipped with Visual Studio). If this does not work for you, This issue may be helpful.

Set up Clojure CLI repository mirror

add the following pair to deps.edn:

:mvn/repos {
  "central" {:url "https://maven.aliyun.com/repository/public"}
  "clojars" {:url "https://mirrors.tuna.tsinghua.edu.cn/clojars"}
}

The mirrors above are friendly to Chinese developers(with bad network), developers with self-hosted repositories can use their own services.