From c5517487066d4ee5db31d122ec783bd15e60b4ac Mon Sep 17 00:00:00 2001
From: Dmitry Puzyrkov <dmitry.puzyrkov@demlabs.net>
Date: Thu, 4 Jul 2024 04:45:30 +0000
Subject: [PATCH] Feature conftool rc53

---
 build.sh                |   2 +-
 packaging/deb/config    |  71 ---------------
 packaging/deb/postinst  | 190 ----------------------------------------
 packaging/deb/postrm    |  42 ---------
 packaging/deb/prerm     |  29 ------
 packaging/deb/rules     |  10 ---
 packaging/deb/templates | 133 ----------------------------
 packaging/osx.sh        |  10 +--
 packaging/windows.sh    |  24 +++++
 targets/osx.sh          |  15 +---
 10 files changed, 34 insertions(+), 492 deletions(-)
 delete mode 100755 packaging/deb/config
 delete mode 100755 packaging/deb/postinst
 delete mode 100755 packaging/deb/postrm
 delete mode 100755 packaging/deb/prerm
 delete mode 100755 packaging/deb/rules
 delete mode 100755 packaging/deb/templates
 create mode 100644 packaging/windows.sh

diff --git a/build.sh b/build.sh
index 48d0c40..d476768 100755
--- a/build.sh
+++ b/build.sh
@@ -130,5 +130,5 @@ echo "${CMAKE[@]} ${MHERE}/../ -DCREATE_DEFAULT_CONFIG=OFF ${BUILD_OPTIONS[@]}"
 #echo $HERE
 export INSTALL_ROOT=${BUILD_DIR}/dist
 "${CMAKE[@]}" ${MHERE}/../ -DCREATE_DEFAULT_CONFIG=OFF ${BUILD_OPTIONS[@]}  
-"${MAKE[@]}" -j $NPROC
+"${MAKE[@]}"  -j $NPROC
 "${MAKE[@]}" install DESTDIR=${INSTALL_ROOT}
diff --git a/packaging/deb/config b/packaging/deb/config
deleted file mode 100755
index 47ad739..0000000
--- a/packaging/deb/config
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/bash -e
-. /usr/share/debconf/confmodule
-
-
-case "$1" in
-reconfigure|configure)
-
-   db_input critical cellframe-node/auto_online || true 
-   db_go || true 
-
-   db_input critical cellframe-node/debug_mode || true 
-   db_go || true 
-
-   db_input critical cellframe-node/server_enabled || true 
-   db_go || true 
-
-   db_input critical cellframe-node/server_addr || true 
-   db_go || true 
-
-   db_input critical cellframe-node/server_port || true 
-   db_go || true 
-
-   db_input critical cellframe-node/notify_srv_addr || true 
-   db_go || true 
-
-   db_input critical cellframe-node/notify_srv_port || true 
-   db_go || true 
-
-   db_input critical cellframe-node/subzero_enabled || true 
-   db_go || true 
-
-   db_get cellframe-node/subzero_enabled
-   if [ "$RET" = "true" ]; then
-      db_input critical cellframe-node/subzero_node_type || true 
-      db_go || true
-   fi
-
-   db_input critical cellframe-node/kelvpn_minkowski_enabled || true 
-   db_go || true 
-
-   db_get cellframe-node/kelvpn_minkowski_enabled
-   if [ "$RET" = "true" ]; then
-      db_input critical cellframe-node/kelvpn_minkowski_node_type || true 
-      db_go || true
-   fi
-
-   db_input critical cellframe-node/backbone_enabled || true 
-   db_go || true 
-
-   db_get cellframe-node/backbone_enabled
-   if [ "$RET" = "true" ]; then
-      db_input critical cellframe-node/backbone_node_type || true 
-      db_go || true
-   fi
-
-   db_input critical cellframe-node/enable_python_plugins || true 
-   db_go || true 
-
-   db_get cellframe-node/enable_python_plugins
-   if [ "$RET" = "true" ]; then
-      db_input critical cellframe-node/python_plugins_path || true 
-      db_go || true
-   fi
-;;
-*)
-   echo "config called with unknown argument \`$1'" >&2
-   exit 1
-;;
-esac
-
-
diff --git a/packaging/deb/postinst b/packaging/deb/postinst
deleted file mode 100755
index aa9f7a0..0000000
--- a/packaging/deb/postinst
+++ /dev/null
@@ -1,190 +0,0 @@
-#!/bin/bash -e
-. /usr/share/debconf/confmodule
-
-DAP_CHAINS_NAME="cellframe"
-DAP_APP_NAME="${DAP_CHAINS_NAME}-node"
-DAP_PREFIX="/opt/${DAP_APP_NAME}"
-
-DAP_CFG_TPL="${DAP_PREFIX}/share/configs/${DAP_APP_NAME}.cfg.tpl"
-
-# Store write config to new if present smth
-DAP_CFG="${DAP_PREFIX}/etc/${DAP_APP_NAME}.cfg"
-
-[ -e "/etc/profile.d/${DAP_APP_NAME}.sh" ] || ln -sf ${DAP_PREFIX}/share/profile.d/${DAP_APP_NAME}.sh /etc/profile.d/${DAP_APP_NAME}.sh
-
-# Init node config
-if [ -e "${DAP_CFG}" ]; then
-    DAP_CFG="${DAP_PREFIX}/etc/${DAP_APP_NAME}.cfg.dpkg-new"
-else
-    DAP_CFG="${DAP_PREFIX}/etc/${DAP_APP_NAME}.cfg"
-fi
-
-cat ${DAP_CFG_TPL} > ${DAP_CFG} || true
-
-sed -i "s/{PREFIX}/\/opt\/${DAP_APP_NAME}/g" ${DAP_CFG}  || true
-
-db_get cellframe-node/debug_mode || true
-sed -i "s/{DEBUG_MODE}/${RET}/g" ${DAP_CFG}  || true
-
-db_get cellframe-node/auto_online || true
-sed -i "s/{AUTO_ONLINE}/${RET}/g" ${DAP_CFG}  || true
-
-db_get cellframe-node/server_enabled || true
-sed -i "s/{SERVER_ENABLED}/${RET}/g" ${DAP_CFG}  || true
-
-db_get cellframe-node/server_port || true
-sed -i "s/{SERVER_PORT}/${RET}/g" ${DAP_CFG}  || true
-
-db_get cellframe-node/server_addr || true
-sed -i "s/{SERVER_ADDR}/${RET}/g" ${DAP_CFG}  || true
-
-db_get cellframe-node/notify_srv_addr || true
-sed -i "s/{NOTIFY_SRV_ADDR}/${RET}/g" ${DAP_CFG}  || true
-
-db_get cellframe-node/notify_srv_port || true
-sed -i "s/{NOTIFY_SRV_PORT}/${RET}/g" ${DAP_CFG}  || true
-
-# Init subzero
-NET_NAME="subzero"
-
-db_get cellframe-node/subzero_enabled || true
-if [ "${RET}" = "true" ]; then
-    DAP_CFG_NET="${DAP_PREFIX}/etc/network/${NET_NAME}.cfg"
-    DAP_CFG_NET_TPL="${DAP_PREFIX}/share/configs/network/${NET_NAME}.cfg.tpl"
-    DAP_NET_CFG=""
-    
-    if [ -e "$DAP_CFG_NET" ]; then
-	DAP_NET_CFG="${DAP_PREFIX}/etc/network/${NET_NAME}.cfg.dpkg-new"
-    else
-	DAP_NET_CFG="${DAP_PREFIX}/etc/network/${NET_NAME}.cfg"
-    fi
-
-    cat ${DAP_CFG_NET_TPL} > ${DAP_NET_CFG} || true
-    db_get cellframe-node/subzero_node_type || true
-    NODE_TYPE=${RET}
-    sed -i "s/{NODE_TYPE}/${NODE_TYPE}/g" ${DAP_NET_CFG}  || true
-    echo "[*] Enabled subzero"
-fi
-
-# Init mileena
-NET_NAME="mileena"
-
-db_get cellframe-node/mileena_enabled || true
-if [ "$RET" = "true" ]; then
-    DAP_CFG_NET="${DAP_PREFIX}/etc/network/${NET_NAME}.cfg"
-    DAP_CFG_NET_TPL="${DAP_PREFIX}/share/configs/network/${NET_NAME}.cfg.tpl"
-    DAP_NET_CFG=""
-    
-    if [ -e "${DAP_CFG_NET}" ]; then
-	DAP_NET_CFG="${DAP_PREFIX}/etc/network/${NET_NAME}.cfg.dpkg-new"
-    else
-	DAP_NET_CFG="${DAP_PREFIX}/etc/network/${NET_NAME}.cfg"
-    fi
-
-    cat ${DAP_CFG_NET_TPL} > ${DAP_NET_CFG} || true
-    db_get cellframe-node/mileena_node_type || true
-    NODE_TYPE=${RET}
-    sed -i "s/{NODE_TYPE}/${NODE_TYPE}/g" ${DAP_NET_CFG}  || true
-    echo "[*] Enabled mileena"
-fi
-
-# Init Minkowski
-NET_NAME="kelvpn-minkowski"
-
-db_get cellframe-node/kelvpn_minkowski_enabled || true
-if [ "${RET}" = "true" ]; then
-    DAP_CFG_NET="${DAP_PREFIX}/etc/network/${NET_NAME}.cfg"
-    DAP_CFG_NET_TPL="${DAP_PREFIX}/share/configs/network/${NET_NAME}.cfg.tpl"
-    DAP_NET_CFG=""
-    
-    if [ -e "$DAP_CFG_NET" ]; then
-	DAP_NET_CFG="${DAP_PREFIX}/etc/network/${NET_NAME}.cfg.dpkg-new"
-    else
-	DAP_NET_CFG="${DAP_PREFIX}/etc/network/${NET_NAME}.cfg"
-    fi
-
-    cat ${DAP_CFG_NET_TPL} > ${DAP_NET_CFG} || true
-    db_get cellframe-node/kelvpn_minkowski_node_type || true
-    NODE_TYPE=${RET}
-    sed -i "s/{NODE_TYPE}/${NODE_TYPE}/g" ${DAP_NET_CFG}  || true
-    echo "[*] Enabled kelvpn-minkowski"
-fi
-
-# Init Backbone
-NET_NAME="Backbone"
-
-db_get cellframe-node/backbone_enabled || true
-if [ "${RET}" = "true" ]; then
-    DAP_CFG_NET="${DAP_PREFIX}/etc/network/${NET_NAME}.cfg"
-    DAP_CFG_NET_TPL="${DAP_PREFIX}/share/configs/network/${NET_NAME}.cfg.tpl"
-    DAP_NET_CFG=""
-    
-    if [ -e "${DAP_CFG_NET}" ]; then
-	DAP_NET_CFG="${DAP_PREFIX}/etc/network/${NET_NAME}.cfg.dpkg-new"
-    else
-	DAP_NET_CFG="${DAP_PREFIX}/etc/network/${NET_NAME}.cfg"
-    fi
-
-    cat ${DAP_CFG_NET_TPL} > ${DAP_NET_CFG} || true
-    db_get cellframe-node/backbone_node_type || true
-    NODE_TYPE=$RET
-    sed -i "s/{NODE_TYPE}/${NODE_TYPE}/g" ${DAP_NET_CFG}  || true
-    echo "[*] Enabled Backbone"
-fi
-
-#Set up Python plugins
-db_get cellframe-node/enable_python_plugins || true
-if [ "${RET}" = "true" ]; then
-    sed -i 's/#\[plugins\]/\[plugins\]/g' ${DAP_CFG} || true
-    sed -i 's/#py_load=.*/py_load=true/g' ${DAP_CFG} || true
-    db_get cellframe-node/python_plugins_path || true
-    sed -i "s|#py_path=.*|py_path=${RET}|g" ${DAP_CFG} || true
-    echo "[*] Enabled Python plugins"
-fi
-
-if [ $(cat /etc/passwd | grep ${DAP_APP_NAME}) ] ; then
-    usermod ${DAP_APP_NAME} -s /bin/false > /dev/null || true # Let's change the default shell just in case
-else
-    echo "[*] Add user ${DAP_APP_NAME}"
-    adduser --system --no-create-home --group --home /opt/${DAP_APP_NAME} ${DAP_APP_NAME} --shell /bin/false > /dev/null || true
-fi
-
-echo "[*] Check if /etc/systemd/system/${DAP_APP_NAME}.service file is available..."
-if [ -e /etc/systemd/system/${DAP_APP_NAME}.service ]; then
-    echo "[*] File found, restarting ${DAP_APP_NAME} to implement changes"
-    systemctl daemon-reload || true
-    systemctl start ${DAP_APP_NAME} || true
-    echo "[!] Done"
-else
-    echo "[!] Installing ${DAP_APP_NAME} as systemd service"
-    ln -sf $DAP_PREFIX/share/${DAP_APP_NAME}.service /etc/systemd/system/${DAP_APP_NAME}.service || true
-    systemctl enable ${DAP_PREFIX}/share/${DAP_APP_NAME}.service || true
-    echo "[*] Enabling logrotate"
-    ln -sf ${DAP_PREFIX}/share/logrotate/${DAP_APP_NAME} /etc/logrotate.d/${DAP_APP_NAME} || true
-
-    mkdir -p ${DAP_PREFIX}/var/{run,lib/wallet,lib/global_db,lib/plugins,log} || true
-    
-    touch ${DAP_PREFIX}/var/run/${DAP_APP_NAME}.pid || true
-    
-    for filename in $(find ${DAP_PREFIX} | grep -v bugreport); do
-        if [ -d ${filename} ]; then
-            chmod 0775 ${filename} 2>/dev/null || true
-        else
-            chmod 0664 ${filename} 2>/dev/null || true
-        fi
-    done
-
-    chmod 0666 ${DAP_CFG}
-    chmod 0666 ${DAP_CFG_TPL}
-    chmod 0775 ${DAP_PREFIX}/bin/* || true
-
-    #set python permissions    
-    find ${DAP_PREFIX}/bin/python -type d -exec chmod 755 {} +
-    chmod 774 ${DAP_PREFIX}/bin/python/bin/* || true
-    chown -R ${DAP_APP_NAME}: ${DAP_PREFIX}
-    echo "[*] Starting ${DAP_APP_NAME} service"
-    systemctl start ${DAP_APP_NAME} || true
-    echo "[!] Done"
-fi
-
-exit 0
\ No newline at end of file
diff --git a/packaging/deb/postrm b/packaging/deb/postrm
deleted file mode 100755
index a512279..0000000
--- a/packaging/deb/postrm
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash 
-
-DAP_CHAINS_NAME="cellframe"
-DAP_APP_NAME="${DAP_CHAINS_NAME}-node"
-DAP_PREFIX="/opt/${DAP_APP_NAME}"
-
-GDB_PATH=`cat ${DAP_PREFIX}/etc/${DAP_APP_NAME}.cfg | grep -oP "^dap_global_db_path=\K.*"`
-CONFFILES="${DAP_PREFIX}/etc/"
-
-
-case "$1" in
-    purge)
-    # Purge database
-    if [ -e /usr/share/debconf/confmodule ] ; then
-        . /usr/share/debconf/confmodule
-        db_purge
-    fi
-    # Remove user and group
-    echo "[*] Removing user cellframe-node"
-    userdel ${DAP_APP_NAME} > /dev/null || true
-    echo "[*] Removing group cellframe-node"
-    groupdel ${DAP_APP_NAME} > /dev/null || true
-
-    # Remove configuration file, logs and at least gdb path for now on purge
-    echo "[*] Removing configuration files for ${DAP_APP_NAME}"
-    rm -rf ${CONFFILES} || true
-    echo "[*] Removing log files for ${DAP_APP_NAME}"
-    rm -rf ${DAP_PREFIX}/var/log || true
-    echo "[*] Removing databases for ${DAP_APP_NAME}"
-    rm -rf ${GDB_PATH} || true
-    ;;
-
-    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-    ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-exit 0
\ No newline at end of file
diff --git a/packaging/deb/prerm b/packaging/deb/prerm
deleted file mode 100755
index b961ff4..0000000
--- a/packaging/deb/prerm
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash -e
-
-case "$1" in
-	remove|purge|abort-install|abort-upgrade)
-		echo "[*] Stopping cellframe-node.service"
-		systemctl stop cellframe-node || true
-		echo "[*] Disabling cellframe-node.service"
-		systemctl disable cellframe-node || true
-		;;
-
-	disappear)
-		;;
-
-	upgrade)
-		echo "[*] Stopping cellframe-node.service"
-        systemctl stop cellframe-node || true
-		;;
-
-	failed-upgrade)
-		echo "[*] Stopping cellframe-node.service"
-        systemctl stop cellframe-node || true
-        ;;
-
-	*)
-	    echo "prerm called with unknown argument \`$1'" >&2
-		exit 1;;
-esac
-
-exit 0
diff --git a/packaging/deb/rules b/packaging/deb/rules
deleted file mode 100755
index 8ebdadf..0000000
--- a/packaging/deb/rules
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/make -f
-
-override_dh_fixperms:
-    dh_fixperms -X/opt/cellframe-node
-    chmod 777 /opt/cellframe-node/bin/cellframe-node-cli
-override_dh_auto_install:
-    dh_auto_install -- prefix=/opt/cellframe-node
-%:
-#    dh $@  --with=systemd
-    dh $@
diff --git a/packaging/deb/templates b/packaging/deb/templates
deleted file mode 100755
index 53d7dd3..0000000
--- a/packaging/deb/templates
+++ /dev/null
@@ -1,133 +0,0 @@
-Template: cellframe-node/auto_online
-Default: false
-Choices: true, false
-Type: select
-Description: Auto online
- Bring up links automatically and go to ONLINE network state
-
-Template: cellframe-node/debug_mode
-Default: false
-Choices: true, false
-Type: select
-Description: Debug mode
- Debug mode for logs
-
-Template: cellframe-node/server_enabled
-Default: false
-Choices: true, false
-Type: select
-Description: Accept connections
- Accept connections 
-
-Template: cellframe-node/server_port
-Default: 8079
-Type: string
-Description: Server port
- Server port to listen on, recommended 8079 
-
-Template: cellframe-node/server_addr
-Default: 0.0.0.0
-Type: string
-Description: Server address
- Server address to listen on
-
-Template: cellframe-node/notify_srv_addr
-Default: 127.0.0.1
-Type: string
-Description: Notify server address
- Notify server address to listen on
-
-Template: cellframe-node/notify_srv_port
-Default: 8080
-Type: string
-Description: Notify server port
- Notify server port to listen on 
-
-Template: cellframe-node/subzero_enabled
-Default: true
-Choices: true, false
-Type: select
-Description: SubZero: Enable network
- Subzero Testnet: Enable network auto load on start
-
-Template: cellframe-node/subzero_node_type
-Type: select
-Default: full
-Choices: full, light, master, archive, root
-Description: SubZero: Node role
- Select node role:. 
- Light - Synchronize only local wallets 
- full - Sync all its cell
- master - Allow to store values in chains and take comission, sync all shards that will need to be synced
- archive - Sync all the network
- root - Special predefined root nodes, usually produces zerochain and acts like archive as well
-
-Template: cellframe-node/mileena_enabled
-Default: true
-Choices: true, false
-Type: select
-Description: Mileena: Enable network
- Mileena Testnet: Enable network auto load on start
-
-Template: cellframe-node/mileena_node_type
-Type: select
-Default: full
-Choices: full, light, master, archive, root
-Description: Mileena: Node role
- Select node role:. 
- Light - Synchronize only local wallets 
- full - Sync all its cell
- master - Allow to store values in chains and take comission, sync all shards that will need to be synced
- archive - Sync all the network
- root - Special predefined root nodes, usually produces zerochain and acts like archive as well
-
-Template: cellframe-node/kelvpn_minkowski_enabled
-Default: true
-Choices: true, false
-Type: select
-Description: Kelvpn Minkowski: Enable network
- Minkowski Testnet: Enable network auto load on start
-
-Template: cellframe-node/kelvpn_minkowski_node_type
-Type: select
-Default: full
-Choices: full, light, master, archive, root
-Description: Kelvpn Minkowski: Node role
- Select node role:. 
- Light - Synchronize only local wallets 
- full - Sync all its cell
- master - Allow to store values in chains and take comission, sync all shards that will need to be synced
- archive - Sync all the network
- root - Special predefined root nodes, usually produces zerochain and acts like archive as well 
-
-Template: cellframe-node/backbone_enabled
-Default: true
-Choices: true, false
-Type: select
-Description: Backbone: Enable network
- Backbone Mainnet: Enable network auto load on start
-
-Template: cellframe-node/backbone_node_type
-Type: select
-Default: full
-Choices: full, light, master, archive, root
-Description: Backbone: Node role
- Select node role:. 
- Light - Synchronize only local wallets 
- full - Sync all its cell
- master - Allow to store values in chains and take comission, sync all shards that will need to be synced
- archive - Sync all the network
- root - Special predefined root nodes, usually produces zerochain and acts like archive as well
-
-Template: cellframe-node/enable_python_plugins
-Default: false
-Choices: true, false
-Type: select
-Description: Python plugins: Enable Python plugins
- Python plugins: Enable Python plugins
-
-Template: cellframe-node/python_plugins_path
-Default: /opt/cellframe-node/var/lib/plugins
-Type: string
-Description: Python plugins path
- Path for Python plugins
\ No newline at end of file
diff --git a/packaging/osx.sh b/packaging/osx.sh
index 3ef622c..273ec09 100644
--- a/packaging/osx.sh
+++ b/packaging/osx.sh
@@ -67,7 +67,7 @@ PACK()
     #USED FOR PROCESSING OF PREPARED BUNDLE: BOM CREATION, ETC
     OSX_PKG_DIR=${DIST_DIR}/pkg
 
-	BRAND_OSX_BUNDLE_DIR=${PACKAGE_DIR}/${BRAND}.app
+	BRAND_OSX_BUNDLE_DIR=${DIST_DIR}/Applications/CellframeNode.app
 
     #prepare correct packaging structure
     mkdir -p ${PACKAGE_DIR}
@@ -77,7 +77,7 @@ PACK()
 
     #copy base application bundle
     #path to it in BRAND_OSX_BUNDLE_DIR
-    cp -r ${DIST_DIR}/Users/$(whoami)/Applications/Cellframe.app ${PACKAGE_DIR}/CellframeNode.app
+    #cp -r ${DIST_DIR}/Applications/CellframeNode.app ${PACKAGE_DIR}/CellframeNode.app
 
     #copy pkginstall
 	cp  ${HERE}/../../os/macos/PKGINSTALL/* ${PACKAGE_DIR}
@@ -87,8 +87,8 @@ PACK()
 	
 	#get version info
 	source "${HERE}/../../version.mk"
-    PACKAGE_NAME="cellframe-node_${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}_amd64.pkg"
-	PACKAGE_NAME_SIGNED="cellframe-node_${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}_amd64-signed.pkg"
+    PACKAGE_NAME="cellframe-node-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-amd64.pkg"
+	PACKAGE_NAME_SIGNED="cellframe-node-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-amd64-signed.pkg"
     echo "Building package [$PACKAGE_NAME]"
 
 	#prepare
@@ -98,7 +98,7 @@ PACK()
 	mkdir -p ${PAYLOAD_BUILD}
 	mkdir -p ${SCRIPTS_BUILD}
 
-	cp ${PACKAGE_DIR}/${BRAND}.plist ${PAYLOAD_BUILD}
+	#cp ${PACKAGE_DIR}/${BRAND}.plist ${PAYLOAD_BUILD}/
 	cp -r ${BRAND_OSX_BUNDLE_DIR} ${PAYLOAD_BUILD}
 
 	
diff --git a/packaging/windows.sh b/packaging/windows.sh
new file mode 100644
index 0000000..dd43ed2
--- /dev/null
+++ b/packaging/windows.sh
@@ -0,0 +1,24 @@
+#!/bin/bash -e
+
+set -e
+
+if [ ${0:0:1} = "/" ]; then
+	HERE=`dirname $0`
+else
+	CMD=`pwd`/$0
+	HERE=`dirname ${CMD}`
+fi
+
+
+PACK() 
+{
+    DIST_DIR=$1
+    BUILD_DIR=$2
+    OUT_DIR=$3
+    ARCH=$(dpkg --print-architecture)
+    source "${HERE}/../version.mk"
+    PACKAGE_NAME="cellframe-node-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-amd64.exe"
+    makensis -V4 -DAPP_VERSION=${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} ${DIST_DIR}/cellframe-node.nsis
+
+    cp $DIST_DIR/*.exe $OUT_DIR/
+}
diff --git a/targets/osx.sh b/targets/osx.sh
index 67f76e6..e351045 100644
--- a/targets/osx.sh
+++ b/targets/osx.sh
@@ -35,22 +35,15 @@ esac
 if [ "$MACHINE" != "Mac" ]
 then
   echo "Host is $MACHINE, use osx-cross build target"
-  if [ -z "$OSXCROSS_QT_ROOT" ]
+  if [ -z "$OSXCROSS_ROOT" ]
   then
-        echo "Please, export OSXCROSS_QT_ROOT variable, pointing to Qt-builds locations for osxcross environment"
+        echo "Please, export OSXCROSS_ROOT variable, pointing to Qt-builds locations for osxcross environment"
         exit 255
   fi
 
 
-  if [ -z "$OSXCROSS_QT_VERSION" ]
-  then
-        echo "Please, export OSXCROSS_QT_VERSION variable, scpecifying Qt-version in OSXCROSS_QT_ROOT directory."
-        exit 255
-  fi
-
-  echo "Using QT ${OSXCROSS_QT_VERSION} from ${OSXCROSS_QT_ROOT}/${OSXCROSS_QT_VERSION}"
-
-  [ ! -d ${OSXCROSS_QT_ROOT}/${OSXCROSS_QT_VERSION} ] && { echo "No QT ${OSXCROSS_QT_VERSION} found in ${OSXCROSS_QT_ROOT}" && exit 255; }
+  echo "Using  ${OSXCROSS_ROOT} osxcross "
+  [ ! -d ${OSXCROSS_ROOT} ] && { echo "No ${OSXCROSS_ROOT} found" && exit 255; }
 
   $(${OSXCROSS_ROOT}/bin/osxcross-conf)
 
-- 
GitLab