1 | module main |
2 | |
3 | import os |
4 | |
5 | const freetype_repo_url = 'https://github.com/ubawurinna/freetype-windows-binaries' |
6 | |
7 | const freetype_folder = os.join_path('thirdparty', 'freetype') |
8 | |
9 | fn main() { |
10 | $if windows { |
11 | println('Setup freetype...') |
12 | vroot := os.dir(os.real_path(os.getenv_opt('VEXE') or { @VEXE })) |
13 | os.chdir(vroot)! |
14 | if os.is_dir(freetype_folder) { |
15 | println('Thirdparty "freetype" is already installed.') |
16 | } else { |
17 | s := os.execute('git clone --filter=blob:none ${freetype_repo_url} ${freetype_folder}') |
18 | if s.exit_code != 0 { |
19 | panic(s.output) |
20 | } |
21 | println(s.output) |
22 | println('Thirdparty "freetype" installed successfully.') |
23 | } |
24 | } $else { |
25 | println('It is only for Windows to setup thirdparty "freetype".') |
26 | } |
27 | } |