tool: setup thirdparty 'freetype'
parent
ef8c1203b4
commit
aae14f4eb4
|
@ -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".')
|
||||
}
|
||||
}
|
|
@ -35,6 +35,8 @@ The commands are:
|
|||
test-fmt test if all files in the current directory is formatted properly
|
||||
test-compiler run the V self-test suite to make sure V is working properly
|
||||
|
||||
setup-freetype setup thirdparty freetype on Windows
|
||||
|
||||
For a comprehensive list of options, please refer to `v help --verbose`.'
|
||||
//Use "v help <command>" for more information about a command.'
|
||||
//TODO When docs have been written for all the subcommands, delete the verbose help text and
|
||||
|
@ -116,6 +118,7 @@ Commands:
|
|||
doc Run vdoc over the source code and produce documentation.
|
||||
translate Translates C to V. [wip, will be available in V 0.3]
|
||||
create Create a new v project interactively. Answer the questions, and run it with `v run projectname`
|
||||
setup-freetype Setup thirdparty freetype on Windows.
|
||||
|
||||
V package management commands:
|
||||
search keywords Search the https://vpm.vlang.io/ module repository for matching modules and shows their details.
|
||||
|
@ -128,4 +131,3 @@ V package management commands:
|
|||
- To disable automatic formatting:
|
||||
v -nofmt file.v
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue