1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tool: setup thirdparty 'freetype'

This commit is contained in:
yuyi
2020-02-25 01:01:35 +08:00
committed by GitHub
parent ef8c1203b4
commit aae14f4eb4
3 changed files with 34 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
module main
import (
os
filepath
v.pref
)
fn main() {
$if windows {
println('Setup freetype...')
vroot := filepath.dir(pref.vexe_path())
os.chdir(vroot)
if os.is_dir('./thirdparty/freetype') {
println('Thirdparty "freetype" is already installed.')
}
else {
s := os.exec('git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries ./thirdparty/freetype/') or {
panic(err)
}
println(s.output)
println('Thirdparty "freetype" installed successfully.')
}
}
$else {
println('It is only for Windows to setup thirdparty "freetype".')
}
}