Skip to content

Commit d22f791

Browse files
committed
Updated installation documentation
1 parent 4a76fd0 commit d22f791

17 files changed

+563
-144
lines changed

INSTALL.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# To build and use SDL_image:
2+
3+
SDL_image supports a number of development environments:
4+
- [CMake](docs/INTRO-cmake.md)
5+
- [Visual Studio on Windows](docs/INTRO-visualstudio.md)
6+
- [Xcode on Apple platforms](docs/INTRO-xcode.md)
7+
- [Android Studio](docs/INTRO-androidstudio.md)
8+
- [Emscripten for web](docs/INTRO-emscripten.md)
9+
10+
SDL_image is also usable in other environments. The basic steps are to use CMake to build the library and then use the headers and library that you built in your project. You can search online to see if anyone has specific steps for your setup.
11+
12+
# Documentation
13+
14+
An API reference and additional documentation is available at:
15+
16+
https://wiki.libsdl.org/SDL3_image
17+
18+
# Example code
19+
20+
There are simple example programs in the examples directory.
21+
22+
If you're using CMake, you can build them adding `-DSDLIMAGE_SAMPLES=ON` to the CMake command line when building SDL_image.
23+
24+
If you're using Visual Studio there are separate projects in the VisualC directory.
25+
26+
If you're using Xcode there are separate projects in the Xcode directory.
27+
28+
# Discussions
29+
30+
## Discord
31+
32+
You can join the official Discord server at:
33+
34+
https://discord.com/invite/BwpFGBWsv8
35+
36+
## Forums/mailing lists
37+
38+
You can join SDL development discussions at:
39+
40+
https://discourse.libsdl.org/
41+
42+
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
43+
44+
## Announcement list
45+
46+
You can sign up for the low traffic announcement list at:
47+
48+
https://www.libsdl.org/mailing-list.php
49+

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
SDL_image 3.0
3+
4+
This is a simple library to load images of various formats as SDL surfaces.
5+
It can load BMP, GIF, JPEG, LBM, PCX, PNG, PNM (PPM/PGM/PBM), QOI, TGA, XCF, XPM, and simple SVG format images. It can also load AVIF, JPEG-XL, TIFF, and WebP images, depending on build options.
6+
7+
The latest version of this library is available from GitHub:
8+
https://github.com/libsdl-org/SDL_image/releases
9+
10+
Installation instructions and a quick introduction is available in
11+
[INSTALL.md](INSTALL.md)
12+
13+
This library is distributed under the terms of the zlib license,
14+
available in [LICENSE.txt](LICENSE.txt).
15+
16+
Enjoy!
17+
18+
Sam Lantinga ([email protected])

README.txt

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 85 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,85 @@
1-
2-
The Simple DirectMedia Layer (SDL for short) is a cross-platform library
3-
designed to make it easy to write multi-media software, such as games
4-
and emulators.
5-
6-
The Simple DirectMedia Layer library source code is available from:
7-
https://www.libsdl.org/
8-
9-
This library is distributed under the terms of the zlib license:
10-
http://www.zlib.net/zlib_license.html
11-
12-
# @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar
13-
14-
This Android archive allows use of @<@PROJECT_NAME@>@ in your Android project, without needing to copy any SDL source.
15-
16-
## Gradle integration
17-
18-
For integration with CMake/ndk-build, it uses [prefab](https://google.github.io/prefab/).
19-
20-
Copy the aar archive (@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar) to a `app/libs` directory of your project.
21-
22-
In `app/build.gradle` of your Android project, add:
23-
```
24-
android {
25-
/* ... */
26-
buildFeatures {
27-
prefab true
28-
}
29-
}
30-
dependencies {
31-
implementation files('libs/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar')
32-
/* ... */
33-
}
34-
```
35-
36-
If you're using CMake, add the following to your CMakeLists.txt:
37-
```
38-
find_package(@<@PROJECT_NAME@>@ REQUIRED CONFIG)
39-
target_link_libraries(yourgame PRIVATE @<@PROJECT_NAME@>@::@<@PROJECT_NAME@>@)
40-
```
41-
42-
If you use ndk-build, add the following before `include $(BUILD_SHARED_LIBRARY)` to your `Android.mk`:
43-
```
44-
LOCAL_SHARED_LIBARARIES := @<@PROJECT_NAME@>@
45-
```
46-
And add the following at the bottom:
47-
```
48-
# https://google.github.io/prefab/build-systems.html
49-
50-
# Add the prefab modules to the import path.
51-
$(call import-add-path,/out)
52-
53-
# Import @<@PROJECT_NAME@>@ so we can depend on it.
54-
$(call import-module,prefab/@<@PROJECT_NAME@>@)
55-
```
56-
57-
---
58-
59-
## Other build systems (advanced)
60-
61-
If you want to build a project without Gradle,
62-
running the following command will extract the Android archive into a more common directory structure.
63-
```
64-
python @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar -o android_prefix
65-
```
66-
Add `--help` for a list of all available options.
67-
68-
69-
Look at the example programs in ./examples (of the source archive), and check out online documentation:
70-
https://wiki.libsdl.org/SDL3/FrontPage
71-
72-
Join the SDL discourse server if you want to join the community:
73-
https://discourse.libsdl.org/
74-
75-
76-
That's it!
77-
Sam Lantinga <[email protected]>
1+
2+
# Using this package
3+
4+
This package contains @<@PROJECT_NAME@>@ built for the Android platform.
5+
6+
## Gradle integration
7+
8+
For integration with CMake/ndk-build, it uses [prefab](https://google.github.io/prefab/).
9+
10+
Copy the aar archive (@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar) to a `app/libs` directory of your project.
11+
12+
In `app/build.gradle` of your Android project, add:
13+
```
14+
android {
15+
/* ... */
16+
buildFeatures {
17+
prefab true
18+
}
19+
}
20+
dependencies {
21+
implementation files('libs/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar')
22+
/* ... */
23+
}
24+
```
25+
26+
If you're using CMake, add the following to your CMakeLists.txt:
27+
```
28+
find_package(@<@PROJECT_NAME@>@ REQUIRED CONFIG)
29+
target_link_libraries(yourgame PRIVATE @<@PROJECT_NAME@>@::@<@PROJECT_NAME@>@)
30+
```
31+
32+
If you use ndk-build, add the following before `include $(BUILD_SHARED_LIBRARY)` to your `Android.mk`:
33+
```
34+
LOCAL_SHARED_LIBARARIES := @<@PROJECT_NAME@>@
35+
```
36+
And add the following at the bottom:
37+
```
38+
# https://google.github.io/prefab/build-systems.html
39+
40+
# Add the prefab modules to the import path.
41+
$(call import-add-path,/out)
42+
43+
# Import @<@PROJECT_NAME@>@ so we can depend on it.
44+
$(call import-module,prefab/@<@PROJECT_NAME@>@)
45+
```
46+
47+
---
48+
49+
## Other build systems (advanced)
50+
51+
If you want to build a project without Gradle,
52+
running the following command will extract the Android archive into a more common directory structure.
53+
```
54+
python @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar -o android_prefix
55+
```
56+
Add `--help` for a list of all available options.
57+
58+
# Documentation
59+
60+
An API reference and additional documentation is available at:
61+
62+
https://wiki.libsdl.org/@<@PROJECT_NAME@>@
63+
64+
# Discussions
65+
66+
## Discord
67+
68+
You can join the official Discord server at:
69+
70+
https://discord.com/invite/BwpFGBWsv8
71+
72+
## Forums/mailing lists
73+
74+
You can join SDL development discussions at:
75+
76+
https://discourse.libsdl.org/
77+
78+
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
79+
80+
## Announcement list
81+
82+
You can sign up for the low traffic announcement list at:
83+
84+
https://www.libsdl.org/mailing-list.php
85+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
# Using this package
3+
4+
This package contains @<@PROJECT_NAME@>@ built for the mingw-w64 toolchain.
5+
6+
The files for 32-bit architecture are in i686-w64-mingw32
7+
The files for 64-bit architecture are in x86_64-w64-mingw32
8+
9+
You can install them to another location, just type `make` for help.
10+
11+
To use this package, install the latest SDL3 package, point your include path at _arch_/include and your library path at _arch_/lib, link with the @<@PROJECT_NAME@>@ library and copy _arch_/bin/@<@PROJECT_NAME@>@.dll next to your executable.
12+
13+
e.g.
14+
```sh
15+
gcc -o hello.exe hello.c -Ix86_64-w64-mingw32/include -Lx86_64-w64-mingw32/lib -l@<@PROJECT_NAME@>@ -lSDL3
16+
cp x86_64-w64-mingw32/bin/@<@PROJECT_NAME@>@.dll .
17+
cp _SDL3_INSTALL_PATH_/bin/SDL3.dll .
18+
./hello.exe
19+
```
20+
21+
# Documentation
22+
23+
An API reference and additional documentation is available at:
24+
25+
https://wiki.libsdl.org/@<@PROJECT_NAME@>@
26+
27+
# Discussions
28+
29+
## Discord
30+
31+
You can join the official Discord server at:
32+
33+
https://discord.com/invite/BwpFGBWsv8
34+
35+
## Forums/mailing lists
36+
37+
You can join SDL development discussions at:
38+
39+
https://discourse.libsdl.org/
40+
41+
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
42+
43+
## Announcement list
44+
45+
You can sign up for the low traffic announcement list at:
46+
47+
https://www.libsdl.org/mailing-list.php
48+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
# Using this package
3+
4+
This package contains @<@PROJECT_NAME@>@ built for Visual Studio.
5+
6+
To use this package, edit your project properties:
7+
- Add the include directory to "VC++ Directories" -> "Include Directories"
8+
- Add the lib/_arch_ directory to "VC++ Directories" -> "Library Directories"
9+
- Add @<@PROJECT_NAME@>@.lib to Linker -> Input -> "Additional Dependencies"
10+
- Copy lib/_arch_/@<@PROJECT_NAME@>@.dll to your project directory.
11+
12+
# Documentation
13+
14+
An API reference and additional documentation is available at:
15+
16+
https://wiki.libsdl.org/@<@PROJECT_NAME@>@
17+
18+
# Discussions
19+
20+
## Discord
21+
22+
You can join the official Discord server at:
23+
24+
https://discord.com/invite/BwpFGBWsv8
25+
26+
## Forums/mailing lists
27+
28+
You can join SDL development discussions at:
29+
30+
https://discourse.libsdl.org/
31+
32+
Once you sign up, you can use the forum through the website or as a mailing list from your email client.
33+
34+
## Announcement list
35+
36+
You can sign up for the low traffic announcement list at:
37+
38+
https://www.libsdl.org/mailing-list.php
39+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
# Using this package
3+
4+
This package contains @<@PROJECT_NAME@>@ built for arm64 Windows.
5+
6+
To use this package, simply replace an existing 64-bit ARM @<@PROJECT_NAME@>@.dll with the one included here.
7+
8+
# Development packages
9+
10+
If you're looking for packages with headers and libraries, you can download one of these:
11+
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip, for development using Visual Studio
12+
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-mingw.zip, for development using mingw-w64
13+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
# Using this package
3+
4+
This package contains @<@PROJECT_NAME@>@ built for x64 Windows.
5+
6+
To use this package, simply replace an existing 64-bit @<@PROJECT_NAME@>@.dll with the one included here.
7+
8+
# Development packages
9+
10+
If you're looking for packages with headers and libraries, you can download one of these:
11+
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip, for development using Visual Studio
12+
- @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-mingw.zip, for development using mingw-w64
13+

0 commit comments

Comments
 (0)