Skip to content

Commit

Permalink
More MOD build tweaks
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Sep 21, 2023
1 parent ccd8e29 commit 4297215
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 7 deletions.
1 change: 1 addition & 0 deletions build-mod-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export CMAKE
export PAWPAW_BUILDDIR
export PAWPAW_DOWNLOADDIR
export PAWPAW_PREFIX
export TOOLCHAIN_PREFIX

if [ ! -e mod-plugin-builder ]; then
echo "missing mod-plugin-builder"
Expand Down
31 changes: 31 additions & 0 deletions setup/mod-audio/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

from cx_Freeze import setup, Executable

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

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

exe_options = {
"script": ".\\server.py",
"copyright": "Copyright (C) 2023 MOD Audio UG",
"targetName": "mod-ui.exe",
}

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

# ------------------------------------------------------------------------------------------------------------
30 changes: 30 additions & 0 deletions setup/mod-audio/app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

set -e

cd $(dirname ${0})/../..
PAWPAW_ROOT="${PWD}"

# ---------------------------------------------------------------------------------------------------------------------
# check target

target="${1}"

if [ -z "${target}" ]; then
echo "usage: ${0} <target>"
exit 1
fi

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

export PAWPAW_SKIP_LTO=1
source local.env win64

# export PYTHONPATH="$(pwd);${PAWPAW_PREFIX}/lib/python3.8/site-packages"
export PYTHONPATH="Z:\\home\\falktx\\PawPawBuilds\\targets\\win64\\lib\\python3.8\\site-packages"

cd ../../MOD/mod-ui
# rm -rf build
${EXE_WRAPPER} "${PAWPAW_PREFIX}/bin/python3${APP_EXT}" "${PAWPAW_ROOT}/setup/mod-audio/app.py" build_exe

# ---------------------------------------------------------------------------------------------------------------------
30 changes: 23 additions & 7 deletions setup/mod-audio/builder.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ endef
$(eval $(call caseconvert-helper,UPPERCASE,$(join $(addsuffix :,$([FROM])),$([TO]))))
$(eval $(call caseconvert-helper,LOWERCASE,$(join $(addsuffix :,$([TO])),$([FROM]))))

space =
space +=
# utilities
blank =
comma = ,
space = $(blank) $(blank)

# Sanitize macro cleans up generic strings so it can be used as a filename
# and in rules. Particularly useful for VCS version strings, that can contain
Expand Down Expand Up @@ -61,12 +63,29 @@ TARGET_LDFLAGS = $(LDFLAGS)

TARGET_DIR = $(PAWPAW_PREFIX)

ifeq ($(MACOS),true)
libtoolize = glibtoolize
else
libtoolize = libtoolize
endif

ifeq ($(MACOS),true)
STRIP = true
else ifeq ($(WINDOWS),true)
BR2_SKIP_LTO = y
endif

ifneq ($(TOOLCHAIN_PREFIX),)
BR2_EXTRA_CONFIGURE_OPTS = --host=$(TOOLCHAIN_PREFIX) ac_cv_build=$(shell uname -m)-linux-gnu ac_cv_host=$(TOOLCHAIN_PREFIX)
endif

define generic-package

endef

define autotools-package


define $$(PKG)_CONFIGURE_CMDS
(cd $$($$(PKG)_BUILDDIR) && \
./configure \
Expand All @@ -75,6 +94,7 @@ define $$(PKG)_CONFIGURE_CMDS
--disable-docs \
--disable-maintainer-mode \
--prefix='/usr' \
$(BR2_EXTRA_CONFIGURE_OPTS) \
$$($$(PKG)_CONF_OPTS) \
)
endef
Expand Down Expand Up @@ -138,10 +158,6 @@ STAMP_INSTALLED = $($(PKG)_BUILDDIR)/.stamp_installed
PAWPAW_TMPDIR = /tmp/PawPaw
PAWPAW_TMPNAME = git-dl

ifeq ($(MACOS),true)
STRIP = true
endif

all: $(STAMP_INSTALLED)

$(STAMP_INSTALLED): $(STAMP_BUILT)
Expand Down Expand Up @@ -169,7 +185,7 @@ $(STAMP_CONFIGURED): $(STAMP_PATCHED)
ifeq ($($(PKG)_AUTORECONF),YES)
(cd $($(PKG)_BUILDDIR) && \
aclocal --force && \
glibtoolize --force --automake --copy && \
$(libtoolize) --force --automake --copy && \
autoheader --force && \
autoconf --force && \
automake -a --copy \
Expand Down

0 comments on commit 4297215

Please sign in to comment.