examples: move SDL examples from vlib to examples dir
parent
5c8617ec68
commit
5142747ceb
|
@ -212,10 +212,13 @@ jobs:
|
||||||
#- uses: actions/setup-node@v1
|
#- uses: actions/setup-node@v1
|
||||||
# with:
|
# with:
|
||||||
# node-version: 12.x
|
# node-version: 12.x
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries.git thirdparty/freetype/
|
||||||
|
.\.github\workflows\windows-install-sdl.bat
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
gcc --version
|
gcc --version
|
||||||
git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries.git thirdparty/freetype/
|
|
||||||
.\make.bat -gcc
|
.\make.bat -gcc
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
|
@ -235,11 +238,14 @@ jobs:
|
||||||
#- uses: actions/setup-node@v1
|
#- uses: actions/setup-node@v1
|
||||||
# with:
|
# with:
|
||||||
# node-version: 12.x
|
# node-version: 12.x
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries.git thirdparty/freetype/
|
||||||
|
.\.github\workflows\windows-install-sdl.bat
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
echo %VFLAGS%
|
echo %VFLAGS%
|
||||||
echo $VFLAGS
|
echo $VFLAGS
|
||||||
git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries.git thirdparty/freetype/
|
|
||||||
.\make.bat -msvc
|
.\make.bat -msvc
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
curl -L https://www.libsdl.org/release/SDL2-devel-2.0.10-VC.zip -o SDL2.zip
|
||||||
|
curl -L https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.15-VC.zip -o SDL2_ttf.zip
|
||||||
|
curl -L https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip -o SDL2_image.zip
|
||||||
|
curl -L https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-2.0.4-VC.zip -o SDL2_mixer.zip
|
||||||
|
|
||||||
|
unzip SDL2.zip -d thirdparty/
|
||||||
|
unzip SDL2_ttf.zip -d thirdparty/
|
||||||
|
unzip SDL2_image.zip -d thirdparty/
|
||||||
|
unzip SDL2_mixer.zip -d thirdparty/
|
||||||
|
|
||||||
|
mv thirdparty/SDL2-2.0.10 thirdparty/SDL2
|
||||||
|
mv thirdparty/SDL2_ttf-2.0.15 thirdparty/SDL2_ttf
|
||||||
|
mv thirdparty/SDL2_image-2.0.5 thirdparty/SDL2_image
|
||||||
|
mv thirdparty/SDL2_mixer-2.0.4 thirdparty/SDL2_mixer
|
|
@ -67,6 +67,11 @@ info.log
|
||||||
*~
|
*~
|
||||||
|
|
||||||
thirdparty/freetype/
|
thirdparty/freetype/
|
||||||
|
thirdparty/sdl2/
|
||||||
|
thirdparty/SDL2_image/
|
||||||
|
thirdparty/SDL2_mixer/
|
||||||
|
thirdparty/SDL2_ttf/
|
||||||
|
|
||||||
cachegrind.out.*
|
cachegrind.out.*
|
||||||
|
|
||||||
.gdb_history
|
.gdb_history
|
||||||
|
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 926 B After Width: | Height: | Size: 926 B |
|
@ -2,11 +2,12 @@ module image
|
||||||
import sdl
|
import sdl
|
||||||
|
|
||||||
#flag linux -lSDL2_image
|
#flag linux -lSDL2_image
|
||||||
#include <SDL_image.h>
|
|
||||||
|
|
||||||
// following kludge until `sdl2-config ...` is supported also on windows
|
#flag windows -I @VROOT/thirdparty/SDL2_image/include
|
||||||
#flag windows -I/msys64/mingw64/include/SDL2
|
#flag windows -L @VROOT/thirdparty/SDL2_image/lib/x64
|
||||||
#flag windows -L/mingw64/lib -lSDL2_image
|
#flag windows -lSDL2_image
|
||||||
|
|
||||||
|
#include <SDL_image.h>
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
// SDL_Image.h
|
// SDL_Image.h
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
module mixer
|
module mixer
|
||||||
import sdl
|
import sdl
|
||||||
|
|
||||||
|
#flag windows -I @VROOT/thirdparty/SDL2_mixer/include
|
||||||
|
#flag windows -L @VROOT/thirdparty/SDL2_mixer/lib/x64
|
||||||
|
#flag windows -lSDL2_mixer
|
||||||
|
|
||||||
#include <SDL_mixer.h>
|
#include <SDL_mixer.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,10 @@ module sdl
|
||||||
|
|
||||||
#flag -DSDL_DISABLE_IMMINTRIN_H
|
#flag -DSDL_DISABLE_IMMINTRIN_H
|
||||||
|
|
||||||
// following kludge until `sdl2-config ...` is supported also on windows
|
#flag windows -I @VROOT/thirdparty/SDL2/include
|
||||||
#flag windows -I/msys64/mingw64/include/SDL2
|
|
||||||
#flag windows -Dmain=SDL_main
|
#flag windows -Dmain=SDL_main
|
||||||
#flag windows -L/mingw64/lib -lmingw32 -lSDL2main -lSDL2 -lSDL2_ttf -lSDL2_mixer -lSDL2_image
|
#flag windows -lSDL2main -lSDL2
|
||||||
|
#flag windows -L @VROOT/thirdparty/SDL2/lib/x64
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,10 @@ module ttf
|
||||||
|
|
||||||
import sdl
|
import sdl
|
||||||
|
|
||||||
|
#flag windows -I @VROOT/thirdparty/SDL2_ttf/include
|
||||||
|
#flag windows -L @VROOT/thirdparty/SDL2_ttf/lib/x64
|
||||||
|
#flag windows -lSDL2_ttf
|
||||||
|
|
||||||
#include <SDL_ttf.h>
|
#include <SDL_ttf.h>
|
||||||
|
|
||||||
[typedef]
|
[typedef]
|
||||||
|
|
Loading…
Reference in New Issue