mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Progress towards making everything build on Windows.
This commit is contained in:
2
.github/workflows/ccpp.yml
vendored
2
.github/workflows/ccpp.yml
vendored
@@ -90,7 +90,7 @@ jobs:
|
|||||||
wsl --import fedora fedora install.tar.gz
|
wsl --import fedora fedora install.tar.gz
|
||||||
wsl --set-default fedora
|
wsl --set-default fedora
|
||||||
wsl sh -c 'dnf -y install https://github.com/rpmsphere/noarch/raw/master/r/rpmsphere-release-40-1.noarch.rpm'
|
wsl sh -c 'dnf -y install https://github.com/rpmsphere/noarch/raw/master/r/rpmsphere-release-40-1.noarch.rpm'
|
||||||
wsl sh -c 'dnf -y install gcc gcc-c++ protobuf-c-compiler protobuf-devel fmt-devel systemd-devel sqlite-devel wxGTK-devel mingw32-gcc mingw32-gcc-c++ mingw32-zlib-static mingw32-protobuf-static mingw32-sqlite-static mingw32-wxWidgets3-static mingw32-libpng-static mingw32-libjpeg-static mingw32-libtiff-static mingw32-nsis png2ico ninja-build'
|
wsl sh -c 'dnf -y install gcc gcc-c++ protobuf-c-compiler protobuf-devel fmt-devel systemd-devel sqlite-devel wxGTK-devel mingw32-gcc mingw32-gcc-c++ mingw32-zlib-static mingw32-protobuf-static mingw32-sqlite-static mingw32-wxWidgets3-static mingw32-libpng-static mingw32-libjpeg-static mingw32-libtiff-static mingw32-nsis png2ico ninja-build mingw32-freetype mingw32-curl-static mingw32-boost-static'
|
||||||
|
|
||||||
- name: fix line endings
|
- name: fix line endings
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
12
.gitmodules
vendored
12
.gitmodules
vendored
@@ -26,3 +26,15 @@
|
|||||||
[submodule "dep/lunasvg"]
|
[submodule "dep/lunasvg"]
|
||||||
path = dep/lunasvg
|
path = dep/lunasvg
|
||||||
url = https://github.com/sammycage/lunasvg.git
|
url = https://github.com/sammycage/lunasvg.git
|
||||||
|
[submodule "dep/file"]
|
||||||
|
path = dep/file
|
||||||
|
url = https://github.com/file/file
|
||||||
|
[submodule "dep/md4c"]
|
||||||
|
path = dep/md4c
|
||||||
|
url = https://github.com/mity/md4c
|
||||||
|
[submodule "dep/nlohmann_json"]
|
||||||
|
path = dep/nlohmann_json
|
||||||
|
url = https://github.com/nlohmann/json
|
||||||
|
[submodule "dep/cli11"]
|
||||||
|
path = dep/cli11
|
||||||
|
url = https://github.com/CLIUtils/CLI11
|
||||||
|
|||||||
8
Makefile
8
Makefile
@@ -13,14 +13,16 @@ ifeq ($(BUILDTYPE),windows)
|
|||||||
CC = $(MINGW)gcc
|
CC = $(MINGW)gcc
|
||||||
CXX = $(MINGW)g++
|
CXX = $(MINGW)g++
|
||||||
CFLAGS += -g -O3 \
|
CFLAGS += -g -O3 \
|
||||||
-Wno-unknown-warning-option \
|
|
||||||
-ffunction-sections \
|
-ffunction-sections \
|
||||||
-fdata-sections
|
-fdata-sections \
|
||||||
|
-Wno-attributes
|
||||||
CXXFLAGS += \
|
CXXFLAGS += \
|
||||||
-std=c++23 \
|
-std=c++23 \
|
||||||
-fext-numeric-literals \
|
-fext-numeric-literals \
|
||||||
-Wno-deprecated-enum-float-conversion \
|
-Wno-deprecated-enum-float-conversion \
|
||||||
-Wno-deprecated-enum-enum-conversion
|
-Wno-deprecated-enum-enum-conversion \
|
||||||
|
-U__GXX_TYPEINFO_EQUALITY_INLINE \
|
||||||
|
-D__GXX_TYPEINFO_EQUALITY_INLINE
|
||||||
LDFLAGS += -static -Wl,--gc-sections
|
LDFLAGS += -static -Wl,--gc-sections
|
||||||
AR = $(MINGW)ar
|
AR = $(MINGW)ar
|
||||||
PKG_CONFIG = $(MINGW)pkg-config -static
|
PKG_CONFIG = $(MINGW)pkg-config -static
|
||||||
|
|||||||
1
dep/cli11
Submodule
1
dep/cli11
Submodule
Submodule dep/cli11 added at 89dc726939
1
dep/file
Submodule
1
dep/file
Submodule
Submodule dep/file added at 7ed3febfcd
1
dep/md4c
Submodule
1
dep/md4c
Submodule
Submodule dep/md4c added at 481fbfbdf7
1
dep/nlohmann_json
Submodule
1
dep/nlohmann_json
Submodule
Submodule dep/nlohmann_json added at 44bee1b138
@@ -1,7 +1,6 @@
|
|||||||
from build.c import cxxprogram, cxxlibrary, simplerule, clibrary
|
from build.c import cxxprogram, cxxlibrary, simplerule, clibrary
|
||||||
from build.ab import targetof, Rule, Target
|
from build.ab import simplerule
|
||||||
from build.pkg import package
|
from build.pkg import package
|
||||||
from build.utils import filenamesmatchingof
|
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
import operator
|
import operator
|
||||||
@@ -12,7 +11,7 @@ cflags = [
|
|||||||
'-DIMHEX_PROJECT_NAME=\\"fluxengine\\"',
|
'-DIMHEX_PROJECT_NAME=\\"fluxengine\\"',
|
||||||
"-DIMHEX_STATIC_LINK_PLUGINS",
|
"-DIMHEX_STATIC_LINK_PLUGINS",
|
||||||
'-DIMHEX_VERSION=\\"0.0.0\\"',
|
'-DIMHEX_VERSION=\\"0.0.0\\"',
|
||||||
'-DLUNASVG_BUILD_STATIC',
|
"-DLUNASVG_BUILD_STATIC",
|
||||||
# "-DDEBUG",
|
# "-DDEBUG",
|
||||||
]
|
]
|
||||||
if config.osx:
|
if config.osx:
|
||||||
@@ -22,12 +21,24 @@ elif config.windows:
|
|||||||
else:
|
else:
|
||||||
cflags = cflags + ["-DOS_LINUX"]
|
cflags = cflags + ["-DOS_LINUX"]
|
||||||
|
|
||||||
package(name="freetype2_lib", package="freetype2")
|
r = simplerule(
|
||||||
package(name="libcurl_lib", package="libcurl")
|
name="glfw-windows-fallback",
|
||||||
package(name="glfw3_lib", package="glfw3")
|
ins=[],
|
||||||
package(name="md4c_lib", package="md4c")
|
outs=[
|
||||||
package(name="magic_lib", package="libmagic")
|
"=glfw-3.4.bin.WIN32/include/GLFW/glfw3.h",
|
||||||
package(name="nlohmannjson_lib", package="nlohmann_json")
|
"=glfw-3.4.bin.WIN32/include/GLFW/glfw3native.h",
|
||||||
|
"=glfw-3.4.bin.WIN32/lib-mingw-w64/libglfw3.a",
|
||||||
|
],
|
||||||
|
commands=[
|
||||||
|
"curl -Ls https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.bin.WIN32.zip -o $[dir]/glfw.zip",
|
||||||
|
"cd $[dir] && unzip -DD -o -q glfw.zip",
|
||||||
|
],
|
||||||
|
label="CURLLIBRARY",
|
||||||
|
traits={"clibrary", "cheaders"},
|
||||||
|
)
|
||||||
|
r.args["caller_cflags"] = [f"-I{r.dir}/glfw-3.4.bin.WIN32/include"]
|
||||||
|
r.args["cheader_files"] = [r]
|
||||||
|
r.args["cheader_deps"] = [r]
|
||||||
|
|
||||||
|
|
||||||
def headers_from(path):
|
def headers_from(path):
|
||||||
@@ -43,6 +54,32 @@ def sources_from(path, except_for=[]):
|
|||||||
return srcs
|
return srcs
|
||||||
|
|
||||||
|
|
||||||
|
package(name="freetype2_lib", package="freetype2")
|
||||||
|
package(name="libcurl_lib", package="libcurl")
|
||||||
|
package(name="glfw3_lib", package="glfw3", fallback=".+glfw-windows-fallback")
|
||||||
|
|
||||||
|
cxxlibrary(
|
||||||
|
name="nlohmannjson_lib",
|
||||||
|
srcs=[],
|
||||||
|
hdrs=headers_from("dep/nlohmann_json/single_include"),
|
||||||
|
)
|
||||||
|
|
||||||
|
clibrary(
|
||||||
|
name="magic_lib",
|
||||||
|
srcs=sources_from(
|
||||||
|
"dep/file/src", except_for=["dep/file/src/file.c", "dep/file/src/seccomp.c"]
|
||||||
|
),
|
||||||
|
hdrs={"magic.h": "dep/file/src/magic.h.in"},
|
||||||
|
)
|
||||||
|
|
||||||
|
clibrary(
|
||||||
|
name="md4c_lib",
|
||||||
|
srcs=sources_from("dep/md4c/src"),
|
||||||
|
hdrs={"md4c.h": "dep/md4c/src/md4c.h"},
|
||||||
|
)
|
||||||
|
|
||||||
|
cxxlibrary(name="cli11_lib", srcs=[], hdrs=headers_from("dep/cli11/include"))
|
||||||
|
|
||||||
if config.osx:
|
if config.osx:
|
||||||
clibrary(
|
clibrary(
|
||||||
name="libnfd",
|
name="libnfd",
|
||||||
@@ -83,7 +120,7 @@ cxxlibrary(
|
|||||||
name="lunasvg",
|
name="lunasvg",
|
||||||
srcs=sources_from("dep/lunasvg/source"),
|
srcs=sources_from("dep/lunasvg/source"),
|
||||||
hdrs=headers_from("dep/lunasvg/include"),
|
hdrs=headers_from("dep/lunasvg/include"),
|
||||||
deps=[".+plutovg"],
|
deps=[".+plutovg", "+fmt_lib"],
|
||||||
)
|
)
|
||||||
|
|
||||||
cxxlibrary(
|
cxxlibrary(
|
||||||
@@ -111,7 +148,7 @@ cxxlibrary(
|
|||||||
"imgui_freetype.h": "dep/imhex/lib/third_party/imgui/imgui/include/misc/freetype/imgui_freetype.h",
|
"imgui_freetype.h": "dep/imhex/lib/third_party/imgui/imgui/include/misc/freetype/imgui_freetype.h",
|
||||||
"imconfig.h": "./imhex_overrides/imconfig.h",
|
"imconfig.h": "./imhex_overrides/imconfig.h",
|
||||||
},
|
},
|
||||||
deps=[".+freetype2_lib", ".+lunasvg"],
|
deps=[".+freetype2_lib", ".+lunasvg", ".+glfw3_lib"],
|
||||||
)
|
)
|
||||||
|
|
||||||
cxxlibrary(name="libxdgpp", srcs=[], hdrs={"xdg.hpp": "dep/xdgpp/xdg.hpp"})
|
cxxlibrary(name="libxdgpp", srcs=[], hdrs={"xdg.hpp": "dep/xdgpp/xdg.hpp"})
|
||||||
@@ -138,7 +175,11 @@ elif config.windows:
|
|||||||
cxxlibrary(
|
cxxlibrary(
|
||||||
name="libwolv-io-fs",
|
name="libwolv-io-fs",
|
||||||
srcs=["dep/libwolv/libs/io/source/io/file_win.cpp"],
|
srcs=["dep/libwolv/libs/io/source/io/file_win.cpp"],
|
||||||
hdrs=headers_from("dep/libwolv/libs/io/include"),
|
hdrs=(
|
||||||
|
headers_from("dep/libwolv/libs/io/include")
|
||||||
|
| headers_from("dep/libwolv/libs/types/include")
|
||||||
|
| headers_from("dep/libwolv/libs/utils/include")
|
||||||
|
),
|
||||||
cflags=cflags,
|
cflags=cflags,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
@@ -154,13 +195,17 @@ cxxlibrary(
|
|||||||
srcs=(
|
srcs=(
|
||||||
[
|
[
|
||||||
"dep/libwolv/libs/io/source/io/file.cpp",
|
"dep/libwolv/libs/io/source/io/file.cpp",
|
||||||
"dep/libwolv/libs/io/source/io/file_unix.cpp",
|
|
||||||
"dep/libwolv/libs/io/source/io/fs.cpp",
|
"dep/libwolv/libs/io/source/io/fs.cpp",
|
||||||
"dep/libwolv/libs/io/source/io/handle.cpp",
|
"dep/libwolv/libs/io/source/io/handle.cpp",
|
||||||
"dep/libwolv/libs/math_eval/source/math_eval/math_evaluator.cpp",
|
"dep/libwolv/libs/math_eval/source/math_eval/math_evaluator.cpp",
|
||||||
"dep/libwolv/libs/utils/source/utils/string.cpp",
|
"dep/libwolv/libs/utils/source/utils/string.cpp",
|
||||||
]
|
]
|
||||||
+ sources_from("dep/libwolv/libs/net/source")
|
+ sources_from("dep/libwolv/libs/net/source")
|
||||||
|
+ (
|
||||||
|
["dep/libwolv/libs/io/source/io/file_unix.cpp"]
|
||||||
|
if config.osx or config.unix
|
||||||
|
else []
|
||||||
|
)
|
||||||
),
|
),
|
||||||
hdrs=reduce(
|
hdrs=reduce(
|
||||||
operator.ior,
|
operator.ior,
|
||||||
@@ -184,7 +229,13 @@ cxxlibrary(
|
|||||||
| headers_from("dep/pattern-language/generators/include")
|
| headers_from("dep/pattern-language/generators/include")
|
||||||
| headers_from("dep/pattern-language/cli/include")
|
| headers_from("dep/pattern-language/cli/include")
|
||||||
),
|
),
|
||||||
deps=[".+libthrowingptr", ".+libwolv"],
|
deps=[
|
||||||
|
".+libthrowingptr",
|
||||||
|
".+libwolv",
|
||||||
|
"+fmt_lib",
|
||||||
|
".+cli11_lib",
|
||||||
|
".+nlohmannjson_lib",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
cxxlibrary(name="hacks", srcs=[], hdrs={"jthread.hpp": "./imhex_overrides/jthread.hpp"})
|
cxxlibrary(name="hacks", srcs=[], hdrs={"jthread.hpp": "./imhex_overrides/jthread.hpp"})
|
||||||
@@ -205,6 +256,8 @@ if config.osx:
|
|||||||
hdrs=headers_from("dep/imhex/lib/libimhex/include"),
|
hdrs=headers_from("dep/imhex/lib/libimhex/include"),
|
||||||
cflags=cflags,
|
cflags=cflags,
|
||||||
)
|
)
|
||||||
|
elif config.windows:
|
||||||
|
cxxlibrary(name="libimhex-utils", srcs=[])
|
||||||
elif config.unix:
|
elif config.unix:
|
||||||
cxxlibrary(
|
cxxlibrary(
|
||||||
name="libimhex-utils",
|
name="libimhex-utils",
|
||||||
|
|||||||
Reference in New Issue
Block a user