mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 00:24:51 +00:00
2.5 KiB
2.5 KiB
Build Logseq Desktop on Windows
Intro
This is a guidance on creating Logseq development environment on Windows with PowerShell. Non-platform specific instructions like this section in README.md should also be referenced in the practice.
Pre-requisites
- Ensure
Set-ExecutionPolicy Unrestricted(or other equivalent) - Good network connection. Here's An example of setting up proxy in PowerShell
- Node.js 16.x
- Clojure (follow this Guidance)
- JRE 8 (required for Clojure)
(updated 20220218. May confirm via JAVA_VERSION and NODE_VERSION in THIS FILE)
An example of installing pre-requisites on Windows
- Install Chocolatey
- Install JRE
choco install nvmnvm install 16.13(or whatever version)nvm use 16.13npm install -g yarnnvm use 16.13- Install clj-on-windows
Congrats! The pre-requisites are ready.
Set-up development environment (web app)
The basic idea is replacing the clojure commands in package.json to clj.
Go to your cloned Logseq repo. Then:
yarn(to install dependencies. Refer THIS if you want to setup proxy)clj -M:cljs watch app electron(thecljequivalent ofyarn cljs:watch)
Now you can access the app via http://localhost:3001 and all changes to the code will be watched.
Set-up development environment (desktop)
yarnclj -M:cljs release app publishing electron --debug(thecljequivalent ofyarn release, to build the app intostaticdirectory)cd staticyarncd ..
Then do the gulp's job manually (as it's not available on Windows). Folloing commands are equivalent to yarn dev-electron-app:
- copy files in
resourcestostatic yarn css:buildcd staticyarn electron:dev
The desktop app should be pop-up on your screen.
An example of setting up proxy in PowerShell
$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>'