summaryrefslogtreecommitdiff
path: root/recipes
diff options
context:
space:
mode:
Diffstat (limited to 'recipes')
-rw-r--r--recipes/build-tools/wine-mono.recipe25
-rw-r--r--recipes/build-tools/winetricks.recipe18
-rw-r--r--recipes/build-tools/wix.recipe23
3 files changed, 54 insertions, 12 deletions
diff --git a/recipes/build-tools/wine-mono.recipe b/recipes/build-tools/wine-mono.recipe
new file mode 100644
index 00000000..3638b492
--- /dev/null
+++ b/recipes/build-tools/wine-mono.recipe
@@ -0,0 +1,25 @@
+# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
+import os
+import shutil
+from cerbero.utils import shell
+
+
+class Recipe(recipe.Recipe):
+ name = 'wine-mono'
+ version = '7.1.1'
+ stype = SourceType.TARBALL
+ url = 'https://dl.winehq.org/wine/wine-mono/%(version)s/wine-mono-%(version)s-x86.msi'
+ tarball_checksum = '9dc8e5603b7bc64354eb94ae4ea0f6821424767a3ff44ff0d19e346a490c11ea'
+ btype = BuildType.CUSTOM
+
+ async def extract(self):
+ pass
+
+ async def install(self):
+ wine_path = os.path.join(self.config.prefix, 'share', 'wine')
+ if not os.path.exists(wine_path):
+ os.makedirs(wine_path)
+ self.env['WINEPREFIX'] = os.path.join(self.config.prefix, 'var', 'tmp', 'wine')
+ self.env['WINEDEBUG'] = 'fixme-all'
+ await shell.async_call(['wine', 'msiexec', '/i', os.path.join(self.download_dir, self.tarball_name)],
+ cmd_dir=wine_path, env=self.env)
diff --git a/recipes/build-tools/winetricks.recipe b/recipes/build-tools/winetricks.recipe
new file mode 100644
index 00000000..23f1b832
--- /dev/null
+++ b/recipes/build-tools/winetricks.recipe
@@ -0,0 +1,18 @@
+# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
+import os
+import shutil
+from cerbero.utils import shell
+
+
+class Recipe(recipe.Recipe):
+ name = 'winetricks'
+ version = '20210825'
+ stype = SourceType.TARBALL
+ url = 'https://github.com/Winetricks/winetricks/archive/refs/tags/%(version)s.tar.gz'
+ tarball_checksum = 'bac77918ef4d58c6465a1043fd996d09c3ee2c5a07f56ed089c4c65a71881277'
+ btype = BuildType.CUSTOM
+
+ async def install(self):
+ winetricks_tool = os.path.join(self.config.prefix, 'bin', self.name)
+ shutil.copy(os.path.join(self.build_dir, 'src', self.name), winetricks_tool)
+ await shell.async_call(['chmod', '+x', winetricks_tool])
diff --git a/recipes/build-tools/wix.recipe b/recipes/build-tools/wix.recipe
index 93a146be..a28c7bb6 100644
--- a/recipes/build-tools/wix.recipe
+++ b/recipes/build-tools/wix.recipe
@@ -10,24 +10,23 @@ class Recipe(recipe.Recipe):
stype = SourceType.TARBALL
url = 'https://github.com/wixtoolset/wix3/releases/download/wix3111rtm/wix311-binaries.zip'
tarball_checksum = '37f0a533b0978a454efb5dc3bd3598becf9660aaf4287e55bf68ca6b527d051d'
+ deps = ['winetricks', 'wine-mono']
btype = BuildType.CUSTOM
- winetricks_url = 'https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks'
async def extract(self):
if os.path.exists(self.build_dir):
shutil.rmtree(self.build_dir)
os.makedirs(self.build_dir)
- await shell.unpack(self.download_path, self.build_dir)
+ await shell.unpack(os.path.join(self.download_dir, self.tarball_name), self.build_dir)
async def install(self):
shell.copy_dir(self.build_dir, os.path.join(self.config.prefix, 'lib', 'wix', 'bin'))
- if self.config.platform == Platform.LINUX:
- wine_path = os.path.join(self.config.prefix, 'share', 'wine')
- shell.download(self.winetricks_url, os.path.join(wine_path, 'winetricks'), True, True)
- env = {
- 'DISPLAY': '',
- 'HOME': wine_path,
- 'WINEPREFIX': wine_path
- }
- await shell.async_call(['sh', './winetricks', '-q', 'dotnet40'],
- cmd_dir=wine_path, env=env)
+ # wineconsole fails trying to get env var in a VT with DISPLAY.
+ # This is working on docker buildbot and on a real terminal.
+ winetricks_tool = os.path.join(self.config.prefix, 'bin', 'winetricks')
+ if not 'DISPLAY' in self.env:
+ self.env['WINE'] = "wineconsole"
+ if self.config.target_platform == Platform.WINDOWS and \
+ self.config.platform == Platform.LINUX:
+ await shell.async_call([winetricks_tool, '-q', 'dotnet40'], env=self.env)
+