安装 git 、golang、msys2、qt

去各自官网下载即可

git

官网:https://git-scm.com/
装好后,在PATH里添加:
C:\Program Files\Git\cmd

golang

官网下载页面:https://golang.org/dl/
下载压缩包(go1.12.4.windows-amd64.zip),我选择解压到“D:\soft\go”。
因为不是msi版,所以需要自己添加golang系统变量:

# GOROOT
D:\soft\Go\
# GoPath
D:\soft\gopath

加入PATH
D:\soft\gopath\bin;D:\msys64\mingw64\bin

msys2

去官网(https://www.msys2.org/)下载安装包,一路下一步即可。
我把安装路径改成了“ D:\msys64 ”。

利用msys2安装QT包

用到什么环境变量就添加环境变量
pacman -Syyu
pacman -S gcc
pacman -S mingw-w64-x86_64-qt-creator mingw-w64-x86_64-qt5
pacman -S mingw-w64-x86_64-qt-creator mingw-w64-x86_64-qt5-static
pacman -Scc

设置环境变量

QT相关

# QT_DIR
D:\msys64\mingw64\qt5-static
#QT_MSYS2_DIR
D:\msys64
# QT_MSYS2_ARCH
amd64
# QT_WEBKIT
true
#QT_MSYS2_STATIC
true

安装therecipe/qt

安装环境

可能需要翻墙,然后需要较长时间(1~2小时)

go get -v github.com/therecipe/qt/cmd/...
$GOPATH/bin/qtsetup

测试demo

go get -d -v github.com/therecipe/examples/...
cd $GOPATH/src/github.com/therecipe/examples
qtdeploy test desktop ./basic/widgets

参考文档:
windows安装therecipe/qt
【golang-GUI开发】Qt5的安装
therecipe/qt: Qt binding for Go (Golang)
therecipe/qt Installation on Windows

选择国内源

# 生成可用中国镜像站列表:
sudo pacman-mirrors --country China
# 或者
sudo pacman-mirrors --c China

升级系统

sudo pacman -Syyu

清华加速源

## 在 /etc/pacman.conf 文件末尾添加以下两行:
[archlinuxcn]
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
#之后安装 archlinuxcn-keyring 包导入 GPG key。
sudo pacman -Syyu && sudo pacman -S  archlinuxcn-keyring

常用命令行软件

sudo pacman -S htop zsh git vim curl unzip neofetch python lsof psmisc bmon net-tools sudo
## 需要ArchlinuxCN源
sudo pacman -S byobu cockpit aurman cockpit
## Aur软件
aurman -S google-chrome

更改系统编码

具体参考 Archlinux维基

# 查看系统编码
locale 
# 更改系统编码,取消相关行注释
sudo nano /etc/locale.gen
sudo locale-gen
sudo nano /etc/default/locale
# 添加一行
LANG="en_US.UTF-8"
# 使其生效
source /etc/default/locale
#或者
localectl set-locale LANG=en_US.UTF-8

设置terminal代理

export all_proxy=http://127.0.0.1:10800;
export https_proxy=http://127.0.0.1:10800;
export http_proxy=http://127.0.0.1:10800;
# socks5代理:
export https_proxy=socks5://127.0.0.1:10801;
export http_proxy=socks5://127.0.0.1:10801;

浏览器、 软件输入法、字体等

#浏览器、网盘、通讯软件
sudo pacman -S firefox firefox-i18n-zh-cn  telegram-desktop  dropbox chromium
#常用拼音、日语输入法
sudo pacman -S  fcitx fcitx-googlepinyin fcitx-mozc fcitx-cloudpinyin fcitx-configtool fcitx-gtk3 fcitx-gtk2
#输入法需要的环境变量,重新登入后生效
nano  ~/.pam_environment 
## 这里不是 shell,不写 export
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
# 常用字体
sudo pacman -S noto-fonts-emoji  adobe-source-han-sans-otc-fonts  adobe-source-code-pro-fonts noto-fonts-cjk ttf-dejavu

SSH更改默认端口、允许Root登陆

sudo nano /etc/ssh/sshd_config
##修改以下两句
#PermitRootLogin yes
#Port 22345
## 重启SSH服务
sudo systemctl restart sshd
sudo systemctl status sshd

设置时间、时间同步服务

# 设置时区
sudo timedatectl set-timezone  Asia/Shanghai
# 让 Linux 使用本地时间
sudo timedatectl set-local-rtc true
# ubuntu删除可能冲突的ntp:
sudo apt remove ntp
#编辑设置文件:
sudo nano /etc/systemd/timesyncd.conf
#添加时间服务器如下
[Time]
NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org 
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 0.fr.pool.ntp.org time.google.com 
# 设置时间同步服务:
sudo systemctl enable systemd-timesyncd
sudo systemctl restart systemd-timesyncd
#查看时间同步服务状态
sudo systemctl status systemd-timesyncd

修复系统

Manjaro部分指令,名称和Archlinux不一样,但是用法大致相同。

mkmanjaroroot --> mkchroot
manjarobuild --> buildpkg
mkset --> buildset
pacstrap --> basestrap
genfstab --> fstabgen
arch-chroot --> manjaro-chroot

修复系统的命令也跟着替换改变即可。

比如

pacstrap /mnt base base-devel
arch-chroot /mnt

调整为:

pacstrap /mnt base base-devel
arch-chroot /mnt

参考文档:
以官方Wiki的方式安装ArchLinux
记一次修复 Arch Linux 引导

下载链接:
https://dl.google.com/japanese-ime/2.24.3250.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/2.24.3250.0/googlejapaneseinput64.msi

只要替换链接中的版本号,就可以直接下到对应版本。
历史版本:
https://dl.google.com/japanese-ime/0.9.248.0/googlejapaneseinput.msi
https://dl.google.com/japanese-ime/0.10.288.0/googlejapaneseinput.msi
https://dl.google.com/japanese-ime/0.10.289.100/googlejapaneseinput.msi
https://dl.google.com/japanese-ime/0.13.521.0/googlejapaneseinputinterim32.msi
https://dl.google.com/japanese-ime/0.13.521.0/googlejapaneseinputinterim64.msi
https://dl.google.com/japanese-ime/1.0.556.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/1.0.556.0/googlejapaneseinput64.msi
https://dl.google.com/japanese-ime/1.1.770.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/1.1.770.0/googlejapaneseinput64.msi
https://dl.google.com/japanese-ime/1.2.825.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/1.2.825.0/googlejapaneseinput64.msi
https://dl.google.com/japanese-ime/1.3.974.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/1.3.974.0/googlejapaneseinput64.msi
https://dl.google.com/japanese-ime/1.5.1109.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/1.5.1109.0/googlejapaneseinput64.msi
https://dl.google.com/japanese-ime/1.6.1221.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/1.6.1221.0/googlejapaneseinput64.msi
https://dl.google.com/japanese-ime/1.7.1277.0/googlejapaneseinput32.msi ←开始支持Windows8的稳定版
https://dl.google.com/japanese-ime/1.7.1277.0/googlejapaneseinput64.msi ←同上
https://dl.google.com/japanese-ime/1.10.1380.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/1.10.1380.0/googlejapaneseinput64.msi
https://dl.google.com/japanese-ime/1.11.1515.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/1.11.1515.0/googlejapaneseinput64.msi
https://dl.google.com/japanese-ime/1.12.1590.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/1.12.1590.0/googlejapaneseinput64.msi
https://dl.google.com/japanese-ime/1.13.1641.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/1.13.1641.0/googlejapaneseinput64.msi
https://dl.google.com/japanese-ime/2.17.2320.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/2.17.2320.0/googlejapaneseinput64.msi
https://dl.google.com/japanese-ime/2.17.2400.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/2.17.2400.0/googlejapaneseinput64.msi
https://dl.google.com/japanese-ime/2.19.2600.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/2.19.2600.0/googlejapaneseinput64.msi
https://dl.google.com/japanese-ime/2.20.2750.0/googlejapaneseinput32.msi
https://dl.google.com/japanese-ime/2.20.2750.0/googlejapaneseinput64.msi