gradle and build systems for c language
DESCRIPTION
Gradle and build systems for C language. Explaining basics of Gradle on simple examples. How to add support for Visual Studio or Linux package to build.TRANSCRIPT
![Page 1: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/1.jpg)
Gradle and build systemsfor C language
28.4.2014FI MUNI, Brno
Juraj Michálekhttp://georgik.sinusgear.com
![Page 2: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/2.jpg)
Grab the source codehttps://github.com/georgik/fimuni-c-cpp-examples.git
![Page 3: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/3.jpg)
Who am I?
![Page 4: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/4.jpg)
SDL
Gradle
CMake
Nuget
![Page 5: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/5.jpg)
tiobe.com - programming lang. index
![Page 6: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/6.jpg)
Let’s start with something
cool
![Page 7: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/7.jpg)
The Battle for Wesnoth
![Page 8: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/8.jpg)
![Page 9: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/9.jpg)
Multiplatform
SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
![Page 10: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/10.jpg)
SDL versions
1.2 stable - rock solid
2.x development - new features
![Page 11: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/11.jpg)
Some basic concepts
![Page 12: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/12.jpg)
SDL_init(flags)
SDL_INIT_TIMER - The timer subsystemSDL_INIT_AUDIO - The audio subsystemSDL_INIT_VIDEO - The video subsystemSDL_INIT_CDROM - The cdrom subsystemSDL_INIT_JOYSTICK - The joystick subsystemSDL_INIT_EVERYTHING - All of the aboveSDL_INIT_NOPARACHUTE - Prevents SDL from catching fatal signalsSDL_INIT_EVENTTHREAD - Runs the event manager in a separate thread
![Page 13: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/13.jpg)
Quit application
SDL_quit()
![Page 14: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/14.jpg)
Window
SDL_CreateWindow("Hello World!", 100, 100, 640, 480, SDL_WINDOW_SHOWN);
![Page 15: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/15.jpg)
Load bitmap
SDL_Surface *bmp = NULL;bmp = SDL_LoadBMP("./smajlik.bmp");
![Page 16: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/16.jpg)
Visual data
SDL_RendererSDL_Texture
![Page 17: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/17.jpg)
Keyboard
SDL_PollEvent(SDL_Event *event)
event.key.keysym.sym
![Page 18: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/18.jpg)
Timer
SDL_TimerID SDL_AddTimer( Uint32 interval, SDL_TimerCallback callback, void* param)
![Page 19: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/19.jpg)
Mouse
SDL_GetMouseState(*x, *y);
![Page 20: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/20.jpg)
Text
Not implemented
![Page 21: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/21.jpg)
Extensions
extension for many languages:
C++, Java, Lua, Perl, PHP, Python, Ruby
![Page 22: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/22.jpg)
Made with SDL
![Page 23: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/23.jpg)
Autiomation Evolved
![Page 24: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/24.jpg)
Domain Specific Language
![Page 25: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/25.jpg)
gradle tasks
![Page 26: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/26.jpg)
build.gradle gradle tasks
gradle hello
![Page 27: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/27.jpg)
Plugin system
● focussed functionality is added by plugins● reuse patterns and practices● avoiding boilerplate build code
![Page 28: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/28.jpg)
C language plugin
build.gradle
gradle tasks
![Page 29: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/29.jpg)
C build executableDirectory structure
build.gradle
![Page 30: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/30.jpg)
gradle tasks
gradle mE
![Page 31: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/31.jpg)
Linux
Windows
![Page 32: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/32.jpg)
Visual Studio plugin
![Page 33: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/33.jpg)
![Page 34: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/34.jpg)
![Page 35: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/35.jpg)
![Page 36: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/36.jpg)
Gradle wrapperDownload and prepare infrastructure
![Page 37: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/37.jpg)
![Page 38: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/38.jpg)
Download SDL2 (for VS)
![Page 39: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/39.jpg)
![Page 40: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/40.jpg)
Sources
![Page 41: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/41.jpg)
Toolchains
![Page 42: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/42.jpg)
Helper files for compilers
![Page 43: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/43.jpg)
Build Debian/Ubuntu packages
![Page 44: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/44.jpg)
Gradle Debian Plugin
https://github.com/gesellix/gradle-debian-plugin.git
![Page 45: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/45.jpg)
Further Gradle training
https://github.com/ysoftdevs/gradle-training
![Page 46: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/46.jpg)
PyGame
Power of C and Power of Pythonhttp://www.pygame.org
![Page 48: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/48.jpg)
![Page 49: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/49.jpg)
Allegro
![Page 50: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/50.jpg)
![Page 51: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/51.jpg)
Allegro 5.1
Win, Lin, Mac
iOS, Android
http://alleg.sourceforge.net/a5docs/refman/
![Page 52: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/52.jpg)
Initialization
al_init();
![Page 53: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/53.jpg)
Graphic environment
al_create_display(int w, int h)
![Page 54: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/54.jpg)
![Page 56: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/56.jpg)
![Page 57: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/57.jpg)
![Page 58: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/58.jpg)
Cppcheck
![Page 59: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/59.jpg)
L10N - verify your translations
http://www.microsoft.com/Language
![Page 60: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/60.jpg)
![Page 61: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/61.jpg)
Continuous integration
![Page 62: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/62.jpg)
![Page 63: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/63.jpg)
Raspberry Pi
![Page 64: Gradle and build systems for C language](https://reader033.vdocuments.us/reader033/viewer/2022042613/554d27e3b4c905ca208b5029/html5/thumbnails/64.jpg)
Opportunity for innovative students
Bachelor and master thesis @Y Soft
Contact person: [email protected]