Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c52170d
Inital try at a git artifact downloader.
davidgiven Jan 5, 2026
3b302d4
Lexy is now downloaded on-the-fly.
davidgiven Jan 5, 2026
910b9fd
Remove submodule.
davidgiven Jan 5, 2026
a8a05b9
Add missing file.
davidgiven Jan 5, 2026
1a47871
Add new git dependency.
davidgiven Jan 5, 2026
0ee904a
Fetch snowhouse dynamically.
davidgiven Jan 5, 2026
ddd1565
Update windows dependencies.
davidgiven Jan 6, 2026
86024bf
CLI11 is pulled dynamically.
davidgiven Jan 6, 2026
d97e5b2
nlohmannjson is now fetched dynamically.
davidgiven Jan 6, 2026
41ac20d
throwing_ptr is now fetched dynamically.
davidgiven Jan 6, 2026
4755b43
Typo fix.
davidgiven Jan 6, 2026
2b3dbd6
xdgpp is now fetched dynamically.
davidgiven Jan 6, 2026
6ee0abd
Add a dockerfile for doing a test build with no optional dependencies.
davidgiven Jan 6, 2026
fde1ad5
Pull plutovg dynamically, and also make it an optional dependency.
davidgiven Jan 6, 2026
f0179e8
libfmt is now pulled dynamically.
davidgiven Jan 6, 2026
c94cc19
lunasvg is now dynamically pulled.
davidgiven Jan 6, 2026
9f7d34a
Adjust build flags.
davidgiven Jan 7, 2026
147c9e9
libnfd is now fetched dynamically.
davidgiven Jan 7, 2026
4dc0939
libusbp is now fetched dynamically.
davidgiven Jan 7, 2026
db56117
libstb is now fetched dynamically.
davidgiven Jan 7, 2026
6e59566
Adjust some conditionals (OSX is also a unix).
davidgiven Jan 7, 2026
16c20f5
Remember to remove this submodule.
davidgiven Jan 7, 2026
3722c75
Move remote dependencies into dep/r for clarity.
davidgiven Jan 7, 2026
ed27969
libwolv is now fetched dynamically.
davidgiven Jan 7, 2026
3a60923
Attempt to set the libwolv cflags correctly (with the right OS setting).
davidgiven Jan 7, 2026
b3c5f7d
Remember to add the libwolv OSX header.
davidgiven Jan 7, 2026
87a407d
Allow git repositories to be checked out at a particular commit, not
davidgiven Jan 8, 2026
b825327
PatternLanguage is now fetched dynamically.
davidgiven Jan 8, 2026
6d3c2cb
microtar is fetched dynamically.
davidgiven Jan 8, 2026
e86bec1
Archival checkin.
davidgiven Jan 10, 2026
f2b4425
imhex is now pulled dynamically.
davidgiven Jan 10, 2026
9766c0c
Fix libwolv io on OSX.
davidgiven Jan 10, 2026
24f5a52
libromfs is now pulled dynamically.
davidgiven Jan 10, 2026
f5446a6
Try and fix build error on windows.
davidgiven Jan 10, 2026
8c5a904
Stupid Python precedence rules.
davidgiven Jan 10, 2026
3d00a1d
Temporarily disable license generation in the Windows installer until I
davidgiven Jan 10, 2026
d12cf34
Don't pull in imgui as a submodule as we're using the imhex one now.
davidgiven Jan 10, 2026
c888c0e
We don't need recursive git any more.
davidgiven Jan 10, 2026
fdfdd79
Update documentation.
davidgiven Jan 10, 2026
d8ab303
FATFS is now fetched dynamically.
davidgiven Jan 10, 2026
288cafe
Try and make fatfs build properly on Windows.
davidgiven Jan 11, 2026
d531493
Oops; don't link in the imhex test engine.
davidgiven Jan 11, 2026
04e918d
Another attempt at overriding the stock ffconf.h.
davidgiven Jan 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 2 additions & 4 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
- fedora41
- fedora42
- fedora43
- fedora43.nooptionaldeps
steps:
- uses: actions/checkout@v4
with:
repository: 'davidgiven/fluxengine'
path: 'fluxengine'
submodules: 'true'
- uses: actions/checkout@v4
with:
repository: 'davidgiven/fluxengine-testdata'
Expand All @@ -42,7 +42,6 @@ jobs:
with:
repository: 'davidgiven/fluxengine'
path: 'fluxengine'
submodules: 'true'
- uses: actions/checkout@v4
with:
repository: 'davidgiven/fluxengine-testdata'
Expand Down Expand Up @@ -76,7 +75,7 @@ jobs:
msystem: mingw64
update: true
install: |
python diffutils ninja make zip
python diffutils ninja make zip git
pacboy: |
protobuf:p pkgconf:p curl-winssl:p file:p glfw:p mbedtls:p
sqlite:p freetype:p boost:p gcc:p binutils:p nsis:p abseil-cpp:p
Expand All @@ -92,7 +91,6 @@ jobs:
with:
repository: 'davidgiven/fluxengine'
path: 'fluxengine'
submodules: 'true'

- uses: actions/checkout@v4
with:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
with:
repository: 'davidgiven/fluxengine'
path: 'fluxengine'
submodules: 'true'

- name: run
run: |
Expand Down Expand Up @@ -96,8 +95,6 @@ jobs:
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'

- name: brew
run: |
Expand Down
33 changes: 0 additions & 33 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,36 +1,3 @@
[submodule "dep/imhex"]
path = dep/imhex
url = https://github.com/davidgiven/ImHex.git
[submodule "dep/libwolv"]
path = dep/libwolv
url = https://github.com/WerWolv/libwolv.git
[submodule "dep/imgui"]
path = dep/imgui
url = https://github.com/ocornut/imgui.git
[submodule "dep/pattern-language"]
path = dep/pattern-language
url = https://github.com/WerWolv/PatternLanguage.git
[submodule "dep/native-file-dialog"]
path = dep/native-file-dialog
url = https://github.com/btzy/nativefiledialog-extended.git
[submodule "dep/xdgpp"]
path = dep/xdgpp
url = https://github.com/WerWolv/xdgpp.git
[submodule "dep/libromfs"]
path = dep/libromfs
url = https://github.com/WerWolv/libromfs.git
[submodule "dep/throwing_ptr"]
path = dep/throwing_ptr
url = https://github.com/rockdreamer/throwing_ptr.git
[submodule "dep/lunasvg"]
path = dep/lunasvg
url = https://github.com/sammycage/lunasvg.git
[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
1 change: 1 addition & 0 deletions .hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ remote
FluxEngine.cydsn/CortexM3
FluxEngine.cydsn/Generated_Source
FluxEngine.cydsn/codegentemp
dep/r

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ clean::
include build/ab.mk

docker-%: tests/docker/Dockerfile.%
docker build -t $* -f $< .
docker build --progress=plain -t $* -f $< .
23 changes: 0 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,25 +237,6 @@ library, written by Maxim Semanarev (and others). It is licensed under the
terms of the 3-clause BSD license. Please see the contents of the directory for
the full text. It's been lightly modified by me.

As an exception, `dep/stb` contains parts of the libstb utility library,
written by Sean T Barett (and others). It is public domain/Unlicense/MIT
licensed, at your choice. Please see the contents of the directory for the full
text.

As an exception, `dep/snowhouse` contains the snowhouse assertion library,
taken from https://github.com/banditcpp/snowhouse. It is Boost Standard License
1.0 licensed. Please see the contents of the directory for the full text. Note
that this is only used during the build and no code ends up in the output
binaries.

As an exception, `dep/libusbp` contains the libusbp library, taken from
https://github.com/pololu/libusbp. It is MIT licensed. Please see the contents
of the directory for the full text.

As an exception, `dep/fatfs` contains the fatfs library, taken from
http://elm-chan.org/fsw/ff/00index_e.html. It is single-clause BSD licensed.
Please see the contents of the directory for the full text.

As an exception, `dep/adflib` contains the adflib library, written by Laurent
Clevy et al, taken from https://github.com/lclevy/ADFlib. It is GPL 2.0
licensed. Please see the contents of the directory for the full text.
Expand All @@ -265,10 +246,6 @@ package, written by Robert Leslie et al, taken from
https://www.mars.org/home/rob/proj/hfs. It is GPL 2.0 licensed. Please see the
contents of the directory for the full text.

As an exception, `dep/lexy` contains a partial copy of the lexy package, written
by foonathen@github, taken from https://github.com/foonathan/lexy. It is BSL 1.0
licensed. Please see the contents of the directory for the full text.

As an exception, `dep/alphanum` contains a copy of the alphanum package,
written by Dave Koelle, taken from
https://web.archive.org/web/20210207124255/davekoelle.com/alphanum.html. It is
Expand Down
1 change: 0 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

package(name="protobuf_lib", package="protobuf")
package(name="z_lib", package="zlib")
package(name="fmt_lib", package="fmt", fallback="dep/fmt")
package(name="sqlite3_lib", package="sqlite3")

clibrary(name="protocol", hdrs={"protocol.h": "./protocol.h"})
Expand Down
23 changes: 21 additions & 2 deletions build/ab.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
outputTargets = set()
commandsDb = []
belatedErrors = []
atexits = []

RE_FORMAT_SPEC = re.compile(
r"(?:(?P<fill>[\s\S])?(?P<align>[<>=^]))?"
Expand Down Expand Up @@ -563,7 +564,14 @@ def add_belated_error(msg):
belatedErrors += [msg]


def emit_rule(self, ins, outs, cmds=[], label=None):
def add_atexit(cb):
global atexits
atexits += [cb]


def emit_rule(
self, ins, outs, cmds=[], label=None, sandbox=True, generator=False
):
name = self.name
fins = [self.templateexpand(f) for f in set(filenamesof(ins))]
fouts = [self.templateexpand(f) for f in filenamesof(outs)]
Expand All @@ -581,7 +589,8 @@ def emit_rule(self, ins, outs, cmds=[], label=None):
os.makedirs(self.dir, exist_ok=True)
rule = []

if G.AB_SANDBOX == "yes":
sandbox = sandbox and (G.AB_SANDBOX == "yes")
if sandbox:
sandbox = join(self.dir, "sandbox")
emit(f"rm -rf {sandbox}", into=rule)
emit(
Expand Down Expand Up @@ -621,6 +630,9 @@ def emit_rule(self, ins, outs, cmds=[], label=None):
)
if label:
emit(" description=", label)
if generator:
emit(" generator=true")

emit("build", name, ":phony", *fouts)
else:
assert len(cmds) == 0, "rules with no outputs cannot have commands"
Expand All @@ -638,6 +650,8 @@ def simplerule(
deps: Targets = [],
commands=[],
add_to_commanddb=False,
sandbox=True,
generator=False,
label="RULE",
):
self.ins = ins
Expand Down Expand Up @@ -676,6 +690,8 @@ def simplerule(
outs=outs,
label=self.templateexpand("$[label] $[name]") if label else None,
cmds=cs,
sandbox=sandbox,
generator=generator,
)


Expand Down Expand Up @@ -768,6 +784,9 @@ def main():
print(s)
sys.exit(1)

for cb in atexits:
cb()

with open(outputdir + "/build.targets", "wt") as fp:
fp.write("ninja-targets =")
fp.write(substituteGlobalVariables(" ".join(outputTargets)))
Expand Down
26 changes: 26 additions & 0 deletions build/git.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from build.ab import Rule, simplerule
from build.utils import add_wildcard_dependency


@Rule
def git_repository(self, name, url, branch, path, commit=None):
simplerule(
replaces=self,
outs=[f"{path}/.git/config"],
commands=[
f"rmdir {path}/.git",
f"git clone -q {url} --depth=1 -c advice.detachedHead=false -b {branch} {path}",
]
+ (
[
f"cd {path} && git fetch --depth=1 origin {commit} && git checkout {commit}"
]
if commit
else []
),
sandbox=False,
generator=True,
label="GITREPOSITORY",
)

add_wildcard_dependency(self, f"{path}/**/*", exclude="**/.git/**")
15 changes: 15 additions & 0 deletions build/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
getcwd,
error,
simplerule,
add_atexit,
targets,
emit,
G,
)
from os.path import relpath, splitext, join, basename, isfile, normpath
Expand Down Expand Up @@ -125,6 +128,18 @@ def shell(cmd):
return r.decode("utf-8").strip()


def add_wildcard_dependency(dep, pattern, exclude="."):
def cb():
yesre = _glob_to_re(pattern)
nore = _glob_to_re(exclude)
for t in targets.values():
for o in t.outs:
if (type(o) == str) and yesre.match(o) and not nore.match(o):
emit("build", o, ":phony", dep.name)

add_atexit(cb)


@Rule
def objectify(self, name, src: Target, symbol):
simplerule(
Expand Down
Loading
Loading