remove freetype references everywhere
parent
863cf8af60
commit
ea76a33b43
28
README.md
28
README.md
|
@ -51,7 +51,7 @@ they are stabilized in 2020. Of course the APIs will grow after that, but withou
|
||||||
existing code.
|
existing code.
|
||||||
|
|
||||||
Unlike many other languages, V is not going to be always changing, with new features
|
Unlike many other languages, V is not going to be always changing, with new features
|
||||||
being introduced and old features modified. It is always going to be a small and simple
|
being introduced and old features modified. It is always going to be a small and simple
|
||||||
language, very similar to the way it is right now.
|
language, very similar to the way it is right now.
|
||||||
|
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ cd v
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
That's it! Now you have a V executable at `[path to V repo]/v`.
|
That's it! Now you have a V executable at `[path to V repo]/v`.
|
||||||
`[path to V repo]` can be anywhere.
|
`[path to V repo]` can be anywhere.
|
||||||
|
|
||||||
(On Windows `make` means running `make.bat`, so make sure you use `cmd.exe`)
|
(On Windows `make` means running `make.bat`, so make sure you use `cmd.exe`)
|
||||||
|
@ -104,20 +104,20 @@ executable. To do that, run:
|
||||||
sudo ./v symlink
|
sudo ./v symlink
|
||||||
```
|
```
|
||||||
|
|
||||||
On Windows, start a new shell with administrative privileges, for
|
On Windows, start a new shell with administrative privileges, for
|
||||||
example by <kbd>Windows Key</kbd>, then type `cmd.exe`, right click on its menu
|
example by <kbd>Windows Key</kbd>, then type `cmd.exe`, right click on its menu
|
||||||
entry, and choose `Run as administrator`. In the new administrative
|
entry, and choose `Run as administrator`. In the new administrative
|
||||||
shell, cd to the path, where you have compiled v.exe, then type:
|
shell, cd to the path, where you have compiled v.exe, then type:
|
||||||
```bat
|
```bat
|
||||||
.\v.exe symlink
|
.\v.exe symlink
|
||||||
```
|
```
|
||||||
That will make v available everywhere, by adding it to your PATH.
|
That will make v available everywhere, by adding it to your PATH.
|
||||||
Please restart your shell/editor after that, so that it can pick
|
Please restart your shell/editor after that, so that it can pick
|
||||||
the new PATH variable.
|
the new PATH variable.
|
||||||
|
|
||||||
NB: there is no need to run `v symlink` more than once - v will
|
NB: there is no need to run `v symlink` more than once - v will
|
||||||
continue to be available, even after `v up`, restarts and so on.
|
continue to be available, even after `v up`, restarts and so on.
|
||||||
You only need to run it again, if you decide to move the V repo
|
You only need to run it again, if you decide to move the V repo
|
||||||
folder somewhere else.
|
folder somewhere else.
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
|
@ -173,22 +173,20 @@ v run tetris/tetris.v
|
||||||
|
|
||||||
<img src='https://raw.githubusercontent.com/vlang/v/master/examples/tetris/screenshot.png' width=300>
|
<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.
|
If you plan to use the http package, you also need to install OpenSSL on non-Windows systems.
|
||||||
|
|
||||||
```
|
```
|
||||||
macOS:
|
macOS:
|
||||||
brew install freetype openssl
|
brew install openssl
|
||||||
|
|
||||||
Debian/Ubuntu:
|
Debian/Ubuntu:
|
||||||
sudo apt install libfreetype6-dev libssl-dev
|
sudo apt install libssl-dev
|
||||||
|
|
||||||
Arch/Manjaro:
|
Arch/Manjaro:
|
||||||
sudo pacman -S freetype2
|
openssl is installed by default
|
||||||
|
|
||||||
Fedora:
|
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 -I @VROOT/thirdparty/freetype/include
|
||||||
#flag windows -L @VROOT/thirdparty/freetype/win64
|
#flag windows -L @VROOT/thirdparty/freetype/win64
|
||||||
|
|
||||||
|
/*
|
||||||
#flag linux -I/usr/include/freetype2
|
#flag linux -I/usr/include/freetype2
|
||||||
#flag darwin -I/usr/local/include/freetype2
|
#flag darwin -I/usr/local/include/freetype2
|
||||||
// MacPorts
|
// MacPorts
|
||||||
|
@ -22,6 +23,7 @@ pub const (
|
||||||
#flag darwin -lfreetype
|
#flag darwin -lfreetype
|
||||||
|
|
||||||
#flag darwin -lpng -lbz2 -lz
|
#flag darwin -lpng -lbz2 -lz
|
||||||
|
*/
|
||||||
|
|
||||||
#flag linux -I.
|
#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
|
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)
|
type_sym := c.table.get_type_symbol(struct_init.typ)
|
||||||
if type_sym.kind == .sum_type && struct_init.fields.len == 1 {
|
if type_sym.kind == .sum_type && struct_init.fields.len == 1 {
|
||||||
sexpr := struct_init.fields[0].expr.str()
|
sexpr := struct_init.fields[0].expr.str()
|
||||||
|
|
Loading…
Reference in New Issue