@@ -14,17 +14,23 @@ echo -e "${CYAN}============================="
14
14
echo -e " AdventureCoin macOS Builder"
15
15
echo -e " =============================${RESET} "
16
16
17
+ # --------------------------
17
18
# 1. Build type
19
+ # --------------------------
18
20
echo -e " \n${GREEN} Select build type:${RESET} "
19
21
echo " 1) Daemon only"
20
22
echo " 2) Daemon + Qt Wallet (full)"
21
23
echo " 3) Qt Wallet only"
22
24
read -rp " Enter choice [1-3]: " BUILD_CHOICE
23
25
26
+ # --------------------------
24
27
# 2. Strip?
28
+ # --------------------------
25
29
read -rp $' \n Do you want to strip the binaries after build? (y/n): ' STRIP_BIN
26
30
31
+ # --------------------------
27
32
# 3. Create .app + .dmg?
33
+ # --------------------------
28
34
read -rp $' \n Do you want to create a .app and DMG for Qt Wallet? (y/n): ' MAKE_DMG
29
35
30
36
# --------------------------
62
68
echo -e " ${CYAN} ✔ Protobuf 3.6.1 already installed at $PROTOBUF_DIR ${RESET} "
63
69
fi
64
70
71
+ # --------------------------
72
+ # Fix missing protobuf.pc if needed
73
+ # --------------------------
74
+ if [ ! -f " $PROTOBUF_DIR /lib/pkgconfig/protobuf.pc" ]; then
75
+ echo -e " ${GREEN} >>> Creating missing protobuf.pc...${RESET} "
76
+ mkdir -p " $PROTOBUF_DIR /lib/pkgconfig"
77
+ cat > " $PROTOBUF_DIR /lib/pkgconfig/protobuf.pc" << EOF
78
+ prefix=$PROTOBUF_DIR
79
+ exec_prefix=\$ {prefix}
80
+ libdir=\$ {exec_prefix}/lib
81
+ includedir=\$ {prefix}/include
82
+
83
+ Name: Protocol Buffers
84
+ Description: Google's Data Interchange Format
85
+ Version: 3.6.1
86
+ Libs: -L\$ {libdir} -lprotobuf
87
+ Cflags: -I\$ {includedir}
88
+ EOF
89
+ echo -e " ${CYAN} ✔ Created protobuf.pc at $PROTOBUF_DIR /lib/pkgconfig${RESET} "
90
+ fi
91
+
92
+ # --------------------------
65
93
# Set protobuf paths
94
+ # --------------------------
66
95
export PATH=" $PROTOBUF_DIR /bin:$PATH "
67
96
export LD_LIBRARY_PATH=" $PROTOBUF_DIR /lib:$LD_LIBRARY_PATH "
68
97
export PKG_CONFIG_PATH=" $PROTOBUF_DIR /lib/pkgconfig:$PKG_CONFIG_PATH "
0 commit comments