2020-02-24 18:01:35 +01:00
|
|
|
module main
|
|
|
|
|
2020-04-26 08:32:05 +02:00
|
|
|
import os
|
|
|
|
import v.pref
|
2020-02-24 18:01:35 +01:00
|
|
|
|
2021-03-08 19:52:13 +01:00
|
|
|
const freetype_repo_url = 'https://github.com/ubawurinna/freetype-windows-binaries'
|
|
|
|
|
|
|
|
const freetype_folder = os.join_path('thirdparty', 'freetype')
|
|
|
|
|
2020-02-24 18:01:35 +01:00
|
|
|
fn main() {
|
|
|
|
$if windows {
|
|
|
|
println('Setup freetype...')
|
2020-03-07 22:26:26 +01:00
|
|
|
vroot := os.dir(pref.vexe_path())
|
2021-08-28 15:21:46 +02:00
|
|
|
os.chdir(vroot) ?
|
2021-03-08 19:52:13 +01:00
|
|
|
if os.is_dir(freetype_folder) {
|
2020-02-24 18:01:35 +01:00
|
|
|
println('Thirdparty "freetype" is already installed.')
|
2020-10-15 15:17:52 +02:00
|
|
|
} else {
|
2021-03-08 19:52:13 +01:00
|
|
|
s := os.execute('git clone --depth=1 $freetype_repo_url $freetype_folder')
|
|
|
|
if s.exit_code != 0 {
|
|
|
|
panic(s.output)
|
2020-02-24 18:01:35 +01:00
|
|
|
}
|
|
|
|
println(s.output)
|
|
|
|
println('Thirdparty "freetype" installed successfully.')
|
|
|
|
}
|
2020-10-15 15:17:52 +02:00
|
|
|
} $else {
|
2020-02-24 18:01:35 +01:00
|
|
|
println('It is only for Windows to setup thirdparty "freetype".')
|
|
|
|
}
|
|
|
|
}
|