Browse Source

Compile Windows binery as a GUI with icon

pull/523/head
Anders Jenbo 6 years ago
parent
commit
297e98e848
  1. 1
      CMake/mingwcc.cmake
  2. 7
      CMakeLists.txt
  3. 1
      Packaging/windows/devilutionx.rc
  4. BIN
      Packaging/windows/icon.ico
  5. 4
      README.md

1
CMake/mingwcc.cmake

@ -9,6 +9,7 @@ list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "${CROSS_PREFIX}/i686-w64-min
SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc")
SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++")
set(CMAKE_RC_COMPILER "i686-w64-mingw32-windres")
SET(CMAKE_FIND_ROOT_PATH "${CROSS_PREFIX}/i686-w64-mingw32" "${CROSS_PREFIX}/i686-w64-mingw32/i686-w64-mingw32")

7
CMakeLists.txt

@ -278,8 +278,9 @@ set(devilutionx_SRCS
SourceX/DiabloUI/title.cpp
SourceX/DiabloUI/ttf_render_wrapped.cpp
SourceX/main.cpp
./Packaging/macOS/AppIcon.icns
./Packaging/resources/CharisSILB.ttf)
Packaging/macOS/AppIcon.icns
Packaging/resources/CharisSILB.ttf
Packaging/windows/devilutionx.rc)
if(NOT NONET)
list(APPEND devilutionx_SRCS
@ -298,7 +299,7 @@ if(SWITCH)
set(BIN_TARGET devilutionx.elf)
endif()
add_executable(${BIN_TARGET} MACOSX_BUNDLE ${devilutionx_SRCS})
add_executable(${BIN_TARGET} WIN32 MACOSX_BUNDLE ${devilutionx_SRCS})
configure_file(SourceS/config.h.in config.h @ONLY)
target_include_directories(devilution PUBLIC Source SourceS ${CMAKE_CURRENT_BINARY_DIR})

1
Packaging/windows/devilutionx.rc

@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "icon.ico"

BIN
Packaging/windows/icon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

4
README.md

@ -10,10 +10,10 @@ Nightly builds | Platform
![Discord Channel](https://avatars3.githubusercontent.com/u/1965106?s=16&v=4) [Discord Chat Channel](https://discord.gg/aQBQdDe)
# How To Play:
- Copy diabdat.mpq from your CD, or GoG install folder, to the DevilutionX install folder or data folder; make sure it is all lowercase. The DeviliutionX install is the one that contains the DevilutionX executable. The data folder path may differ depending on OS version and security setting, but will normally be as following:
- Copy diabdat.mpq from your CD, or GoG install folder, to the DevilutionX install folder or data folder; make sure it is all lowercase. The DeviliutionX install folder is the one that contains the DevilutionX executable. The data folder path may differ depending on OS version and security setting, but will normally be as following:
- macOS `~/Library/Application Support/diasurgical/devilution`
- Linux `~/.local/share/diasurgical/devilution/`
- Windows `C:\Users[username]\AppData\Roaming\diasurgical\devilution`
- Windows `C:\Users\[username]\AppData\Roaming\diasurgical\devilution`
- [Download DevilutionX](https://github.com/diasurgical/devilutionX/releases), or build from source
- Install [SDL2](https://www.libsdl.org/download-2.0.php) (including [SDL2_mixer](https://www.libsdl.org/projects/SDL_mixer/) and [SDL2_ttf](https://www.libsdl.org/projects/SDL_ttf/))
- Run `./devilutionx`

Loading…
Cancel
Save