Browse Source

More tweaks for win32 make dist

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.3.0-RC1
falkTX 3 years ago
parent
commit
ce63084a5e
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 42 additions and 17 deletions
  1. +26
    -11
      Makefile.dist.mk
  2. +16
    -6
      data/windows/app-gui.py

+ 26
- 11
Makefile.dist.mk View File

@@ -72,8 +72,8 @@ _CARLA_HOST_FILES += \
$(_PLUGIN_UIS:%=resources/%$(APP_EXT)) \
carla-bridge-lv2-cocoa$(APP_EXT)
else ifeq ($(WIN32),true)
# TODO plugin UIs on windows
_CARLA_HOST_FILES += \
$(_PLUGIN_UIS:%=resources/%$(APP_EXT)) \
carla-bridge-lv2-windows$(APP_EXT)
endif

@@ -124,7 +124,7 @@ _CARLA_VST2SYN_PLUGIN_FILES = \

ifeq ($(WIN32),true)
CARLA_APP_FILES = $(_CARLA_APP_FILES:%=build/Carla/%)
CARLA_APP_ZIPS = $(_PLUGIN_UIS:%=build/%/lib/library.zip)
CARLA_APP_ZIPS = $(_PLUGIN_UIS:%=build/%-resources/lib/library.zip)
CARLA_CONTROL_APP_FILES = $(_CARLA_CONTROL_APP_FILES:%=build/Carla-Control/%)
else
CARLA_APP_FILES = $(_CARLA_APP_FILES:%=build/Carla.app/Contents/MacOS/%)
@@ -257,15 +257,6 @@ build/Carla.app/Contents/MacOS/lib/library.zip: $(CARLA_APP_ZIPS) data/macos/bun

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

build/Carla/Carla.exe: build/Carla/lib/library.zip

build/Carla/lib/library.zip: data/windows/app-gui.py source/frontend/*
$(call GENERATE_LIBRARY_ZIP,Carla)

# $(CARLA_APP_ZIPS)

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

build/Carla-Control.app/Contents/MacOS/Carla-Control: build/Carla-Control.app/Contents/MacOS/lib/library.zip

build/Carla-Control.app/Contents/MacOS/lib/library.zip: data/macos/bundle.py data/macos/Carla-Control.plist source/frontend/*
@@ -281,6 +272,30 @@ build/Carla.app/Contents/MacOS/resources/%: build/%.app/Contents/MacOS/lib/libra
build/%.app/Contents/MacOS/lib/library.zip: data/macos/bundle.py source/frontend/%
$(call GENERATE_LIBRARY_ZIP,$*)

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

build/Carla/Carla.exe: build/Carla/lib/library.zip

build/Carla/lib/library.zip: $(CARLA_APP_ZIPS) data/windows/app-gui.py source/frontend/*
$(call GENERATE_LIBRARY_ZIP,Carla)
# merge all zips into 1
rm -rf build/Carla/lib/_lib
mkdir build/Carla/lib/_lib
(cd build/Carla/lib/_lib && \
mv ../library.zip ../library-main.zip && \
$(_PLUGIN_UIS:%=unzip -n $(CURDIR)/build/%-resources/lib/library.zip &&) \
unzip -o ../library-main.zip && \
zip -r -9 ../library.zip *)
rm -rf build/Carla/lib/_lib
rm -rf build/Carla/lib/library-main.zip

build/Carla/resources/%.exe: build/%-resources/lib/library.zip
-@mkdir -p $(shell dirname $@)
@cp -v build/$*-resources/$*.exe $@

build/%-resources/lib/library.zip: data/windows/app-gui.py source/frontend/%
$(call GENERATE_LIBRARY_ZIP,$*)

# ----------------------------------------------------------------------------------------------------------------------------
# macOS generic bundle files (either Qt or Carla binaries)



+ 16
- 6
data/windows/app-gui.py View File

@@ -14,27 +14,37 @@ from os import getenv

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

name = getenv("TARGET_NAME")
name = getenv("SCRIPT_NAME")

if name == "Carla":
description = "Carla Plugin Host"
build_exe = ".\\build\\Carla\\"
elif name == "Carla-Control":
description = "Carla Remote Control"
build_exe = ".\\build\\Carla-Control\\"
else:
description = name
build_exe = ".\\build\\{}-resources\\".format(name)

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

exe_options = {
"script": ".\\source\\frontend\\carla",
"script": ".\\source\\frontend\\{}".format(name),
"icon": ".\\resources\\ico\\carla.ico",
"copyright": "Copyright (C) 2011-2021 Filipe Coelho",
"base": "Win32GUI",
"targetName": "Carla.exe",
"targetName": "{}.exe".format(name),
}

setup(name = "Carla",
setup(name = name,
version = VERSION,
description = "Carla Plugin Host",
description = description,
options = {"build_exe": options},
executables = [Executable(**exe_options)])



Loading…
Cancel
Save