1
0

setup-wine64 1.2 KB

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. # Copyright 2022 The ChromiumOS Authors
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. set -ex
  6. wine64 wineboot
  7. WINETRICKS_COMMIT_HASH="b666e05a0bf28fd940e5c258ccdfc0a2799d1948"
  8. WINETRICKS_URL="https://raw.githubusercontent.com/Winetricks/winetricks/"$WINETRICKS_COMMIT_HASH"/src/winetricks"
  9. WINESTRICKS_SCRIPT_SHA="40fdf1f89f3636187201858e3591e86752172814"
  10. # Setup wine windows prebuilt dependecies.
  11. export WINEARCH=win64
  12. export WINE=wine64
  13. sudo wget "$WINETRICKS_URL" -O winetricks
  14. echo "$WINESTRICKS_SCRIPT_SHA winetricks" | sha1sum -c -
  15. sudo chmod +x winetricks
  16. # winetricks command fails while setting up dll registry post installation. During docker build
  17. # this command fails because it tries to create a regedit window but we do not have DISPLAY set.
  18. # Failure happens after installing dlls that we need so we ignore the failure.
  19. # TODO(b:255824543): Find a way to clean install vcrun2015
  20. ./winetricks --force vcrun2015 || true
  21. ln -fs ~/.wine/drive_c/windows/system32/ucrtbase.dll ~/.wine/drive_c/windows/system32/ucrtbased.dll
  22. ln -fs ~/.wine/drive_c/windows/system32/vcruntime140.dll ~/.wine/drive_c/windows/system32/vcruntime140d.dll
  23. sudo rm winetricks