linux on win7
Cygwin、Msys、MinGW、Msys2的区别与联系
近期在一台thinkpad上折腾win7, 起初是想用emacs, 发现需要一些linux上的工具链,结果发各种linux相关的环境Cygwin/Msys/MinGW/Msys2…
How-does-MSYS2-differ-from-Cygwinmsys2= cygwin1.dll + pacmancygwin= cygwin1.dll + setup.exemingw不依赖cygwin1.dll, 是原生方式实现了少量重要的GNU工具msys2= cygwin1.dll + pacman + mingw64/clang/ucart
diff table
| software | pros&cons |
|---|---|
Cygwin |
win上大而全的linux模拟器 编译出的软件在win上需要依靠虚拟层才能正常运行 |
MinGW |
提供工具链,编译出来的软件是 windows native的 仅提供工具,缺少可用系统和包管理工具 |
Msys2 |
可提供最小可用的system 并有包管理工具pacman |
| Ref: | Cygwin、Msys、MinGW、Msys2的区别与联系(转) |
emacs_on_win
1. General config
1.1 Create a HOME system environment variable.
- set
HOMEvariable c:/Users/usernameread the prepare steps first before installation - set symbolic link to * repository
mklink /D .emacs.d d:*\emacs.d
1.2 download & install msys2
(the last version can run on win7)https://repo.msys2.org/distrib/x86_64/
msys2-x86_64-20221028.exe
(you can install it in d:msys64)
1.3 update msys2
execute multiple times until the last status
1 | pacman -Syu |
1.4 install emacs
1 | pacman -S emacs |
1.5 run emacs
tui
run emacs from Msys2-msys2gui
run emacs from D:\*\msys64\mingw64\bin\emacs-28.2.exe
run emacs from Msys2-MinGW
1.6 install plugins
switch between emacs(cli) & emacs(gui) several times to run and install packages as many as possible
when stuck on some init-file config like (scroll-bar-mode -1),you can just comment it. it’s OK to do so, because we want to install asmany package, and the final aim is to use pdf-tools & org-noter
2. config pdf-tool& org-noter
2.1 install pdf-tool
run pdf-tool-install from emacs(gui)
2.2 eval pdf-tool & org-noter lisp code
open init-org from D:*\emacs.d\lisp\init-org.el
- eval key-binding & use-package related lisp code
- eval
(require 'org-noter_modifer)to allow use custom org-noter function - config linum-mode
before open an pdf, you have to turn linum-mode off. This could be done by adding apdf-view-mode-hookhook, or you’ll stuck when try open pdf file.
2.3 open pdf & org-noter
D:\*\*.orgM-x execute org-noer