sjtug / SJTUThesis

上海交通大学 LaTeX 论文模板 | Shanghai Jiao Tong University LaTeX Thesis Template
Apache License 2.0
3.35k stars 792 forks source link

[ci] 添加 Windows CI #278

Closed gaocegege closed 6 years ago

gaocegege commented 6 years ago

https://www.appveyor.com/

这里有一个例子: https://github.com/gaocegege/Processing.R/blob/master/.appveyor.yml

at15 commented 6 years ago

@gaocegege 是不是该加一下了,又到了写毕设的季节,不能无视 windows 用户们啊 .w.

gaocegege commented 6 years ago

我不用,所以我不加

gaocegege commented 6 years ago

@at15 I'd appreciate it if you could do it :)

at15 commented 6 years ago

@gaocegege I don't use windows for thesis as well :smile:

gaocegege commented 6 years ago

I will take a look.

gaocegege commented 6 years ago

为了防止弃坑,遇到的问题都放在这个 issue 里,首先是 TexLive 的安装问题,感觉 https://yihui.name/cn/2017/06/lightweight-texlive/ 更合适

gaocegege commented 6 years ago

这个看了看 Windows 没文档,转到 TexLive

http://mirror.ctan.org/systems/texlive/tlnet/install-tl-windows.exe 因为要 GUI 所以不 work,尝试 http://ctan.math.washington.edu/tex-archive/systems/texlive/tlnet/install-tl.zip

gaocegege commented 6 years ago

https://superuser.com/questions/518347/equivalent-to-tars-strip-components-1-in-unzip

Fuck,install tl 目录里有一个目录名字是 install-tl-date,date 会变,这个很关键。

AlexaraWu commented 6 years ago
DATE=$(unzip -Z1 install-tl.zip | head -n 1 | grep -o '[0-9]\{8\}')

 这样可以不?

gaocegege commented 6 years ago

I will have a try. 不是很懂 Windows 上的 bash 支持是怎么实现的,起码括号是没的。。可以用 bash -c 这样

gaocegege commented 6 years ago

差不多可以了,还剩下上面提到的两个硬编码的问题

一个是 install-tl,一个是 texlive 的目录带年份的问题

gaocegege commented 6 years ago

https://www.appveyor.com/docs/team-setup/

真特么 hack,需要注册新的账号来当做 sjtug 的 CI 账号