summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Le Page <llepage@fluendo.com>2019-06-13 18:10:10 +0200
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2019-07-22 13:12:25 +0000
commit63169b72432b2596932cd2e68167a1d60ea62e5c (patch)
tree7e716ad31b763cfa8543fda1dfba32d5501fe180
parent20d44736dc347d05d547d88e5e944d9d2ec168e7 (diff)
On Linux platform, configure wine to use wix tools
-rw-r--r--config/windows.config1
-rw-r--r--recipes/build-tools/wix.recipe14
2 files changed, 15 insertions, 0 deletions
diff --git a/config/windows.config b/config/windows.config
index c126820d..e355e937 100644
--- a/config/windows.config
+++ b/config/windows.config
@@ -22,6 +22,7 @@ if platform == Platform.WINDOWS:
build = 'x86_64-w64-mingw32'
else:
os.environ['WIX'] = os.path.join(build_tools_prefix, 'lib', 'wix')
+ os.environ['WINEPREFIX'] = os.path.join(build_tools_prefix, 'share', 'wine')
separator = ':'
if target_arch == Architecture.X86:
diff --git a/recipes/build-tools/wix.recipe b/recipes/build-tools/wix.recipe
index 4c344899..a750c273 100644
--- a/recipes/build-tools/wix.recipe
+++ b/recipes/build-tools/wix.recipe
@@ -1,5 +1,8 @@
# -*- 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 = 'wix'
@@ -8,6 +11,7 @@ class Recipe(recipe.Recipe):
url = 'https://github.com/wixtoolset/wix3/releases/download/wix3111rtm/wix311-binaries.zip'
tarball_checksum = '37f0a533b0978a454efb5dc3bd3598becf9660aaf4287e55bf68ca6b527d051d'
btype = BuildType.CUSTOM
+ winetricks_url = 'https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks'
def extract(self):
if os.path.exists(self.build_dir):
@@ -17,3 +21,13 @@ class Recipe(recipe.Recipe):
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
+ }
+ shell.new_call(['sh', './winetricks', '-q', 'dotnet40'],
+ cmd_dir=wine_path, env=env)