shohu / c0ban

c0ban source tree
MIT License
0 stars 0 forks source link

Create mac qt #66

Closed shohu closed 6 years ago

shohu commented 6 years ago

https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md

Because if I compile bitcoin and create qt binary in mac, someone can't run this qt binary. So I have to create dmg for mac.

shohu commented 6 years ago
$ make deploy
build-aux/install-sh -c -d c0ban-Qt.app/Contents
build-aux/install-sh -c -d c0ban-Qt.app/Contents/Resources
build-aux/install-sh -c -d c0ban-Qt.app/Contents/Resources
/usr/bin/install -c -m 644 src/qt/res/icons/bitcoin.icns c0ban-Qt.app/Contents/Resources/bitcoin.icns
build-aux/install-sh -c -d c0ban-Qt.app/Contents
/usr/bin/install -c -m 644 share/qt/Info.plist c0ban-Qt.app/Contents/Info.plist
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src qt/c0ban-qt
build-aux/install-sh -c -d c0ban-Qt.app/Contents/MacOS
STRIPPROG="/usr/bin/strip" /bin/sh /Users/shohu33/lastroots/c0ban-15/services/c0ban-15-mac/build-aux/install-sh -c -s  src/qt/c0ban-qt c0ban-Qt.app/Contents/MacOS/c0ban-Qt
build-aux/install-sh -c -d c0ban-Qt.app/Contents/Resources/Base.lproj
echo '{ CFBundleDisplayName = "c0ban Core"; CFBundleName = "c0ban Core"; }' > c0ban-Qt.app/Contents/Resources/Base.lproj/InfoPlist.strings
sed 's/PACKAGE_NAME/c0ban Core/' < "contrib/macdeploy/background.svg" | /usr/local/bin/rsvg-convert -f png -d 36 -p 36 -o background.tiff.png
sed 's/PACKAGE_NAME/c0ban Core/' < "contrib/macdeploy/background.svg" | /usr/local/bin/rsvg-convert -f png -d 72 -p 72 -o background.tiff@2x.png
tiffutil -cathidpicheck background.tiff.png background.tiff@2x.png -out background.tiff
2 images written to background.tiff.
/Users/shohu33/.pyenv/shims/python3.6 ./contrib/macdeploy/macdeployqtplus c0ban-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 c0ban-Core
pyenv: python3.6: command not found

The `python3.6' command exists in these Python versions:
  3.6.1

make: *** [c0ban-Core.dmg] Error 127

install python

see. https://qiita.com/y4m3/items/19246624d3ba4d299313

pyenv global system 3.6.1

make deploy

I try to make deploy ... I got error orz

# make deploy
+ Preparing .dmg disk image +
......................................................................................................................
created: /Users/shohu33/lastroots/c0ban-15/services/c0ban-15-mac/c0ban-Qt.temp.dmg
+ Applying fancy settings +
Running AppleScript:

        on run argv
           tell application "Finder"
             tell disk "c0ban-Core"
                   open
                   set current view of container window to icon view
                   set toolbar visible of container window to false
                   set statusbar visible of container window to false
                   set the bounds of container window to {300,300,800,620}
                   set theViewOptions to the icon view options of container window
                   set arrangement of theViewOptions to not arranged
                   set icon size of theViewOptions to 96
                   set background picture of theViewOptions to file ".background:background.tiff"
                   do shell script "SetFile -a V /Volumes/c0ban-Core/.background/background.tiff"
                   set position of item "Applications" of container window to {370,156}
                   set position of item "c0ban-Qt.app" of container window to {128,156}
                   close -- close/reopen works around a bug...
                   open
                   update without registering applications
                   delay 5
                   eject
             end tell
           end tell
        end run
 :
 :
913:981: execution error: Finderでエラーが起きました: item "c0ban-Qt.app" of Finder window id 54153を{128, 156}に設定できません。 (-10006)
Error running osascript.
+ Finalizing .dmg disk image +
hdiutil: convert failed - リソースが一時的に使用できません
make: *** [c0ban-Core.dmg] Error 1

Maybe this error is occured by following source ?

set position of item "c0ban-Qt.app" of container window to {128,156}

2018-08-03 10 29 49 I fix macdeploy files... so I created qt 👍 but I can't run the binary orz 2018-08-03 11 55 55

shohu commented 6 years ago

Bitcoin

$ make deploy
build-aux/install-sh -c -d Bitcoin-Qt.app/Contents
build-aux/install-sh -c -d Bitcoin-Qt.app/Contents/Resources
build-aux/install-sh -c -d Bitcoin-Qt.app/Contents/Resources
/usr/bin/install -c -m 644 src/qt/res/icons/bitcoin.icns Bitcoin-Qt.app/Contents/Resources/bitcoin.icns
build-aux/install-sh -c -d Bitcoin-Qt.app/Contents
/usr/bin/install -c -m 644 share/qt/Info.plist Bitcoin-Qt.app/Contents/Info.plist
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src qt/bitcoin-qt
build-aux/install-sh -c -d Bitcoin-Qt.app/Contents/MacOS
STRIPPROG="/usr/bin/strip" /bin/sh /Users/shohu33/lastroots/c0ban-15/services/bitcoin-15/build-aux/install-sh -c -s  src/qt/bitcoin-qt Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt
build-aux/install-sh -c -d Bitcoin-Qt.app/Contents/Resources/Base.lproj
echo '{ CFBundleDisplayName = "Bitcoin Core"; CFBundleName = "Bitcoin Core"; }' > Bitcoin-Qt.app/Contents/Resources/Base.lproj/InfoPlist.strings
sed 's/PACKAGE_NAME/Bitcoin Core/' < "contrib/macdeploy/background.svg" | /usr/local/bin/rsvg-convert -f png -d 36 -p 36 -o background.tiff.png
sed 's/PACKAGE_NAME/Bitcoin Core/' < "contrib/macdeploy/background.svg" | /usr/local/bin/rsvg-convert -f png -d 72 -p 72 -o background.tiff@2x.png
tiffutil -cathidpicheck background.tiff.png background.tiff@2x.png -out background.tiff
2 images written to background.tiff.
/Users/shohu33/.pyenv/shims/python3.6 ./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
+ Copying source bundle +
+ Deploying frameworks +
Processing libboost_system.dylib ...
Processing libboost_filesystem.dylib ...
Processing libboost_program_options-mt.dylib ...
Processing libboost_thread-mt.dylib ...
Processing libboost_chrono-mt.dylib ...
Processing QtNetwork.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtNetwork.framework/Versions/Current -> 5
Processing QtWidgets.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtWidgets.framework/Versions/Current -> 5
Processing QtGui.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtGui.framework/Versions/Current -> 5
Processing QtCore.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtCore.framework/Versions/Current -> 5
Processing QtDBus.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtDBus.framework/Versions/Current -> 5
Processing libprotobuf.14.dylib ...
Processing libdb_cxx-4.8.dylib ...
Processing libssl.1.0.0.dylib ...
Processing libcrypto.1.0.0.dylib ...
Processing libminiupnpc.16.dylib ...
Processing libevent_pthreads-2.1.6.dylib ...
Processing libevent-2.1.6.dylib ...
Processing libboost_system-mt.dylib ...
libboost_system-mt.dylib already deployed, skipping.
Processing QtCore.framework ...
Processing QtGui.framework ...
Processing libcrypto.1.0.0.dylib ...
+ Deploying plugins +
Processing plugin platforminputcontexts/libqtvirtualkeyboardplugin.dylib ...
Processing QtQuick.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtQuick.framework/Versions/Current -> 5
Processing QtQml.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtQml.framework/Versions/Current -> 5
Processing plugin geoservices/libqtgeoservices_esri.dylib ...
Processing QtLocation.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtLocation.framework/Versions/Current -> 5
Processing QtPositioning.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtPositioning.framework/Versions/Current -> 5
Processing plugin geoservices/libqtgeoservices_mapboxgl.dylib ...
Processing QtSql.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtSql.framework/Versions/Current -> 5
Processing plugin geoservices/libqtgeoservices_nokia.dylib ...
Processing plugin geoservices/libqtgeoservices_itemsoverlay.dylib ...
Processing plugin geoservices/libqtgeoservices_osm.dylib ...
Processing QtConcurrent.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtConcurrent.framework/Versions/Current -> 5
Processing plugin geoservices/libqtgeoservices_mapbox.dylib ...
Processing plugin sceneparsers/libgltfsceneexport.dylib ...
Processing Qt3DExtras.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/Qt3DExtras.framework/Versions/Current -> 5
Processing Qt3DRender.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/Qt3DRender.framework/Versions/Current -> 5
Processing Qt3DCore.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/Qt3DCore.framework/Versions/Current -> 5
Processing Qt3DInput.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/Qt3DInput.framework/Versions/Current -> 5
Processing QtGamepad.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtGamepad.framework/Versions/Current -> 5
Processing Qt3DLogic.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/Qt3DLogic.framework/Versions/Current -> 5
Processing plugin sceneparsers/libassimpsceneimport.dylib ...
Processing Qt3DAnimation.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/Qt3DAnimation.framework/Versions/Current -> 5
Processing plugin sceneparsers/libgltfsceneimport.dylib ...
Processing plugin platforms/libqoffscreen.dylib ...
Processing plugin platforms/libqminimal.dylib ...
Processing plugin platforms/libqcocoa.dylib ...
Processing QtPrintSupport.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtPrintSupport.framework/Versions/Current -> 5
Processing plugin printsupport/libcocoaprintersupport.dylib ...
Processing plugin geometryloaders/libdefaultgeometryloader.dylib ...
Processing plugin geometryloaders/libgltfgeometryloader.dylib ...
Processing plugin canbus/libqttinycanbus.dylib ...
Processing QtSerialBus.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtSerialBus.framework/Versions/Current -> 5
Processing QtSerialPort.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtSerialPort.framework/Versions/Current -> 5
Processing plugin canbus/libqtpeakcanbus.dylib ...
Processing plugin bearer/libqcorewlanbearer.dylib ...
Processing plugin bearer/libqgenericbearer.dylib ...
Processing plugin imageformats/libqgif.dylib ...
Processing plugin imageformats/libqwbmp.dylib ...
Processing plugin imageformats/libqwebp.dylib ...
Processing plugin imageformats/libqico.dylib ...
Processing plugin imageformats/libqjpeg.dylib ...
Processing plugin imageformats/libqtiff.dylib ...
Processing plugin imageformats/libqicns.dylib ...
Processing plugin imageformats/libqtga.dylib ...
Processing plugin imageformats/libqmacjp2.dylib ...
Processing plugin texttospeech/libqtexttospeech_speechosx.dylib ...
Processing QtTextToSpeech.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/QtTextToSpeech.framework/Versions/Current -> 5
Processing plugin generic/libqtuiotouchplugin.dylib ...
Processing plugin renderplugins/libscene2d.dylib ...
Processing Qt3DQuickScene2D.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/Qt3DQuickScene2D.framework/Versions/Current -> 5
Processing Qt3DQuick.framework ...
Linked: dist/Bitcoin-Qt.app/Contents/Frameworks/Qt3DQuick.framework/Versions/Current -> 5
Processing plugin gamepads/libdarwingamepad.dylib ...
+ Installing qt.conf +
+ Adding Qt translations +
+ Preparing .dmg disk image +
.................................................................................................................
created: /Users/shohu33/lastroots/c0ban-15/services/bitcoin-15/Bitcoin-Qt.temp.dmg
+ Applying fancy settings +
Running AppleScript:

        on run argv
           tell application "Finder"
             tell disk "Bitcoin-Core"
                   open
                   set current view of container window to icon view
                   set toolbar visible of container window to false
                   set statusbar visible of container window to false
                   set the bounds of container window to {300,300,800,620}
                   set theViewOptions to the icon view options of container window
                   set arrangement of theViewOptions to not arranged
                   set icon size of theViewOptions to 96
                   set background picture of theViewOptions to file ".background:background.tiff"
                   do shell script "SetFile -a V /Volumes/Bitcoin-Core/.background/background.tiff"
                   set position of item "Applications" of container window to {370,156}
                   set position of item "Bitcoin-Qt.app" of container window to {128,156}
                   close -- close/reopen works around a bug...
                   open
                   update without registering applications
                   delay 5
                   eject
             end tell
           end tell
        end run

+ Finalizing .dmg disk image +
nx_kernel_mount:1359: : checkpoint search: largest xid 8, best xid 8 @ 7
nx_kernel_mount:1359: : checkpoint search: largest xid 8, best xid 8 @ 7
nx_kernel_mount:1359: : checkpoint search: largest xid 8, best xid 8 @ 7
nx_kernel_mount:1359: : checkpoint search: largest xid 8, best xid 8 @ 7
イメージ作成エンジンを準備中…
nx_kernel_mount:1359: : checkpoint search: largest xid 8, best xid 8 @ 7
nx_kernel_mount:1359: : checkpoint search: largest xid 8, best xid 8 @ 7
nx_kernel_mount:1359: : checkpoint search: largest xid 8, best xid 8 @ 7
nx_kernel_mount:1359: : checkpoint search: largest xid 8, best xid 8 @ 7
nx_kernel_mount:1359: : checkpoint search: largest xid 8, best xid 8 @ 7
Protective Master Boot Record(MBR: 0)を読み込み中…
   (CRC32 $1822BB44:Protective Master Boot Record(MBR: 0))
GPT Header(Primary GPT Header: 1)を読み込み中…
   (CRC32 $56D0DEC3:GPT Header(Primary GPT Header: 1))
GPT Partition Data(Primary GPT Table: 2)を読み込み中…
   (CRC32 $4E9D40BA:GPT Partition Data(Primary GPT Table: 2))
(Apple_Free: 3)を読み込み中…
   (CRC32 $00000000:(Apple_Free: 3))
disk image(Apple_APFS: 4)を読み込み中…
.................................................................................................................................
   (CRC32 $84A5B310:disk image(Apple_APFS: 4))
(Apple_Free: 5)を読み込み中…
.................................................................................................................................
   (CRC32 $00000000:(Apple_Free: 5))
GPT Partition Data(Backup GPT Table: 6)を読み込み中…
.................................................................................................................................
   (CRC32 $4E9D40BA:GPT Partition Data(Backup GPT Table: 6))
GPT Header(Backup GPT Header: 7)を読み込み中…
..................................................................................................................................
   (CRC32 $5BF47774:GPT Header(Backup GPT Header: 7))
リソースを追加中…
..................................................................................................................................
経過時間:  3.114s
ファイルサイズ: 24733970バイト、チェックサム: CRC32 $B7D75963
処理されたセクタ数: 151477、134971圧縮されました
速度: 21.2Mバイト/秒
節約率: 68.1%
created: /Users/shohu33/lastroots/c0ban-15/services/bitcoin-15/Bitcoin-Qt.dmg
+ Done +
shohu commented 6 years ago

diff c0ban VS bitcoin. It's almost of same

2018-08-03 13 09 27

info.plist

2018-08-03 13 11 29

infoPlist.strings

2018-08-03 13 10 53

Run Application by Terminal

I tried to run c0ban-Qt by Terminal. But I got following error

# open c0ban-Qt
LSOpenURLsWithRole() failed with error -10810 for the file /Applications/c0ban-Qt.app.

I changed Application file name from c0ban-Qt -> Bitcoin-Qt. 2018-08-03 13 33 28 So I run success !

shohu commented 6 years ago

https://github.com/shohu/c0ban/commit/a060beb1f3ac4f3691198de944b4dd903df2aa8a