Skip to content

Commit 244378b

Browse files
authored
Update FLTK to 1.4.5 (#94)
1 parent ffcce44 commit 244378b

4 files changed

Lines changed: 37 additions & 20 deletions

File tree

.github/workflows/main.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,24 @@ jobs:
2121
with:
2222
path: lib/fltk
2323
repository: fltk/fltk
24-
ref: release-1.4.4
24+
ref: release-1.4.5
2525
fetch-depth: 1
2626

2727
- name: Install FLTK
2828
working-directory: lib/fltk
2929
run: |
30-
cmake -D CMAKE_INSTALL_PREFIX="$(realpath "$PWD/../..")" -D CMAKE_BUILD_TYPE=Release -D FLTK_GRAPHICS_CAIRO=1 -D FLTK_BACKEND_WAYLAND=0 -D FLTK_USE_SYSTEM_LIBPNG=0 -D FLTK_USE_SYSTEM_ZLIB=0 -D FLTK_BUILD_GL=0 -D FLTK_BUILD_TEST=0
31-
make
32-
make install
30+
cmake -B build \
31+
-D CMAKE_INSTALL_PREFIX="$(realpath "$PWD/../..")" \
32+
-D CMAKE_BUILD_TYPE=Release \
33+
-D FLTK_ABI_VERSION=10405 \
34+
-D FLTK_BUILD_GL=0 \
35+
-D FLTK_BUILD_TEST=0 \
36+
-D FLTK_GRAPHICS_CAIRO=1 \
37+
-D FLTK_BACKEND_WAYLAND=0 \
38+
-D FLTK_USE_SYSTEM_LIBPNG=0 \
39+
-D FLTK_USE_SYSTEM_ZLIB=0
40+
cmake --build build
41+
cmake --install build
3342
3443
- name: Build
3544
run: |

INSTALL.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ If the pre-built release already works for you, you don't have to build it yours
1818
1. On GitHub, click the green "**Code**" button and click "**Download ZIP**". This will download **tilemap-studio-master.zip**.
1919
2. Unzip tilemap-studio-master.zip. This will create the **tilemap-studio-master** folder.
2020
3. Navigate to the tilemap-studio-master folder in Explorer.
21-
4. Download fltk-1.4.4-source.tar.bz2 or fltk-1.4.4-source.tar.gz from [**fltk.org**](https://www.fltk.org/software.php) to a new **tilemap-studio-master\lib** subfolder.
22-
5. Extract fltk-1.4.4-source.tar (you may need a program such as [7-Zip](https://www.7-zip.org/)). This will create the lib\\**fltk-1.4.4** folder.
23-
6. Open Visual Studio, select **Open a local folder**, and open the lib\fltk-1.4.4 folder. This will automatically generate the CMake project with a configuration named **x64-Debug** by default.
24-
7. From the Configuration dropdown, select **Manage Configurations...**, click the green plus sign to add a new configuration, and select **x86-Release** from the list. Set the **Configuration type** to **Release**, set the **Toolset** to **msvc_x86_x64**, and uncheck the **FLTK_GRAPHICS_GDIPLUS** option in the list of CMake variables.
21+
4. Download fltk-1.4.5-source.tar.bz2 or fltk-1.4.5-source.tar.gz from [**fltk.org**](https://www.fltk.org/software.php) to a new **tilemap-studio-master\lib** subfolder.
22+
5. Extract fltk-1.4.5-source.tar (you may need a program such as [7-Zip](https://www.7-zip.org/)). This will create the lib\\**fltk-1.4.5** folder.
23+
6. Open Visual Studio, select **Open a local folder**, and open the lib\fltk-1.4.5 folder. This will automatically generate the CMake project with a configuration named **x64-Debug** by default.
24+
7. From the Configuration dropdown, select **Manage Configurations...**, click the green plus sign to add a new configuration, and select **x86-Release** from the list. Set the **Configuration type** to **Release** and set the **Toolset** to **msvc_x86_x64**. In the list of CMake variables, uncheck the **FLTK_GRAPHICS_GDIPLUS** option and set the **FLTK_ABI_VERSION** option to **10405**.
2525
8. Set the active Configuration to **x86-Release**.
2626
9. In the **Solution Explorer**, switch to the **CMake Targets View**, right-click on **fltk_images**, and select **Build fltk_images**. This will also build the other required libraries: fltk, fltk_png, and fltk_z.
27-
10. Move all the .lib files from lib\fltk-1.4.4\out\build\x86-Release\lib\\\*.lib up to lib\\\*.lib.
28-
11. Copy the lib\fltk-1.4.4\\**FL** folder to a new include\\**FL** folder. Also copy lib\fltk-1.4.4\out\build\x86-Release\FL\fl_config.h into include\FL.
27+
10. Move all the .lib files from lib\fltk-1.4.5\out\build\x86-Release\lib\\\*.lib up to lib\\\*.lib.
28+
11. Copy the lib\fltk-1.4.5\\**FL** folder to a new include\\**FL** folder. Also copy lib\fltk-1.4.5\out\build\x86-Release\FL\fl_config.h into include\FL.
2929
12. Open ide\tilemap-studio.sln in Visual Studio 2019.
3030
13. If the Solution Configuration dropdown on the toolbar says Debug, set it to **Release**.
3131
14. Go to **Build → Build Solution** or press F7 to build the project. This will create bin\Release\\**tilemapstudio.exe**.
@@ -45,7 +45,7 @@ CMake (version 3.15 or later) is required for building FLTK 1.4.
4545
Run the following commands:
4646

4747
```bash
48-
sudo apt install make g++ git autoconf
48+
sudo apt install make g++ git autoconf cmake
4949
sudo apt install zlib1g-dev libpng-dev libxpm-dev libx11-dev libxft-dev libxinerama-dev libfontconfig1-dev x11proto-xext-dev libxrender-dev libxfixes-dev libcairo2-dev libpango1.0-dev
5050
```
5151

@@ -54,7 +54,7 @@ sudo apt install zlib1g-dev libpng-dev libxpm-dev libx11-dev libxft-dev libxiner
5454
Run the following commands:
5555

5656
```bash
57-
sudo dnf install make g++ git autoconf
57+
sudo dnf install make g++ git autoconf cmake
5858
sudo dnf install zlib-devel libpng-devel libXpm-devel libX11-devel libXft-devel libXinerama-devel fontconfig-devel libXext-devel libXrender-devel libXfixes-devel libcairo2-devel libpango1.0-devel
5959
```
6060

@@ -67,12 +67,21 @@ Run the following commands:
6767
git clone https://github.com/Rangi42/tilemap-studio.git
6868
cd tilemap-studio
6969

70-
# Build FLTK 1.4.4
71-
git clone --branch release-1.4.4 --depth 1 https://github.com/fltk/fltk.git lib/fltk
70+
# Build FLTK 1.4.5
71+
git clone --branch release-1.4.5 --depth 1 https://github.com/fltk/fltk.git lib/fltk
7272
pushd lib/fltk
73-
cmake -D CMAKE_INSTALL_PREFIX="$(realpath "$PWD/../..")" -D CMAKE_BUILD_TYPE=Release -D FLTK_GRAPHICS_CAIRO=1 -D FLTK_BACKEND_WAYLAND=0 -D FLTK_USE_SYSTEM_LIBPNG=0 -D FLTK_USE_SYSTEM_ZLIB=0
74-
make
75-
make install
73+
cmake -B build \
74+
-D CMAKE_INSTALL_PREFIX="$(realpath "$PWD/../..")" \
75+
-D CMAKE_BUILD_TYPE=Release \
76+
-D FLTK_ABI_VERSION=10405 \
77+
-D FLTK_BUILD_GL=0 \
78+
-D FLTK_BUILD_TEST=0 \
79+
-D FLTK_GRAPHICS_CAIRO=1 \
80+
-D FLTK_BACKEND_WAYLAND=0 \
81+
-D FLTK_USE_SYSTEM_LIBPNG=0 \
82+
-D FLTK_USE_SYSTEM_ZLIB=0
83+
cmake --build build
84+
cmake --install build
7685
popd
7786

7887
# Build Tilemap Studio

src/preferences.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,3 @@ std::string Preferences::get_string(const char *key) {
9898
void Preferences::set_string(const char *key, const std::string &value) {
9999
_preferences->set(key, value.c_str());
100100
}
101-

src/widgets.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ int Default_Slider::handle(int event, int x, int y, int w, int h) {
340340

341341
HTML_View::HTML_View(int x, int y, int w, int h, const char *l) : Fl_Help_View(x, y, w, h, l) {
342342
box(OS_INPUT_THIN_DOWN_BOX);
343-
// TODO: scrollbar_.slider(OS_MINI_BUTTON_UP_BOX);
344-
// TODO: hscrollbar_.slider(OS_MINI_BUTTON_UP_BOX);
343+
scrollbar()->slider(OS_MINI_BUTTON_UP_BOX);
344+
hscrollbar()->slider(OS_MINI_BUTTON_UP_BOX);
345345
textsize(16);
346346
}
347347

0 commit comments

Comments
 (0)