pd4web 2.1.2__tar.gz → 2.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pd4web-2.1.2 → pd4web-2.2.2}/PKG-INFO +2 -2
- {pd4web-2.1.2 → pd4web-2.2.2}/README.md +1 -1
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/libpd.cmake +21 -3
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web/Builder.py +21 -11
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web/Libraries.py +7 -4
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web/Pd4Web.py +46 -26
- {pd4web-2.1.2 → pd4web-2.2.2}/pyproject.toml +1 -1
- {pd4web-2.1.2 → pd4web-2.2.2}/LICENSE +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/.clang-format +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/.prettierrc +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/.yamlftm +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/Libraries.yaml +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/ambi~.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/cyclone.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/earplug.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/else.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/o.scofo~.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/.git +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/.github/workflows/c-cpp.yml +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/.gitignore +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/CMakeLists.txt +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/Examples/.clang-format +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/Examples/CMakeLists.txt +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/Examples/fft~/fft~-help.pd +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/Examples/fft~/fft~.cpp +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/Examples/simple/simple-help.pd +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/Examples/simple/simple-patch.pd +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/Examples/simple/simple.cpp +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/Examples/simple~/simple~-help.pd +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/Examples/simple~/simple~.cpp +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/LICENSE +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/README.md +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/Tests/01.Deprecated-Functions/CMakeLists.txt +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/Tests/CMakeLists.txt +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pd.cmake/pd.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/pmpd.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Libraries/timbreIDLib.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Templates/1/bula.md +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Templates/1/index.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Templates/2/index.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Templates/2/sketch.js +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Templates/3/index.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Templates/4/index.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Templates/4/sketch.js +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Templates/5/index.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/Templates/5/tutorial.md +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/__init__.py +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/cmake-format.yaml +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/config.h +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/externals.cpp +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/favicon.ico +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/index.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/nogui.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web/Compilers.py +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web/Objects.py +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web/Patch.py +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web/__init__.py +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web.cpp +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web.gitignore +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web.gui.js +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web.hpp +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web.midi.js +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web.style.css +0 -0
- {pd4web-2.1.2 → pd4web-2.2.2}/Sources/pd4web.threads.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pd4web
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Summary: pd4web compiles PureData patches with external objects for Wasm, allowing to run entire patches in web browsers.
|
|
5
5
|
Home-page: https://charlesneimog.github.io/pd4web
|
|
6
6
|
Author: Charles K. Neimog
|
|
@@ -43,7 +43,7 @@ Description-Content-Type: text/markdown
|
|
|
43
43
|
</p>
|
|
44
44
|
|
|
45
45
|
<p align="center">
|
|
46
|
-
<a href="https://github.com/charlesneimog/pd4web/actions/workflows/
|
|
46
|
+
<a href="https://github.com/charlesneimog/pd4web/actions/workflows/Release.yml"><img src="https://github.com/charlesneimog/pd4web/actions/workflows/Release.yml/badge.svg" alt="Tests"></a>
|
|
47
47
|
</p>
|
|
48
48
|
|
|
49
49
|
`pd4web` lets you run PureData patches directly in web browsers. It stands out from alternatives like [hvcc](https://github.com/Wasted-Audio/hvcc) and [WebPd](https://github.com/sebpiq/WebPd) by compiling the source code of [libpd](https://github.com/libpd/libpd), thanks to the work of [claudeha](https://github.com/claudeha). With `pd4web`, you can compile any PureData Vanilla patch, along with a list of more than 800 externals and abstractions.
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
</p>
|
|
21
21
|
|
|
22
22
|
<p align="center">
|
|
23
|
-
<a href="https://github.com/charlesneimog/pd4web/actions/workflows/
|
|
23
|
+
<a href="https://github.com/charlesneimog/pd4web/actions/workflows/Release.yml"><img src="https://github.com/charlesneimog/pd4web/actions/workflows/Release.yml/badge.svg" alt="Tests"></a>
|
|
24
24
|
</p>
|
|
25
25
|
|
|
26
26
|
`pd4web` lets you run PureData patches directly in web browsers. It stands out from alternatives like [hvcc](https://github.com/Wasted-Audio/hvcc) and [WebPd](https://github.com/sebpiq/WebPd) by compiling the source code of [libpd](https://github.com/libpd/libpd), thanks to the work of [claudeha](https://github.com/claudeha). With `pd4web`, you can compile any PureData Vanilla patch, along with a list of more than 800 externals and abstractions.
|
|
@@ -3,13 +3,31 @@ project(libpd C)
|
|
|
3
3
|
|
|
4
4
|
set(ENABLE_TILDE_TARGET_WARNING off)
|
|
5
5
|
|
|
6
|
-
if
|
|
7
|
-
|
|
6
|
+
if(LSP_SUPPORT)
|
|
7
|
+
set(PD_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build/pure-data/src/)
|
|
8
8
|
else()
|
|
9
|
-
|
|
9
|
+
set(PD_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Pd4Web/pure-data/src/)
|
|
10
10
|
endif()
|
|
11
11
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread -matomics -mbulk-memory")
|
|
12
12
|
|
|
13
|
+
# ╭──────────────────────────────────────╮
|
|
14
|
+
# │ Remove print of sys_vgui │
|
|
15
|
+
# ╰──────────────────────────────────────╯
|
|
16
|
+
# Função para adicionar 'return;' após o comentário específico, se ainda não existir
|
|
17
|
+
function(AddReturnAfterComment file start_block return_statement)
|
|
18
|
+
file(READ ${file} FILE_CONTENTS)
|
|
19
|
+
string(FIND "${FILE_CONTENTS}" "${start_block}\n return;" POSITION)
|
|
20
|
+
if(POSITION EQUAL -1)
|
|
21
|
+
string(REPLACE "${start_block}" "${start_block}\n return;" FILE_CONTENTS
|
|
22
|
+
"${FILE_CONTENTS}")
|
|
23
|
+
file(WRITE ${file} "${FILE_CONTENTS}")
|
|
24
|
+
endif()
|
|
25
|
+
endfunction()
|
|
26
|
+
|
|
27
|
+
addreturnaftercomment(
|
|
28
|
+
${PD_SOURCE_DIR}/s_inter.c "{ /* if there's no TK process just throw it to stderr */"
|
|
29
|
+
" return;")
|
|
30
|
+
|
|
13
31
|
# ╭──────────────────────────────────────╮
|
|
14
32
|
# │ PureData Sources │
|
|
15
33
|
# ╰──────────────────────────────────────╯
|
|
@@ -3,6 +3,7 @@ import re
|
|
|
3
3
|
import shutil
|
|
4
4
|
import subprocess
|
|
5
5
|
import importlib.metadata as importlib_metadata
|
|
6
|
+
import yaml
|
|
6
7
|
|
|
7
8
|
# from .Patch import PatchLine
|
|
8
9
|
from .Pd4Web import Pd4Web
|
|
@@ -42,6 +43,9 @@ class GetAndBuildExternals:
|
|
|
42
43
|
self.ConfigureProject()
|
|
43
44
|
self.CompileProject()
|
|
44
45
|
self.CopyExtraJsFiles()
|
|
46
|
+
|
|
47
|
+
# Save the project versions
|
|
48
|
+
self.SaveProjectVersions()
|
|
45
49
|
|
|
46
50
|
def InitVariables(self):
|
|
47
51
|
self.cmakeFile = []
|
|
@@ -56,18 +60,18 @@ class GetAndBuildExternals:
|
|
|
56
60
|
else:
|
|
57
61
|
self.ProjectName = os.path.basename(self.Pd4Web.PROJECT_ROOT)
|
|
58
62
|
self.cmakeFile.append("cmake_minimum_required(VERSION 3.25)")
|
|
59
|
-
self.cmakeFile.append(f
|
|
63
|
+
self.cmakeFile.append(f'project("{self.ProjectName}")\n')
|
|
60
64
|
|
|
61
65
|
# Pd Sources
|
|
62
66
|
self.cmakeFile.append("# Pd sources")
|
|
63
67
|
self.cmakeFile.append('set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -matomics -mbulk-memory")')
|
|
64
|
-
self.cmakeFile.append(
|
|
65
|
-
self.cmakeFile.append(
|
|
68
|
+
self.cmakeFile.append('include("${CMAKE_CURRENT_SOURCE_DIR}/Pd4Web/libpd.cmake")')
|
|
69
|
+
self.cmakeFile.append('include("${CMAKE_CURRENT_SOURCE_DIR}/Pd4Web/Externals/pd.cmake")')
|
|
66
70
|
self.cmakeFile.append('set(PDCMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Pd4Web/Externals/" CACHE STRING "" FORCE)')
|
|
67
71
|
self.cmakeFile.append(
|
|
68
72
|
'set(PD4WEB_EXTERNAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Pd4Web/Externals/" CACHE STRING "" FORCE)'
|
|
69
73
|
)
|
|
70
|
-
self.cmakeFile.append(
|
|
74
|
+
self.cmakeFile.append('include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Pd4Web/pure-data/src")')
|
|
71
75
|
self.cmakeFile.append("add_definitions(-DPDTHREADS)")
|
|
72
76
|
self.cmakeFile.append("")
|
|
73
77
|
|
|
@@ -102,7 +106,7 @@ class GetAndBuildExternals:
|
|
|
102
106
|
|
|
103
107
|
targetProperties = [
|
|
104
108
|
"set_target_properties(pd4web PROPERTIES",
|
|
105
|
-
|
|
109
|
+
' RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/WebPatch"',
|
|
106
110
|
")",
|
|
107
111
|
]
|
|
108
112
|
linkOptions = [
|
|
@@ -264,23 +268,23 @@ class GetAndBuildExternals:
|
|
|
264
268
|
|
|
265
269
|
def AddFilesToWebPatch(self):
|
|
266
270
|
self.cmakeFile.append("\n# FileSystem for the Patch")
|
|
267
|
-
string = 'set_target_properties(pd4web PROPERTIES LINK_FLAGS "--preload-file ${CMAKE_CURRENT_SOURCE_DIR}/WebPatch/index.pd@/index.pd")'
|
|
271
|
+
#string = 'set_target_properties(pd4web PROPERTIES LINK_FLAGS "--preload-file \"${CMAKE_CURRENT_SOURCE_DIR}/WebPatch/index.pd@/index.pd\"")'
|
|
272
|
+
string = 'set_target_properties(pd4web PROPERTIES LINK_FLAGS "--preload-file \\"${CMAKE_CURRENT_SOURCE_DIR}/WebPatch/index.pd@/index.pd\\"")'
|
|
268
273
|
self.cmakeFile.append(string)
|
|
269
|
-
|
|
270
274
|
if os.path.exists(self.Pd4Web.PROJECT_ROOT + "/Audios"):
|
|
271
275
|
self.cmakeFile.append("get_target_property(EMCC_LINK_FLAGS pd4web LINK_FLAGS)")
|
|
272
276
|
self.cmakeFile.append(
|
|
273
|
-
'set_target_properties(pd4web PROPERTIES LINK_FLAGS "${EMCC_LINK_FLAGS} --preload-file ${CMAKE_CURRENT_SOURCE_DIR}/Audios@/Audios
|
|
277
|
+
'set_target_properties(pd4web PROPERTIES LINK_FLAGS "${EMCC_LINK_FLAGS} --preload-file \\"${CMAKE_CURRENT_SOURCE_DIR}/Audios@/Audios/\\"")'
|
|
274
278
|
)
|
|
275
279
|
if os.path.exists(self.Pd4Web.PROJECT_ROOT + "/.tmp"):
|
|
276
280
|
self.cmakeFile.append("get_target_property(EMCC_LINK_FLAGS pd4web LINK_FLAGS)")
|
|
277
281
|
self.cmakeFile.append(
|
|
278
|
-
'set_target_properties(pd4web PROPERTIES LINK_FLAGS "${EMCC_LINK_FLAGS} --preload-file ${CMAKE_CURRENT_SOURCE_DIR}/.tmp@/Libs
|
|
282
|
+
'set_target_properties(pd4web PROPERTIES LINK_FLAGS "${EMCC_LINK_FLAGS} --preload-file \\"${CMAKE_CURRENT_SOURCE_DIR}/.tmp@/Libs/\\"")'
|
|
279
283
|
)
|
|
280
284
|
if os.path.exists(self.Pd4Web.PROJECT_ROOT + "/Extras"):
|
|
281
285
|
self.cmakeFile.append("get_target_property(EMCC_LINK_FLAGS pd4web LINK_FLAGS)")
|
|
282
286
|
self.cmakeFile.append(
|
|
283
|
-
'set_target_properties(pd4web PROPERTIES LINK_FLAGS "${EMCC_LINK_FLAGS} --preload-file ${CMAKE_CURRENT_SOURCE_DIR}/Extras@/Extras
|
|
287
|
+
'set_target_properties(pd4web PROPERTIES LINK_FLAGS "${EMCC_LINK_FLAGS} --preload-file \\"${CMAKE_CURRENT_SOURCE_DIR}/Extras@/Extras/\\"")'
|
|
284
288
|
)
|
|
285
289
|
|
|
286
290
|
def CreateCppCallsExternalFile(self):
|
|
@@ -498,8 +502,14 @@ class GetAndBuildExternals:
|
|
|
498
502
|
for file in files:
|
|
499
503
|
if not os.path.exists(self.Pd4Web.PROJECT_ROOT + "/WebPatch/" + file):
|
|
500
504
|
shutil.copy(os.path.join(root, file), self.Pd4Web.PROJECT_ROOT + "/WebPatch/")
|
|
501
|
-
|
|
502
505
|
os.chdir(cwd)
|
|
506
|
+
|
|
507
|
+
def SaveProjectVersions(self):
|
|
508
|
+
# check if file exists
|
|
509
|
+
if not os.path.exists(self.Pd4Web.PROJECT_ROOT + "/Pd4Web/versions.yaml"):
|
|
510
|
+
with open(self.Pd4Web.PROJECT_ROOT + "/Pd4Web/versions.yaml", "w") as f:
|
|
511
|
+
yaml.dump(self.Pd4Web.Version, f)
|
|
512
|
+
return
|
|
503
513
|
|
|
504
514
|
def __repr__(self) -> str:
|
|
505
515
|
return f"< GetCode Object >"
|
|
@@ -145,7 +145,7 @@ class ExternalLibraries:
|
|
|
145
145
|
commit = libRepo.head.peel()
|
|
146
146
|
return commit
|
|
147
147
|
|
|
148
|
-
def CloneLibrary(self,
|
|
148
|
+
def CloneLibrary(self, libData):
|
|
149
149
|
"""
|
|
150
150
|
Initializes submodules in the specified repository path.
|
|
151
151
|
|
|
@@ -158,11 +158,12 @@ class ExternalLibraries:
|
|
|
158
158
|
curr_commit: pygit2.Commit = libRepo.head.peel()
|
|
159
159
|
lib_commit: pygit2.Commit = self.getLibCommitVersion(libRepo, libData.version)
|
|
160
160
|
if curr_commit.id == lib_commit.id:
|
|
161
|
-
|
|
162
|
-
return
|
|
161
|
+
self.Pd4Web.Version["externals"][libData.name] = str(lib_commit.id)
|
|
162
|
+
return
|
|
163
163
|
libRepo.set_head(lib_commit.id)
|
|
164
164
|
libRepo.checkout_tree(lib_commit)
|
|
165
165
|
libRepo.reset(lib_commit.id, pygit2.GIT_RESET_HARD)
|
|
166
|
+
self.Pd4Web.Version["externals"][libData.name] = str(lib_commit.id)
|
|
166
167
|
return
|
|
167
168
|
|
|
168
169
|
libLink = f"https://github.com/{libData.dev}/{libData.repo}"
|
|
@@ -187,6 +188,8 @@ class ExternalLibraries:
|
|
|
187
188
|
submodule_collection.update()
|
|
188
189
|
except:
|
|
189
190
|
self.Pd4Web.exception("Failed to initialize submodules.")
|
|
191
|
+
|
|
192
|
+
self.Pd4Web.Version["externals"][libData.name] = str(commit.id)
|
|
190
193
|
|
|
191
194
|
# TODO: Try to merge commits from submodules
|
|
192
195
|
# try:
|
|
@@ -212,7 +215,7 @@ class ExternalLibraries:
|
|
|
212
215
|
os.mkdir(self.Pd4Web.APPDATA + "/Externals")
|
|
213
216
|
|
|
214
217
|
libFolder = self.Pd4Web.APPDATA + f"/Externals/{libData.name}"
|
|
215
|
-
self.CloneLibrary(
|
|
218
|
+
self.CloneLibrary(libData)
|
|
216
219
|
if not os.path.exists(self.PROJECT_ROOT + f"/Pd4Web/Externals/{libData.name}"):
|
|
217
220
|
self.Pd4Web.print(
|
|
218
221
|
f"Copying {libData.name} to Pd4Web/Externals...",
|
|
@@ -83,6 +83,41 @@ class Pd4Web:
|
|
|
83
83
|
|
|
84
84
|
self.Execute()
|
|
85
85
|
|
|
86
|
+
def InitVariables(self):
|
|
87
|
+
from .Objects import Objects
|
|
88
|
+
from .Libraries import ExternalLibraries
|
|
89
|
+
|
|
90
|
+
self.cpuCores = os.cpu_count()
|
|
91
|
+
self.usedObjects = []
|
|
92
|
+
self.patchLinesProcessed = []
|
|
93
|
+
self.uiReceiversSymbol = []
|
|
94
|
+
self.externalsSourceCode = []
|
|
95
|
+
self.externalsLinkLibraries = []
|
|
96
|
+
self.externalsLinkLibrariesFolders = []
|
|
97
|
+
self.externalsSetupFunctions = []
|
|
98
|
+
|
|
99
|
+
self.declaredLocalAbs = []
|
|
100
|
+
self.declaredLibsObjs = []
|
|
101
|
+
self.declaredPaths = []
|
|
102
|
+
self.processedAbs = []
|
|
103
|
+
|
|
104
|
+
# Versions
|
|
105
|
+
self.Version = {}
|
|
106
|
+
self.Version["python"] = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
|
|
107
|
+
self.Version["pure-data"] = self.PD_VERSION
|
|
108
|
+
self.Version["emsdk"] = self.EMSDK_VERSION
|
|
109
|
+
self.Version["pd4web"] = importlib_metadata.version("pd4web")
|
|
110
|
+
self.Version["externals"] = {}
|
|
111
|
+
|
|
112
|
+
self.Libraries: ExternalLibraries = ExternalLibraries(self)
|
|
113
|
+
self.Objects: Objects = Objects(self)
|
|
114
|
+
|
|
115
|
+
self.env = os.environ.copy()
|
|
116
|
+
python_dir = os.path.dirname(sys.executable)
|
|
117
|
+
self.env["PATH"] = f"{python_dir};{self.env['PATH']}"
|
|
118
|
+
self.env["PYTHON"] = sys.executable
|
|
119
|
+
self.env["EMSDK_QUIET"] = "1"
|
|
120
|
+
|
|
86
121
|
def Execute(self):
|
|
87
122
|
from .Builder import GetAndBuildExternals
|
|
88
123
|
from .Compilers import ExternalsCompiler
|
|
@@ -156,32 +191,7 @@ class Pd4Web:
|
|
|
156
191
|
if not os.path.exists(self.APPDATA):
|
|
157
192
|
os.makedirs(self.APPDATA)
|
|
158
193
|
|
|
159
|
-
|
|
160
|
-
from .Objects import Objects
|
|
161
|
-
from .Libraries import ExternalLibraries
|
|
162
|
-
|
|
163
|
-
self.cpuCores = os.cpu_count()
|
|
164
|
-
self.usedObjects = []
|
|
165
|
-
self.patchLinesProcessed = []
|
|
166
|
-
self.uiReceiversSymbol = []
|
|
167
|
-
self.externalsSourceCode = []
|
|
168
|
-
self.externalsLinkLibraries = []
|
|
169
|
-
self.externalsLinkLibrariesFolders = []
|
|
170
|
-
self.externalsSetupFunctions = []
|
|
171
|
-
|
|
172
|
-
self.declaredLocalAbs = []
|
|
173
|
-
self.declaredLibsObjs = []
|
|
174
|
-
self.declaredPaths = []
|
|
175
|
-
self.processedAbs = []
|
|
176
|
-
|
|
177
|
-
self.Libraries = ExternalLibraries(self)
|
|
178
|
-
self.Objects: Objects = Objects(self)
|
|
179
|
-
|
|
180
|
-
self.env = os.environ.copy()
|
|
181
|
-
python_dir = os.path.dirname(sys.executable)
|
|
182
|
-
self.env["PATH"] = f"{python_dir};{self.env['PATH']}"
|
|
183
|
-
self.env["PYTHON"] = sys.executable
|
|
184
|
-
self.env["EMSDK_QUIET"] = "1"
|
|
194
|
+
|
|
185
195
|
|
|
186
196
|
def DownloadZip(self, url, filename, what=""):
|
|
187
197
|
self.print(f"Downloading {what}...", color="green", silence=self.SILENCE)
|
|
@@ -352,6 +362,8 @@ class Pd4Web:
|
|
|
352
362
|
type=str,
|
|
353
363
|
help="Pure Data version to use",
|
|
354
364
|
)
|
|
365
|
+
|
|
366
|
+
# Pd Object
|
|
355
367
|
parser.add_argument(
|
|
356
368
|
"--pd-external",
|
|
357
369
|
required=False,
|
|
@@ -359,6 +371,14 @@ class Pd4Web:
|
|
|
359
371
|
action="store_true",
|
|
360
372
|
help="If is it pd4web external",
|
|
361
373
|
)
|
|
374
|
+
|
|
375
|
+
parser.add_argument(
|
|
376
|
+
"--pd-external-version",
|
|
377
|
+
required=False,
|
|
378
|
+
default=importlib_metadata.version("pd4web"),
|
|
379
|
+
type=str,
|
|
380
|
+
help="Version of the pd4web external being used",
|
|
381
|
+
)
|
|
362
382
|
|
|
363
383
|
## User
|
|
364
384
|
parser.add_argument(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "pd4web"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.2.2"
|
|
4
4
|
description = "pd4web compiles PureData patches with external objects for Wasm, allowing to run entire patches in web browsers."
|
|
5
5
|
authors = ["Charles K. Neimog <charlesneimog@outlook.com>"]
|
|
6
6
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|