Skip to content

Commit

Permalink
Visual Studio SDL2-2.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
actsl committed Sep 18, 2017
1 parent b3cd2be commit 2e1a79a
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 117 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ existing toolkits, which makes it impossible for many people to even use
them. At that it was made universal, many simpler toolkits don't enable
you to do many things that you want, due to their restricted internal
design. This toolkit implements an original innovative approach for a
widget toolkit, this new approach enabled to make the widget toolkit
simpler. The toolkit is written in C, but it can also be used in C++.
widget toolkit that i call principal GUI, going further from immediate
GUI, this new approach enabled to make the widget toolkit simpler. The
toolkit is written in C, but it can also be used in C++.

The widget toolkit is made as modifiable as possible, so that it will
not stand on the way of doing what the user may want to do. The code of
Expand Down Expand Up @@ -181,16 +182,15 @@ Path (in user variables). Or copy them to the Windows system directory,
but then they may have to be replaced when using different versions
of SDL2.

The kiss_makefile compiles the examples that show all the widgets
in the toolkit. The kiss_makefile was made for Linux, to use it in
Windows, edit it, comment the lines LDFLAGS, CFLAGS, EXE1 and EXE2, and
uncomment the corresponding lines for 32 bit Windows, 64 bit Windows
or Macintosh. The Xcode command line tools also have to be installed
standalone in Macintosh. Then change the paths to the directories under
which you installed the SDL2 development libraries. By default, it is
assumed that the libraries are installed under C:\\. No change may be
necessary, or the change may be simple, like only changing the version
of the library from 2.0.5 to 2.0.6.
The kiss_makefile compiles the examples that show all the widgets in the
toolkit. The kiss_makefile was made for Linux, to use it in Windows, edit
it, comment the lines LDFLAGS, CFLAGS, EXE1 and EXE2, and uncomment the
corresponding lines for 32 bit Windows, 64 bit Windows or macOS. The Xcode
command line tools also have to be installed standalone in macOS. Then
change the paths to the directories under which you installed the SDL2
development libraries. By default, it is assumed that the libraries are
installed under C:\\. No change may be necessary, or the change may be
simple, like only changing the version of the library from 2.0.5 to 2.0.6.

In Windows, this toolkit was tested with MinGW-w64, installed with the
installer downloaded from https://sourceforge.net/projects/mingw-w64 for
Expand All @@ -200,7 +200,7 @@ tested. A 32 bit compiler also works with 64 bit Windows, but a 64 bit
compiler cannot be used with 32 bit Windows.

It was also tested in the Visual Studio Community 2015 and SDL2 version
2.0.4. The project files for the Visual Studio are provided, but a similar
2.0.5. The project files for the Visual Studio are provided, but a similar
changes to the library paths should be made if necessary, as described
above, in the project -> properties -> configuration properties -> vc++
directories. The paths of the 64 bit SDL2 libraries for x64 are entered,
Expand All @@ -209,7 +209,7 @@ but it was not tested with x64.
For compiling in Visual Studio, run kiss_example1.vcxproj or
kiss_example2.vcxproj, make sure that on the toolbar x86 is selected
(instead of x64), it was tested with x86, then build. Use one of the
following commands to compile either in Linux or Macintosh, or in Windows
following commands to compile either in Linux or macOS, or in Windows
using MinGW.

make -f kiss_makefile
Expand All @@ -232,7 +232,7 @@ Michael Bethke (https://github.com/AVividLight), shuttersparks.
VERSION
=======

1.2.4
1.2.6


LICENSE
Expand Down
Empty file modified kiss_example1.sln
100644 → 100755
Empty file.
18 changes: 10 additions & 8 deletions kiss_example1.vcxproj
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,24 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>.</OutDir>
<IncludePath>C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.4\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath)</LibraryPath>
<IncludePath>C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.5\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.5\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>.</OutDir>
<IncludePath>C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.4\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath)</LibraryPath>
<IncludePath>C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.5\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.5\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>.</OutDir>
<IncludePath>C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.4\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath)</LibraryPath>
<IncludePath>C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.5\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.5\lib\x64;C:\SDL2_ttf-2.0.14\lib\x64;C:\SDL2_image-2.0.1\lib\x64;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>.</OutDir>
<IncludePath>C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.4\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath)</LibraryPath>
<IncludePath>C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.5\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.5\lib\x64;C:\SDL2_ttf-2.0.14\lib\x64;C:\SDL2_image-2.0.1\lib\x64;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
Expand Down Expand Up @@ -118,11 +118,13 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Link>
<AdditionalDependencies>SDL2main.lib;SDL2.lib;SDL2_image.lib;SDL2_ttf.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Link>
<AdditionalDependencies>SDL2main.lib;SDL2.lib;SDL2_image.lib;SDL2_ttf.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
Empty file modified kiss_example2.sln
100644 → 100755
Empty file.
16 changes: 8 additions & 8 deletions kiss_example2.vcxproj
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,24 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>.</OutDir>
<IncludePath>C:\SDL2-2.0.4\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath)</LibraryPath>
<IncludePath>C:\SDL2-2.0.5\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.5\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>.</OutDir>
<IncludePath>C:\SDL2-2.0.4\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath)</LibraryPath>
<IncludePath>C:\SDL2-2.0.5\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.5\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>.</OutDir>
<IncludePath>C:\SDL2-2.0.4\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath)</LibraryPath>
<IncludePath>C:\SDL2-2.0.5\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.5\lib\x64;C:\SDL2_ttf-2.0.14\lib\x64;C:\SDL2_image-2.0.1\lib\x64;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>.</OutDir>
<IncludePath>C:\SDL2-2.0.4\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath)</LibraryPath>
<IncludePath>C:\SDL2-2.0.5\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath)</IncludePath>
<LibraryPath>C:\SDL2-2.0.5\lib\x64;C:\SDL2_ttf-2.0.14\lib\x64;C:\SDL2_image-2.0.1\lib\x64;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
Expand Down
172 changes: 86 additions & 86 deletions kiss_makefile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,86 +1,86 @@
#CPP = clang++
#C = clang
CPP = g++
C = gcc

### 32 bit Windows

#LDFLAGS = -LC:\SDL2-2.0.5\i686-w64-mingw32\lib \
-LC:\SDL2_ttf-2.0.14\i686-w64-mingw32\lib \
-LC:\SDL2_image-2.0.1\i686-w64-mingw32\lib \
-lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf \
-mwindows -m32 -march=i686
#CFLAGS = -IC:\SDL2-2.0.5\i686-w64-mingw32\include \
-IC:\SDL2-2.0.5\i686-w64-mingw32\include\SDL2 \
-IC:\SDL2_ttf-2.0.14\i686-w64-mingw32\include \
-IC:\SDL2_image-2.0.1\i686-w64-mingw32\include \
-Wall -c -std=c89 -m32 -march=i686
#EXE1 = kiss_example1.exe
#EXE2 = kiss_example2.exe

### 64 bit Windows

#LDFLAGS = -LC:\SDL2-2.0.5\x86_64-w64-mingw32\lib \
-LC:\SDL2_ttf-2.0.14\x86_64-w64-mingw32\lib \
-LC:\SDL2_image-2.0.1\x86_64-w64-mingw32\lib \
-lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf \
-mwindows
#CFLAGS = -IC:\SDL2-2.0.5\x86_64-w64-mingw32\include \
-IC:\SDL2-2.0.5\x86_64-w64-mingw32\include\SDL2 \
-IC:\SDL2_ttf-2.0.14\x86_64-w64-mingw32\include \
-IC:\SDL2_image-2.0.1\x86_64-w64-mingw32\include \
-Wall -c -std=c89
#EXE1 = kiss_example1.exe
#EXE2 = kiss_example2.exe

### Macintosh

#LDFLAGS = -framework SDL2 -framework SDL2_ttf -framework SDL2_image
#CFLAGS = -I/Library/Frameworks/SDL2.framework/Headers \
-I/Library/Frameworks/SDL2_ttf.framework/Headers \
-I/Library/Frameworks/SDL2_image.framework/Headers \
-Wall -c -std=c89
#EXE1 = kiss_example1
#EXE2 = kiss_example2

### Linux

LDFLAGS = -lSDL2 -lSDL2_image -lSDL2_ttf
CFLAGS = -Wall -c -std=c89
EXE1 = kiss_example1
EXE2 = kiss_example2

all: $(EXE1) $(EXE2)

$(EXE1): kiss_example1.o kiss_widgets.o kiss_draw.o kiss_general.o \
kiss_posix.o
$(C) $^ $(LDFLAGS) -o $@

$(EXE2): kiss_example2.o kiss_widgets.o kiss_draw.o kiss_general.o \
kiss_posix.o
$(C) $^ $(LDFLAGS) -o $@

kiss_example1.o: kiss_example1.c
$(C) $(CFLAGS) $^ -o $@

kiss_example2.o: kiss_example2.c
$(C) $(CFLAGS) $^ -o $@

kiss_widgets.o: kiss_widgets.c
$(C) $(CFLAGS) $^ -o $@

kiss_draw.o: kiss_draw.c
$(C) $(CFLAGS) $^ -o $@

kiss_general.o: kiss_general.c
$(C) $(CFLAGS) $^ -o $@

kiss_posix.o: kiss_posix.c
$(C) $(CFLAGS) $^ -o $@

clean:
rm *.o && rm $(EXE1) && rm $(EXE2)
# del *.o
# del $(EXE1)
# del $(EXE2)

#CPP = clang++
#C = clang
CPP = g++
C = gcc
### 32 bit Windows
#LDFLAGS = -LC:\SDL2-2.0.5\i686-w64-mingw32\lib \
-LC:\SDL2_ttf-2.0.14\i686-w64-mingw32\lib \
-LC:\SDL2_image-2.0.1\i686-w64-mingw32\lib \
-lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf \
-mwindows -m32 -march=i686
#CFLAGS = -IC:\SDL2-2.0.5\i686-w64-mingw32\include \
-IC:\SDL2-2.0.5\i686-w64-mingw32\include\SDL2 \
-IC:\SDL2_ttf-2.0.14\i686-w64-mingw32\include \
-IC:\SDL2_image-2.0.1\i686-w64-mingw32\include \
-Wall -c -std=c89 -m32 -march=i686
#BIN1 = kiss_example1.exe
#BIN2 = kiss_example2.exe
### 64 bit Windows
#LDFLAGS = -LC:\SDL2-2.0.5\x86_64-w64-mingw32\lib \
-LC:\SDL2_ttf-2.0.14\x86_64-w64-mingw32\lib \
-LC:\SDL2_image-2.0.1\x86_64-w64-mingw32\lib \
-lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf \
-mwindows
#CFLAGS = -IC:\SDL2-2.0.5\x86_64-w64-mingw32\include \
-IC:\SDL2-2.0.5\x86_64-w64-mingw32\include\SDL2 \
-IC:\SDL2_ttf-2.0.14\x86_64-w64-mingw32\include \
-IC:\SDL2_image-2.0.1\x86_64-w64-mingw32\include \
-Wall -c -std=c89
#BIN1 = kiss_example1.exe
#BIN2 = kiss_example2.exe
### macOS
#LDFLAGS = -framework SDL2 -framework SDL2_ttf -framework SDL2_image
#CFLAGS = -I/Library/Frameworks/SDL2.framework/Headers \
-I/Library/Frameworks/SDL2_ttf.framework/Headers \
-I/Library/Frameworks/SDL2_image.framework/Headers \
-Wall -c -std=c89
#BIN1 = kiss_example1
#BIN2 = kiss_example2
### Linux
LDFLAGS = -lSDL2 -lSDL2_image -lSDL2_ttf
CFLAGS = -Wall -c -std=c89
BIN1 = kiss_example1
BIN2 = kiss_example2
all: $(BIN1) $(BIN2)
$(BIN1): kiss_example1.o kiss_widgets.o kiss_draw.o kiss_general.o \
kiss_posix.o
$(C) $^ $(LDFLAGS) -o $@
$(BIN2): kiss_example2.o kiss_widgets.o kiss_draw.o kiss_general.o \
kiss_posix.o
$(C) $^ $(LDFLAGS) -o $@
kiss_example1.o: kiss_example1.c
$(C) $(CFLAGS) $^ -o $@
kiss_example2.o: kiss_example2.c
$(C) $(CFLAGS) $^ -o $@
kiss_widgets.o: kiss_widgets.c
$(C) $(CFLAGS) $^ -o $@
kiss_draw.o: kiss_draw.c
$(C) $(CFLAGS) $^ -o $@
kiss_general.o: kiss_general.c
$(C) $(CFLAGS) $^ -o $@
kiss_posix.o: kiss_posix.c
$(C) $(CFLAGS) $^ -o $@
clean:
rm *.o && rm $(BIN1) && rm $(BIN2)
# del *.o
# del $(BIN1)
# del $(BIN2)

0 comments on commit 2e1a79a

Please sign in to comment.