Skip to content

Commit

Permalink
Remove Unicode support (ihhub#3886)
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-derevenetz authored Jul 24, 2021
1 parent e2a2bb8 commit 1c9b08e
Show file tree
Hide file tree
Showing 57 changed files with 82 additions and 1,134 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang_analyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install dependencies and clang-tools
run: |
sudo apt-get update
sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev gettext clang-tools
sudo apt-get install -y libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev gettext clang-tools
- name: Analyze
run: scan-build --status-bugs -v make -j 2
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clang_tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- name: Install dependencies and clang-tidy
run: |
sudo apt-get update
sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev gettext clang-tidy
sudo apt-get install -y libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev gettext clang-tidy
- name: Prepare compile_commands.json
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release -DUSE_SDL_VERSION=SDL2 -DENABLE_IMAGE=ON -DENABLE_UNICODE=ON -DENABLE_TOOLS=ON -DFHEROES2_STRICT_COMPILATION=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake -B build -DCMAKE_BUILD_TYPE=Release -DUSE_SDL_VERSION=SDL2 -DENABLE_IMAGE=ON -DENABLE_TOOLS=ON -DFHEROES2_STRICT_COMPILATION=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Create results directory
run: |
mkdir clang-tidy-result
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ jobs:
- name: Linux SDL1
os: ubuntu-latest
sdl_version: SDL
dependencies: libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev
dependencies: libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev
- name: Linux SDL2
os: ubuntu-latest
sdl_version: SDL2
dependencies: libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
dependencies: libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev
- name: macOS SDL1
os: macos-latest
sdl_version: SDL
dependencies: sdl sdl_image sdl_mixer sdl_ttf
dependencies: sdl sdl_image sdl_mixer
- name: macOS SDL2
os: macos-latest
sdl_version: SDL2
dependencies: sdl2 sdl2_image sdl2_mixer sdl2_ttf
dependencies: sdl2 sdl2_image sdl2_mixer
name: CMake (${{ matrix.config.name }})
runs-on: ${{ matrix.config.os }}
steps:
Expand All @@ -42,7 +42,7 @@ jobs:
brew install ${{ matrix.config.dependencies }}
- name: Build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release -DUSE_SDL_VERSION=${{ matrix.config.sdl_version }} -DENABLE_IMAGE=ON -DENABLE_UNICODE=ON -DENABLE_TOOLS=ON -DFHEROES2_STRICT_COMPILATION=ON
cmake -B build -DCMAKE_BUILD_TYPE=Release -DUSE_SDL_VERSION=${{ matrix.config.sdl_version }} -DENABLE_IMAGE=ON -DENABLE_TOOLS=ON -DFHEROES2_STRICT_COMPILATION=ON
cmake --build build -j2
- name: Install
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,39 @@ jobs:
config:
- name: Linux SDL1 Release
os: ubuntu-latest
dependencies: libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev gettext
dependencies: libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev gettext
env: { FHEROES2_SDL1: ON, WITH_TOOLS: ON, FHEROES2_STRICT_COMPILATION: ON }
package_name: fheroes2_ubuntu_sdl1.zip
package_files: fheroes2 LICENSE fheroes2.key script/linux/install_sdl_1.sh demo_unix.sh changelog.txt README.txt files/lang/*.mo
release_name: Ubuntu (Linux) build with SDL 1.2 support (latest commit)
release_tag: fheroes2-linux-sdl1_dev
- name: Linux SDL1 Debug
os: ubuntu-latest
dependencies: libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev gettext
dependencies: libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev gettext
env: { FHEROES2_SDL1: ON, WITH_TOOLS: ON, FHEROES2_STRICT_COMPILATION: ON, DEBUG: ON }
- name: Linux SDL2 Release
os: ubuntu-latest
dependencies: libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev gettext
dependencies: libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev gettext
env: { WITH_TOOLS: ON, FHEROES2_STRICT_COMPILATION: ON }
package_name: fheroes2_ubuntu_sdl2.zip
package_files: fheroes2 LICENSE fheroes2.key script/linux/install_sdl_2.sh demo_unix.sh changelog.txt README.txt files/lang/*.mo
release_name: Ubuntu (Linux) build with SDL 2.0 support (latest commit)
release_tag: fheroes2-linux-sdl2_dev
- name: Linux SDL2 Debug
os: ubuntu-latest
dependencies: libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev gettext
dependencies: libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev gettext
env: { WITH_TOOLS: ON, FHEROES2_STRICT_COMPILATION: ON, DEBUG: ON }
- name: macOS SDL1
os: macos-10.15
dependencies: sdl sdl_ttf sdl_mixer sdl_image
dependencies: sdl sdl_mixer sdl_image
env: { FHEROES2_SDL1: ON, WITH_TOOLS: ON, FHEROES2_STRICT_COMPILATION: ON }
package_name: fheroes2_macos10_15_sdl1.zip
package_files: fheroes2 LICENSE fheroes2.key script/macos/install_sdl_1.sh demo_unix.sh changelog.txt README.txt files/lang/*.mo
release_name: MacOS build with SDL 1 support (latest commit)
release_tag: fheroes2-osx-sdl1_dev
- name: macOS SDL2
os: macos-10.15
dependencies: sdl2 sdl2_ttf sdl2_mixer sdl2_image
dependencies: sdl2 sdl2_mixer sdl2_image
env: { WITH_TOOLS: ON, FHEROES2_STRICT_COMPILATION: ON }
package_name: fheroes2_macos10_15_sdl2.zip
package_files: fheroes2 LICENSE fheroes2.key script/macos/install_sdl_2.sh demo_unix.sh changelog.txt README.txt files/lang/*.mo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev gettext
sudo apt-get install -y libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev gettext
- name: Initialize SonarCloud
run: |
mkdir -p ~/.sonarcloud
Expand Down
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ set(USE_SDL_VERSION SDL2 CACHE STRING "SDL version")
set_property(CACHE USE_SDL_VERSION PROPERTY STRINGS ${SDL_VERSIONS})

option(ENABLE_IMAGE "Enable SDL/SDL2 Image support (requires libpng)" ON)
option(ENABLE_UNICODE "Enable Unicode support (requires SDL/SDL2 TTF and iconv libraries)" ON)
option(ENABLE_TOOLS "Enable additional tools" OFF)
option(ENABLE_RELEASE "Release mode (disables debug options)" ON)
option(GET_HOMM2_DEMO "Fetch and install HoMM II demo data" OFF)
Expand All @@ -35,10 +34,6 @@ if(ENABLE_IMAGE)
find_package(${USE_SDL_VERSION}_image REQUIRED)
find_package(PNG REQUIRED)
endif(ENABLE_IMAGE)
if(ENABLE_UNICODE)
find_package(${USE_SDL_VERSION}_ttf REQUIRED)
find_package(Iconv REQUIRED)
endif(ENABLE_UNICODE)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
# DEBUG: build in debug mode
# RELEASE: build with addons extensions
#
# WITHOUT_UNICODE: build without unicode (disable translation and ttf font)
# FHEROES2_IMAGE_SUPPORT: build with SDL image support
# WITH_TOOLS: build tools
# FHEROES2_STRICT_COMPILATION: build with strict compilation option (makes warnings into errors)
Expand Down
2 changes: 1 addition & 1 deletion Makefile.vita
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $(PROJECT).velf: $(PROJECT).elf
vita-elf-create $< $@

$(PROJECT).elf:
$(MAKE) -f Makefile -C src FHEROES2_VITA=true RELEASE=true WITHOUT_UNICODE=true
$(MAKE) -f Makefile -C src FHEROES2_VITA=true RELEASE=true
$(MAKE) -f files/lang/Makefile
@cp src/dist/$(TARGET) ./$(PROJECT).elf

Expand Down
4 changes: 2 additions & 2 deletions VisualStudio/SDL2.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)packages\installed\sdl2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WITH_TTF;FHEROES2_IMAGE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>FHEROES2_IMAGE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(MSBuildThisFileDirectory)packages\installed\sdl2\lib/$(PlatformTarget);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>SDL2.lib;SDL2_mixer.lib;SDL2_ttf.lib;SDL2_image.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>SDL2.lib;SDL2_mixer.lib;SDL2_image.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>xcopy /Y "$(MSBuildThisFileDirectory)packages\installed\sdl2\lib\$(PlatformTarget)\*.dll" "$(OutDir)"
Expand Down
222 changes: 0 additions & 222 deletions cmake/FindSDL2_ttf.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ If you have a legally purchased copy of the original game, copy all files belong

* **openSUSE**: openSUSE supports the One-Click-Install using the `SDL_mixer.ymp` file from the `script/linux` subdirectory.

* **Gentoo**: run the following command: `emerge --ask media-libs/sdl2-mixer media-libs/sdl2-ttf`.
* **Gentoo**: run the following command: `emerge --ask media-libs/sdl2-mixer`.

* After all dependencies are installed, copy all files belonging to the original game to the fheroes2 installation directory if you have a legally purchased copy of the original game. Otherwise, you can download and install the demo version of the original game by running the `demo_unix.sh` script supplied in the ZIP archive.

Expand Down
Loading

0 comments on commit 1c9b08e

Please sign in to comment.