Compare commits

...

2 Commits

Author SHA1 Message Date
4ae5c99942 regenerate texi 2021-12-23 17:00:38 +08:00
71cc275c3e docs: Correct how to install gcc on Windows
PATH needs to be manually set on Windows. Previously, it was explicitly
mentioned that it was unnecessary. More recent experience is that it's necessary.
2021-12-23 16:59:28 +08:00
2 changed files with 31 additions and 34 deletions

View File

@ -288,29 +288,25 @@ in your Emacs environment as a prerequisite for Org-roam when you install it.
~emacsql-sqlite~ requires a C compiler (e.g. ~gcc~ or ~clang~) to be present in ~emacsql-sqlite~ requires a C compiler (e.g. ~gcc~ or ~clang~) to be present in
your computer. How to install a C compiler depends on the OS that you use. your computer. How to install a C compiler depends on the OS that you use.
- For Windows: **** C Compiler for Windows
There are various ways to install one, depending on how you have installed One of the easiest ways to install a C compiler in Windows is to use [[https://www.msys2.org/][MSYS2]] as at the time of this writing:
Emacs. If you use Emacs within a Cygwin or MinGW environment, then you should
install a compiler using their respective package manager.
If you have installed your Emacs from the [[https://www.gnu.org/software/emacs/][GNU Emacs website]], then the easiest way 1. Download and use the installer in the official MSYS2 website
is to use [[https://www.msys2.org/][MSYS2]] as at the time of this writing: 2. Run MSYS2 and in its terminal, type the following and answer "Y" to
proceed -- this will install ~gcc~ in your PC:
1. Use the installer in the official website and install MSYS2
2. Run MSYS2
3. In the command-line tool, type the following and answer "Y" to proceed:
#+BEGIN_SRC bash #+BEGIN_SRC bash
pacman -S gcc pacman -S gcc
#+END_SRC #+END_SRC
Note that you do not need to manually set the PATH for MSYS2; the 4. On Windows, add ~C:\msys64\usr\bin~ (command =where gcc= in MSYS2 terminal
installer automatically takes care of it for you. can tell you the correct path) to ~PATH~ in your environmental variables
4. Open Emacs and call ~M-x org-roam-db-autosync-mode~ 5. Launch Emacs and call ~M-x org-roam-db-autosync-mode~ (launch Emacs after
defining the path, so that Emacs can recognize it)
This will automatically start compiling ~emacsql-sqlite~; you should see a This will automatically start compiling ~emacsql-sqlite~; you should see a
message in minibuffer. It may take a while until compilation completes. Once message in minibuffer. It may take a while until compilation completes. Once
complete, you should see a new file ~emacsql-sqlite.exe~ created in a subfolder complete, you should see a new file ~emacsql-sqlite.exe~ created in a subfolder
named ~sqlite~ under ~emacsql-sqlite~ installation folder. It's typically in named ~sqlite~ under ~emacsql-sqlite~ installation folder. It's typically in

View File

@ -100,6 +100,10 @@ Installation Troubleshooting
* C Compiler:: * C Compiler::
C Compiler
* C Compiler for Windows::
Getting Started Getting Started
* The Org-roam Node:: * The Org-roam Node::
@ -535,42 +539,39 @@ in your Emacs environment as a prerequisite for Org-roam when you install it.
@code{emacsql-sqlite} requires a C compiler (e.g. @code{gcc} or @code{clang}) to be present in @code{emacsql-sqlite} requires a C compiler (e.g. @code{gcc} or @code{clang}) to be present in
your computer. How to install a C compiler depends on the OS that you use. your computer. How to install a C compiler depends on the OS that you use.
@itemize @menu
@item * C Compiler for Windows::
For Windows: @end menu
@end itemize
There are various ways to install one, depending on how you have installed @node C Compiler for Windows
Emacs. If you use Emacs within a Cygwin or MinGW environment, then you should @unnumberedsubsubsec C Compiler for Windows
install a compiler using their respective package manager.
If you have installed your Emacs from the @uref{https://www.gnu.org/software/emacs/, GNU Emacs website}, then the easiest way One of the easiest ways to install a C compiler in Windows is to use @uref{https://www.msys2.org/, MSYS2} as at the time of this writing:
is to use @uref{https://www.msys2.org/, MSYS2} as at the time of this writing:
@itemize @itemize
@item @item
Use the installer in the official website and install MSYS2 Download and use the installer in the official MSYS2 website
@item @item
Run MSYS2 Run MSYS2 and in its terminal, type the following and answer ``Y'' to
proceed -- this will install @code{gcc} in your PC:
@item
In the command-line tool, type the following and answer ``Y'' to proceed:
@example @example
pacman -S gcc pacman -S gcc
@end example @end example
Note that you do not need to manually set the PATH for MSYS2; the
@end itemize
installer automatically takes care of it for you.
@itemize
@item @item
Open Emacs and call @code{M-x org-roam-db-autosync-mode} On Windows, add @code{C:\msys64\usr\bin} (command @samp{where gcc} in MSYS2 terminal
can tell you the correct path) to @code{PATH} in your environmental variables
@item
Launch Emacs and call @code{M-x org-roam-db-autosync-mode} (launch Emacs after
defining the path, so that Emacs can recognize it)
@end itemize
This will automatically start compiling @code{emacsql-sqlite}; you should see a This will automatically start compiling @code{emacsql-sqlite}; you should see a
@end itemize
message in minibuffer. It may take a while until compilation completes. Once message in minibuffer. It may take a while until compilation completes. Once
complete, you should see a new file @code{emacsql-sqlite.exe} created in a subfolder complete, you should see a new file @code{emacsql-sqlite.exe} created in a subfolder
named @code{sqlite} under @code{emacsql-sqlite} installation folder. It's typically in named @code{sqlite} under @code{emacsql-sqlite} installation folder. It's typically in