Contrib: Mac: Fix mac deploy so that the dmg background works #9405

pull djp3 wants to merge 8 commits into bitcoin:master from djp3:macPythonTweak changing 5 files +14 −57
  1. djp3 commented at 8:02 PM on December 21, 2016: contributor

    I couldn't get the mac .dmg build to work unless I made the two changes to python in this patch. Update: I subsequently added a fix to the dmg build to make the background image work

  2. Two changes to bytes and string management to get the mac deploy to work 085ef0a58c
  3. fanquake added the label MacOSX on Dec 21, 2016
  4. kallewoof commented at 1:28 AM on December 22, 2016: member

    I ran into the background.tiff issue mentioned in #8120 when I tried to check this. https://github.com/theuni/bitcoin/commit/c622254170d4bd8c5ca75077214105cef666f4c4 addresses the encode/decode stuff in this PR as well but uses output.decode instead of str(output, "utf-8").

  5. fanquake commented at 2:04 AM on December 22, 2016: member

    Indeed, I wondered if this was going to sort out the background image issues. Lets try and fix those up here as well.

  6. djp3 commented at 4:43 AM on December 22, 2016: contributor

    What is the background image issue? I can probably fix that

  7. kallewoof commented at 4:45 AM on December 22, 2016: member
    $ make deploy
    /Library/Developer/CommandLineTools/usr/bin/make -C src qt/bitcoin-qt
    make[2]: `libsecp256k1.la' is up to date.
    build-aux/install-sh -c -d Bitcoin-Qt.app/Contents/MacOS
    STRIPPROG="/usr/bin/strip" /bin/sh /Users/me/workspace/bitcoin-kw/build-aux/install-sh -c -s  src/qt/bitcoin-qt Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt
    /usr/local/bin/python3.5 ./contrib/macdeploy/macdeployqtplus Bitcoin-Qt.app -add-qt-tr da,de,es,hu,ru,uk,zh_CN,zh_TW -translations-dir= -dmg -fancy ./contrib/macdeploy/fancy.plist -verbose 2 -volname Bitcoin-Core
    Error: Could not find background picture at "background.tiff" or "./contrib/macdeploy/background.tiff"
    make: *** [Bitcoin-Core.dmg] Error 1
    
  8. djp3 commented at 4:46 AM on December 22, 2016: contributor

    output.decode("utf-8") and str(output,"utf-8") are equivalent according to the documentation:

    "If at least one of encoding or errors is given, object should be a bytes-like object (e.g. bytes or bytearray). In this case, if object is a bytes (or bytearray) object, then str(bytes, encoding, errors) is equivalent to bytes.decode(encoding, errors). Otherwise, the bytes object underlying the buffer object is obtained before calling bytes.decode(). See Binary Sequence Types — bytes, bytearray, memoryview and Buffer Protocol for information on buffer objects." cite: https://docs.python.org/3/library/stdtypes.html

  9. djp3 commented at 4:47 AM on December 22, 2016: contributor

    Okay, I'll take a look at background.tiff issue in the morning.

  10. jonasschnelli commented at 7:27 AM on December 22, 2016: contributor

    AFAIK, make deploy on native macOS machines is currently broken (introduced in #7192). Before 7192, there was just a tiff that was used as DMG background. Since #7192, the tiff gets created by adding the package-name (Bitcoin-Core) on top of the background.svg file.

    I think most devs compile releases over Gitian, so its not among the top priorities to fix. But we should.

  11. Remove .svg image from mac build 9b37f8a2dd
  12. Add new .jpg background image f4ebaa5879
  13. Change parameters of configuration file for making .dmg build to accommodate new image background cd6a59825a
  14. Change mac build process to use a static jpg background on the dmg rather than the svg build process 4da92fcf43
  15. Removing build code that was for OSX machines that weren’t building for DARWIN. 35384e77a7
  16. Fix bug in dmg builder so that it actually reads in the configuration file 77c4570e7e
  17. djp3 commented at 5:01 PM on December 22, 2016: contributor

    Ok. I changed the dmg build process to just use a static jpg image as the background. I don't know why a dynamic background image was being built from an svg. That seems kind of crazy. In the process I found a bug in the macqtdeployplus script which I also fixed.

  18. djp3 commented at 6:04 PM on December 22, 2016: contributor

    Checking on why it didn't pass tests

  19. Undid the Makefile.am changes to try and get it through the travis tests 5db48160de
  20. djp3 renamed this:
    Contrib: Mac: Two changes to python bytes and string management to get the mac deploy to work
    Contrib: Mac: Fix mac deploy so that the dmg background works
    on Dec 22, 2016
  21. djp3 commented at 9:56 PM on December 22, 2016: contributor

    Okay, so if someone else can check this out on their machine. There are some fixes to the python in the build process and I fixed the dmg background image. It works fine on my machine and in the automated builds.

  22. jonasschnelli commented at 10:02 AM on December 23, 2016: contributor

    I think this solution is a step backward. In #7192 we got rid of the static image and introduced a SVG with a flexible product name.

  23. MarcoFalke commented at 11:42 AM on December 23, 2016: member

    use a static jpg image as the background

    Please don't use jpg for compression of such data. I think #9412 is the solution to go.

  24. fanquake commented at 11:54 AM on December 23, 2016: member

    Agree with @jonasschnelli's comments.

    Thanks for the initial bugfix and further contributions @djp3, however I'm going to close this in favour of #9412. It'd be great if you could test that PR and check it fixes your original issue.

  25. fanquake closed this on Dec 23, 2016

  26. in contrib/macdeploy/macdeployqtplus:None in 5db48160de
     851 | @@ -852,7 +852,7 @@ if config.dmg is not None:
     852 |              "items_positions" : "\n                   ".join(items_positions)
     853 |              }
     854 |          if "window_bounds" in fancy:
     855 | -            params["window.bounds"] = ",".join([str(p) for p in fancy["window_bounds"]])
     856 | +            params["window_bounds"] = ",".join([str(p) for p in fancy["window_bounds"]])
    


    djp3 commented at 4:46 PM on December 23, 2016:

    @fanquake This wasn't in #9412

  27. djp3 commented at 4:47 PM on December 23, 2016: contributor

    @fanquake #9412 worked for me. There was one bug in this PR that wasn't in 9412 though. I'll tag you in the body of the code. Should I generate a PR just for that?

  28. fanquake commented at 11:29 PM on December 23, 2016: member

    @djp3 Thanks for pointing that out, a new PR won't be necessary, we can cherry pick the bug fix into #9412.

  29. djp3 commented at 12:20 AM on December 24, 2016: contributor

    @fanquake Ok thanks!

  30. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me