mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
remove freetype references everywhere
This commit is contained in:
parent
863cf8af60
commit
ea76a33b43
10
README.md
10
README.md
@ -173,22 +173,20 @@ v run tetris/tetris.v
|
||||
|
||||
<img src='https://raw.githubusercontent.com/vlang/v/master/examples/tetris/screenshot.png' width=300>
|
||||
|
||||
In order to build Tetris and anything else using the graphics module on non-Windows systems, you will need to install freetype libraries.
|
||||
|
||||
If you plan to use the http package, you also need to install OpenSSL on non-Windows systems.
|
||||
|
||||
```
|
||||
macOS:
|
||||
brew install freetype openssl
|
||||
brew install openssl
|
||||
|
||||
Debian/Ubuntu:
|
||||
sudo apt install libfreetype6-dev libssl-dev
|
||||
sudo apt install libssl-dev
|
||||
|
||||
Arch/Manjaro:
|
||||
sudo pacman -S freetype2
|
||||
openssl is installed by default
|
||||
|
||||
Fedora:
|
||||
sudo dnf install freetype-devel
|
||||
sudo dnf install openssl-devel
|
||||
```
|
||||
|
||||
|
||||
|
@ -9,6 +9,7 @@ pub const (
|
||||
#flag windows -I @VROOT/thirdparty/freetype/include
|
||||
#flag windows -L @VROOT/thirdparty/freetype/win64
|
||||
|
||||
/*
|
||||
#flag linux -I/usr/include/freetype2
|
||||
#flag darwin -I/usr/local/include/freetype2
|
||||
// MacPorts
|
||||
@ -22,6 +23,7 @@ pub const (
|
||||
#flag darwin -lfreetype
|
||||
|
||||
#flag darwin -lpng -lbz2 -lz
|
||||
*/
|
||||
|
||||
#flag linux -I.
|
||||
|
||||
|
@ -362,6 +362,9 @@ pub fn (mut c Checker) struct_init(mut struct_init ast.StructInit) table.Type {
|
||||
}
|
||||
struct_init.typ = c.expected_type
|
||||
}
|
||||
if struct_init.typ == 0 {
|
||||
c.error('unknown type', struct_init.pos)
|
||||
}
|
||||
type_sym := c.table.get_type_symbol(struct_init.typ)
|
||||
if type_sym.kind == .sum_type && struct_init.fields.len == 1 {
|
||||
sexpr := struct_init.fields[0].expr.str()
|
||||
|
Loading…
Reference in New Issue
Block a user