Sfoglia il codice sorgente

Update windows setup

There have been some changes to how Logseq is setup so I've updated the documentation on how to setup Logseq on windows.
I've also added some scripts to the repo instead of having them in a separate gist.
samfundev 5 anni fa
parent
commit
d17b12fddf
3 ha cambiato i file con 29 aggiunte e 5 eliminazioni
  1. 2 0
      clojure.bat
  2. 13 5
      readme.org
  3. 14 0
      start-windows.bat

+ 2 - 0
clojure.bat

@@ -0,0 +1,2 @@
+@echo off
+cmd-clojure %*

+ 13 - 5
readme.org

@@ -63,11 +63,19 @@ If you're on Windows, use the [[#windows-setup][Windows setup]].
 *** 1. Required software
     Install clojure through scoop-clojure: https://github.com/littleli/scoop-clojure. You can also install [[https://nodejs.org/en/][Node.js]], [[https://yarnpkg.com/][Yarn]] and [[https://www.postgresql.org/download/][PostgreSQL]] through scoop if you want to.
 
-*** 2. Setup PostgreSQL
+*** 2. Creating a GitHub app
+    Follow [[step #2][#2-creating-a-github-app]] above if you want Logseq to connect to GitHub. If not, skip this section.
+    The ~GITHUB_APP_PEM~ variable in the ~run-windows.bat~ needs to be set with the correct directory for your system.
+
+*** 3. Setup PostgreSQL
     Make sure you have PostgreSQL running. You can check if it's running with ~pg_ctl status~ and use ~pg_ctl start~ to start it up.
     You'll also need to make a logseq DB in PostgreSQL. Do that with ~createdb logseq~.
 
-*** 3. Setup the server
-    Download [[https://gist.github.com/samfundev/98088dd76f67085f114c75493261aa3d][this little script]] that sets up the environment variables and runs ~cmd-clj -A:dev~.
-    The ~GITHUB_APP_PEM~ variable in the script needs to be set with the correct directory for your system.
-    Run that script in the repo and enter ~(go)~ into the interpreter.
+*** 4. Download the clojure server
+    Go to https://github.com/logseq/logseq-internal/releases, download the logseq.jar and move into the root directory of repo.
+
+*** 5. Start Logseq
+    Run ~start-windows.bat~ which is located in the repo. This will open a second terminal that runs Logseq's backend server.
+    To completely stop Logseq, you'll need to also close that second terminal that was opened.
+
+    ~start-windows.bat~ will try to start PostgreSQL for you if it's not already started.

+ 14 - 0
start-windows.bat

@@ -0,0 +1,14 @@
+@echo off
+SET ENVIRONMENT=dev
+SET JWT_SECRET=4fa183cf1d28460498b13330835e80ad
+SET COOKIE_SECRET=10a42ca724e34f4db6086a772d787034
+SET DATABASE_URL=postgres://localhost:5432/logseq
+SET GITHUB_APP2_ID=78728
+SET GITHUB_APP2_KEY=xxxxxxxxxxxxxxxxxxxx
+SET GITHUB_APP2_SECRET=xxxxxxxxxxxxxxxxxxxx
+SET GITHUB_APP_PEM=
+SET LOG_PATH=%AppData%\..\Local\Temp\logseq
+
+pg_ctl start
+start cmd.exe /k "java -Duser.timezone=UTC -jar logseq.jar"
+yarn && yarn watch