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-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
|
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`.'
|
For a comprehensive list of options, please refer to `v help --verbose`.'
|
||||||
//Use "v help <command>" for more information about a command.'
|
//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
|
//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.
|
doc Run vdoc over the source code and produce documentation.
|
||||||
translate Translates C to V. [wip, will be available in V 0.3]
|
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`
|
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:
|
V package management commands:
|
||||||
search keywords Search the https://vpm.vlang.io/ module repository for matching modules and shows their details.
|
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:
|
- To disable automatic formatting:
|
||||||
v -nofmt file.v
|
v -nofmt file.v
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,8 @@ const (
|
||||||
'test', 'test-fmt', 'test-compiler',
|
'test', 'test-fmt', 'test-compiler',
|
||||||
'bin2v',
|
'bin2v',
|
||||||
'repl',
|
'repl',
|
||||||
'build-tools', 'build-examples', 'build-vbinaries']
|
'build-tools', 'build-examples', 'build-vbinaries',
|
||||||
|
'setup-freetype']
|
||||||
)
|
)
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
Loading…
Reference in New Issue