PDA

View Full Version : Version 2.2 of SDL2-for-Pascal Units Released



Matthias
02-01-2024, 08:30 PM
EDIT: It would be great, if you could publish the following text. If you like, you could use the article image from https://www.freepascal-meets-sdl.net/. Attention, the text there is not identical. Best regards, Matthias.

https://www.freepascal-meets-sdl.net/wp-content/uploads/sdl2-v22-release.png

Version 2.2 of the SDL2-for-Pascal Units (https://github.com/PascalGameDevelopment/SDL2-for-Pascal) got released. It took nearly two and a half years to update the SDL2-for-Pascal Units (https://github.com/PascalGameDevelopment/SDL2-for-Pascal) to be quite up-to-date with the latest version of SDL2 (https://libsdl.org/). We got a really updated package now. For you this means, there is no good reason not to start using SDL2 in Pascal to realize your (game) projects, be it with Free Pascal or Delphi, on Linux, Windows or MacOS. ;-) – Other compilers and OS’es work too, probably. Feel invited to craft some patches to make it work with your compiler/OS, too.

I’d like to thank all contributors for their efforts. I’d also like to thank suve aka SuperVegeta, the co-maintainer and long-term PGD member, for the great cooperation, without which some large improvements would be missing in this release and some serious mistakes wouldn’t have been caught before merging the code :-)! I'd like to thank AthenaOfDelphi for hosting the repo on the PGD GitHub Account (and preparing the SDL3-for-Pascal repo already!)

Here are the offical release notes:


SDL2 unit is up-to-date with at least version 2.0.14 of the SDL2 library (exception sdlthread.inc)
many aliases got replaced by typed enums
add single and double pointers for all types (thanks furious-programming)
update SDL_ttf.pas to latest version 2.21.0
replace data types by c data types (see PR #29 (https://github.com/PascalGameDevelopment/SDL2-for-Pascal/pull/29))
add folder structure (see PR #27 (https://github.com/PascalGameDevelopment/SDL2-for-Pascal/pull/27))
many bugfixes


Happy New Year and Happy Coding!
Matthias

SilverWarior
03-01-2024, 07:53 AM
Impressive work on maintaining SDL2 headers for pascal with latest version of SDL2. From what I have read here and there there were quite a lot of changes made on SDL v2.2 which meant a lot for work for you guys maintaining headers up to date.

PS: I have promoted your thread into News article

Matthias
03-01-2024, 02:54 PM
Thanks for your words and thanks a lot for publishing! :)

Cybermonkey
08-01-2024, 08:48 PM
Well, that are good news. I hope I can now compile on macOS on Apple Silicon. Never got an answer to my post: https://www.pascalgamedevelopment.com/showthread.php?32789-Problem-with-compiling-SDL2-on-macOS-Ventura-with-Apple-Silicon
Now I am on macOS Sonoma - still no success in compiling. But maybe with the new Units? I will try it in the next few days.

EDIT: Still doesn't work. It is claimed that the units work with FPC and macOS. But how? ???

Seenkao
16-02-2024, 05:47 AM
Cybermonkey (https://www.pascalgamedevelopment.com/member.php?74944-Cybermonkey), вероятнее всего, на это вопрос вам ответят только сами разработчики SDL.

Google translate:
Cybermonkey (https://www.pascalgamedevelopment.com/member.php?74944-Cybermonkey), most likely, only the SDL developers themselves will answer this question for you.

Thyandyr
21-04-2024, 03:35 PM
Where to download the (correct version) .dll files

"SDL2 unit is up-to-date with at least version 2.0.14 of the SDL2 library"

SDL 2.0.14 on github does only have source for download.

The first release with assets other than source is 2.0.18

https://github.com/libsdl-org/SDL/releases/download/release-2.0.18/SDL2-2.0.18-win32-x64.zip

(https://github.com/libsdl-org/SDL/releases/download/release-2.0.18/SDL2-2.0.18-win32-x64.zip)Containing SDL2.dll, perhaps other dll's were merged into it?

Nah... still asking for SDL2_ttf.dll

Thatd be in another github repo releases:

https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.0.18/SDL2_ttf-2.0.18-win32-x64.zip

(https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.0.18/SDL2_ttf-2.0.18-win32-x64.zip)Oh... "Update SDL_ttf.pas to latest version 2.21.0"

The closest would then be https://github.com/libsdl-org/SDL_ttf/releases/download/prerelease-2.21.1/SDL2_ttf-2.21.1-win32-x64.zip
(https://github.com/libsdl-org/SDL_ttf/releases/download/prerelease-2.21.1/SDL2_ttf-2.21.1-win32-x64.zip)

I got things working with the above logic but have no idea if it is correct or not. First release after or the latest. Can one download SDL3 dlls and SLDforPascal 2.2 headers will work with them?