Skip to content

Commit

Permalink
Get more win32 details working
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Oct 5, 2023
1 parent 9728d48 commit 387f295
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 3 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ BOOTSTRAP_FILES = \

TARGETS = \
build/jackd$(APP_EXT) \
build/mod-screenshot$(APP_EXT) \
build/mod-ui$(APP_EXT) \
build/jack/jack-session.conf \
build/jack/mod-host$(SO_EXT) \
Expand Down Expand Up @@ -294,6 +295,10 @@ build/jack/jack-session.conf: utils/jack-session.conf
@mkdir -p build/jack
ln -sf $(abspath $<) $@

build/mod-screenshot$(APP_EXT): utils/mod-screenshot.py $(BOOTSTRAP_FILES)
./utils/run.sh $(PAWPAW_TARGET) python3 utils/mod-screenshot.py build_exe
touch $@

build/mod-ui$(APP_EXT): utils/mod-ui.py utils/mod-ui-wrapper.py $(BOOTSTRAP_FILES)
./utils/run.sh $(PAWPAW_TARGET) python3 utils/mod-ui.py build_exe
touch $@
Expand All @@ -313,7 +318,7 @@ mod-midi-merger/build/mod-midi-merger-standalone$(APP_EXT): mod-midi-merger/buil
mod-midi-merger/build/Makefile: $(BOOTSTRAP_FILES)
./utils/run.sh $(PAWPAW_TARGET) cmake -S mod-midi-merger -B mod-midi-merger/build

mod-ui/utils/libmod_utils.so: $(BOOTSTRAP_FILES) mod-ui/utils/utils_lilv.cpp
mod-ui/utils/libmod_utils.so: $(BOOTSTRAP_FILES) mod-ui/utils/utils.h mod-ui/utils/utils_jack.cpp mod-ui/utils/utils_lilv.cpp
./utils/run.sh $(PAWPAW_TARGET) $(MAKE) -C mod-ui/utils

systray/mod-app$(APP_EXT): systray/main.cpp systray/mod-app.hpp
Expand Down
2 changes: 1 addition & 1 deletion PawPaw
2 changes: 1 addition & 1 deletion mod-ui
42 changes: 42 additions & 0 deletions utils/mod-screenshot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# ------------------------------------------------------------------------------------------------------------
# Imports (cx_Freeze)

from cx_Freeze import setup, Executable

# ------------------------------------------------------------------------------------------------------------

from sys import platform

if platform == 'win32':
exe = '.exe'
s = '\\'
else:
exe = ''
s = '/'

# ------------------------------------------------------------------------------------------------------------

options = {
"zip_include_packages": ["*"],
"zip_exclude_packages": ["PIL","modtools"],
"replace_paths": [["*",f".{s}lib{s}"]],
"build_exe": f".{s}build",
"optimize": True,
}

exe_options = {
"script": f".{s}mod-ui{s}modtools{s}pedalboard.py",
"copyright": "Copyright (C) 2023 MOD Audio UG",
"targetName": f"mod-screenshot{exe}",
}

setup(name = "mod-screenshot",
version = "0.0.0",
description = "MOD Pedalboard screenshot",
options = {"build_exe": options},
executables = [Executable(**exe_options)])

# ------------------------------------------------------------------------------------------------------------

0 comments on commit 387f295

Please sign in to comment.