diff --git a/packaging/installer/package-windows.sh b/packaging/installer/package-windows.sh deleted file mode 100755 index 7b1c57e461..0000000000 --- a/packaging/installer/package-windows.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -repo_root="$(dirname "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd -P)")")" - -if [ -n "${BUILD_DIR}" ]; then - build="${BUILD_DIR}" -elif [ -n "${OSTYPE}" ]; then - if [ -n "${MSYSTEM}" ]; then - build="${repo_root}/build-${OSTYPE}-${MSYSTEM}" - else - build="${repo_root}/build-${OSTYPE}" - fi -elif [ "$USER" = "vk" ]; then - build="${repo_root}/build" -else - build="${repo_root}/build" -fi - -set -exu -o pipefail - -${GITHUB_ACTIONS+echo "::group::Installing"} -cmake --install "${build}" -${GITHUB_ACTIONS+echo "::endgroup::"} - -if [ ! -f "/msys2-installer.exe" ]; then - ${GITHUB_ACTIONS+echo "::group::Fetching MSYS2 installer"} - "${repo_root}/packaging/windows/fetch-msys2-installer.py" /msys2-installer.exe - ${GITHUB_ACTIONS+echo "::endgroup::"} -fi - -${GITHUB_ACTIONS+echo "::group::Packaging"} -NDVERSION=$"$(grep 'CMAKE_PROJECT_VERSION:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)" -NDMAJORVERSION=$"$(grep 'CMAKE_PROJECT_VERSION_MAJOR:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)" -NDMINORVERSION=$"$(grep 'CMAKE_PROJECT_VERSION_MINOR:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)" - -if [ -f "/gpl-3.0.txt" ]; then - ${GITHUB_ACTIONS+echo "::group::Fetching GPL3 License"} - curl -o /gpl-3.0.txt "https://www.gnu.org/licenses/gpl-3.0.txt" - ${GITHUB_ACTIONS+echo "::endgroup::"} -fi - -/mingw64/bin/makensis.exe -DCURRVERSION="${NDVERSION}" -DMAJORVERSION="${NDMAJORVERSION}" -DMINORVERSION="${NDMINORVERSION}" "${repo_root}/packaging/windows/installer.nsi" -${GITHUB_ACTIONS+echo "::endgroup::"} diff --git a/packaging/windows/netdata.wxs.in b/packaging/windows/netdata.wxs.in index 59369ac86c..a63fd197a0 100644 --- a/packaging/windows/netdata.wxs.in +++ b/packaging/windows/netdata.wxs.in @@ -33,6 +33,11 @@ <Feature Id="Main"> <ComponentGroupRef Id="NetdataComponents" /> <ComponentRef Id="NetdataVarCache" /> + <ComponentRef Id="NetdataDevShm" /> + <ComponentRef Id="NetdataDevMqueue" /> + <ComponentRef Id="NetdataTmp" /> + <ComponentRef Id="NetdataHome" /> + <ComponentRef Id="NetdataRoot" /> <ComponentRef Id="NetdataVarLib" /> <ComponentGroupRef Id="WevtComponents" /> <ComponentRef Id="NetdataService" /> @@ -50,6 +55,16 @@ <Directory Id="ETCDIR" Name="etc"> <Directory Id="ETCDIRNETDATA" Name="netdata" /> </Directory> + <Directory Id="DEVDIR" Name="dev"> + <Directory Id="DEVSHMDIR" Name="shm" /> + <Directory Id="DEVMQUEUEDIR" Name="mqueue" /> + </Directory> + <Directory Id="TMPDIR" Name="tmp"> + </Directory> + <Directory Id="HOMEDIR" Name="home"> + </Directory> + <Directory Id="ROOTDIR" Name="root"> + </Directory> </Directory> </StandardDirectory> @@ -90,6 +105,26 @@ <CreateFolder /> </Component> + <Component Id="NetdataDevShm" Directory="DEVSHMDIR" Guid="cbe39d53-a5c8-4375-9b25-e24df4d411be"> + <CreateFolder /> + </Component> + + <Component Id="NetdataDevMqueue" Directory="DEVMQUEUEDIR" Guid="f119d45f-b4d4-4918-bf05-89ee88be951a"> + <CreateFolder /> + </Component> + + <Component Id="NetdataTmp" Directory="TMPDIR" Guid="19247d2f-0f9d-4891-a3b0-ffc208d8d878"> + <CreateFolder /> + </Component> + + <Component Id="NetdataHome" Directory="HOMEDIR" Guid="13056229-7734-45ac-a982-572fa99f8e72"> + <CreateFolder /> + </Component> + + <Component Id="NetdataRoot" Directory="ROOTDIR" Guid="5f0b7def-c4e6-417a-a5ae-b6f9c4aff14e"> + <CreateFolder /> + </Component> + <CustomAction Id="ClaimAgent" Directory="USRBINDIR" ExeCommand='[USRBINDIR]NetdataClaim.exe /T "[TOKEN]" /R "[ROOMS]" /U "[URL]" /I [INSECURE] /P "[PROXY]" /F "[INSTALLFOLDER]etc\netdata\claim.conf"' Execute="deferred" Return="ignore" Impersonate="no"/> <InstallExecuteSequence> <Custom Action="ClaimAgent" After="InstallFiles" /> diff --git a/packaging/windows/package-windows.sh b/packaging/windows/package-windows.sh index 997bb7d4fe..d3096c7deb 100755 --- a/packaging/windows/package-windows.sh +++ b/packaging/windows/package-windows.sh @@ -42,3 +42,9 @@ tar -xf /msys2-latest.tar.zst -C /opt/netdata/ || exit 1 cp -R /opt/netdata/msys64/* /opt/netdata/ || exit 1 rm -rf /opt/netdata/msys64/ ${GITHUB_ACTIONS+echo "::endgroup::"} + +${GITHUB_ACTIONS+echo "::group::Configure Editor"} +if [ -f /opt/netdata/etc/profile ]; then + echo 'EDITOR="/usr/bin/nano.exe"' >> /opt/netdata/etc/profile +fi +${GITHUB_ACTIONS+echo "::endgroup::"}