From 2e1a79a02809b4f6dd1691d7eba11d19ea2c5e6c Mon Sep 17 00:00:00 2001 From: actsl Date: Mon, 18 Sep 2017 19:07:12 +0000 Subject: [PATCH] Visual Studio SDL2-2.0.5 --- README.md | 30 ++++---- kiss_example1.sln | 0 kiss_example1.vcxproj | 18 +++-- kiss_example2.sln | 0 kiss_example2.vcxproj | 16 ++-- kiss_makefile | 172 +++++++++++++++++++++--------------------- 6 files changed, 119 insertions(+), 117 deletions(-) mode change 100644 => 100755 kiss_example1.sln mode change 100644 => 100755 kiss_example1.vcxproj mode change 100644 => 100755 kiss_example2.sln mode change 100644 => 100755 kiss_example2.vcxproj mode change 100644 => 100755 kiss_makefile diff --git a/README.md b/README.md index 1090889..c00bff5 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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, @@ -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 @@ -232,7 +232,7 @@ Michael Bethke (https://github.com/AVividLight), shuttersparks. VERSION ======= -1.2.4 +1.2.6 LICENSE diff --git a/kiss_example1.sln b/kiss_example1.sln old mode 100644 new mode 100755 diff --git a/kiss_example1.vcxproj b/kiss_example1.vcxproj old mode 100644 new mode 100755 index 9d99638..b12ebce --- a/kiss_example1.vcxproj +++ b/kiss_example1.vcxproj @@ -65,24 +65,24 @@ true . - C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.4\include;C:\SDL2_image-2.0.1\include;$(IncludePath) - C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath) + C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.5\include;C:\SDL2_image-2.0.1\include;$(IncludePath) + C:\SDL2-2.0.5\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath) true . - C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.4\include;C:\SDL2_image-2.0.1\include;$(IncludePath) - C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath) + C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.5\include;C:\SDL2_image-2.0.1\include;$(IncludePath) + C:\SDL2-2.0.5\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath) . - C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.4\include;C:\SDL2_image-2.0.1\include;$(IncludePath) - C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath) + C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.5\include;C:\SDL2_image-2.0.1\include;$(IncludePath) + C:\SDL2-2.0.5\lib\x64;C:\SDL2_ttf-2.0.14\lib\x64;C:\SDL2_image-2.0.1\lib\x64;$(LibraryPath) . - C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.4\include;C:\SDL2_image-2.0.1\include;$(IncludePath) - C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath) + C:\SDL2_ttf-2.0.14\include;C:\SDL2-2.0.5\include;C:\SDL2_image-2.0.1\include;$(IncludePath) + C:\SDL2-2.0.5\lib\x64;C:\SDL2_ttf-2.0.14\lib\x64;C:\SDL2_image-2.0.1\lib\x64;$(LibraryPath) @@ -118,11 +118,13 @@ 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) + Windows 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) + Windows diff --git a/kiss_example2.sln b/kiss_example2.sln old mode 100644 new mode 100755 diff --git a/kiss_example2.vcxproj b/kiss_example2.vcxproj old mode 100644 new mode 100755 index 7a4a76d..4f52886 --- a/kiss_example2.vcxproj +++ b/kiss_example2.vcxproj @@ -65,24 +65,24 @@ true . - C:\SDL2-2.0.4\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath) - C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath) + C:\SDL2-2.0.5\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath) + C:\SDL2-2.0.5\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath) true . - C:\SDL2-2.0.4\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath) - C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath) + C:\SDL2-2.0.5\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath) + C:\SDL2-2.0.5\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath) . - C:\SDL2-2.0.4\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath) - C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath) + C:\SDL2-2.0.5\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath) + C:\SDL2-2.0.5\lib\x64;C:\SDL2_ttf-2.0.14\lib\x64;C:\SDL2_image-2.0.1\lib\x64;$(LibraryPath) . - C:\SDL2-2.0.4\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath) - C:\SDL2-2.0.4\lib\x86;C:\SDL2_ttf-2.0.14\lib\x86;C:\SDL2_image-2.0.1\lib\x86;$(LibraryPath) + C:\SDL2-2.0.5\include;C:\SDL2_ttf-2.0.14\include;C:\SDL2_image-2.0.1\include;$(IncludePath) + C:\SDL2-2.0.5\lib\x64;C:\SDL2_ttf-2.0.14\lib\x64;C:\SDL2_image-2.0.1\lib\x64;$(LibraryPath) diff --git a/kiss_makefile b/kiss_makefile old mode 100644 new mode 100755 index 7c72121..c4f1234 --- a/kiss_makefile +++ b/kiss_makefile @@ -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) +