@cryptotaxi247 / netdata-1 / commits / dcbcf7174

Address installer minor issues (Windows) (#19122)

* fix_msis2: remove unused file * fix_msis2: Create empty directories ignored by WIX * fix_msis2: Add nano as default editor * fix_msis2: Add missing reference

thiagoftsm committed Dec 4, 2024 at 11:10 UTC dcbcf71743d2fbc3d641b78ba234235b6699220b
3 files changed +41 -43
packaging/installer/package-windows.sh deleted
-43
@@ -1,43 +0,0 @@
1 -#!/bin/bash
2 -
3 -repo_root="$(dirname "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd -P)")")"
4 -
5 -if [ -n "${BUILD_DIR}" ]; then
6 - build="${BUILD_DIR}"
7 -elif [ -n "${OSTYPE}" ]; then
8 - if [ -n "${MSYSTEM}" ]; then
9 - build="${repo_root}/build-${OSTYPE}-${MSYSTEM}"
10 - else
11 - build="${repo_root}/build-${OSTYPE}"
12 - fi
13 -elif [ "$USER" = "vk" ]; then
14 - build="${repo_root}/build"
15 -else
16 - build="${repo_root}/build"
17 -fi
18 -
19 -set -exu -o pipefail
20 -
21 -${GITHUB_ACTIONS+echo "::group::Installing"}
22 -cmake --install "${build}"
23 -${GITHUB_ACTIONS+echo "::endgroup::"}
24 -
25 -if [ ! -f "/msys2-installer.exe" ]; then
26 - ${GITHUB_ACTIONS+echo "::group::Fetching MSYS2 installer"}
27 - "${repo_root}/packaging/windows/fetch-msys2-installer.py" /msys2-installer.exe
28 - ${GITHUB_ACTIONS+echo "::endgroup::"}
29 -fi
30 -
31 -${GITHUB_ACTIONS+echo "::group::Packaging"}
32 -NDVERSION=$"$(grep 'CMAKE_PROJECT_VERSION:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)"
33 -NDMAJORVERSION=$"$(grep 'CMAKE_PROJECT_VERSION_MAJOR:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)"
34 -NDMINORVERSION=$"$(grep 'CMAKE_PROJECT_VERSION_MINOR:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)"
35 -
36 -if [ -f "/gpl-3.0.txt" ]; then
37 - ${GITHUB_ACTIONS+echo "::group::Fetching GPL3 License"}
38 - curl -o /gpl-3.0.txt "https://www.gnu.org/licenses/gpl-3.0.txt"
39 - ${GITHUB_ACTIONS+echo "::endgroup::"}
40 -fi
41 -
42 -/mingw64/bin/makensis.exe -DCURRVERSION="${NDVERSION}" -DMAJORVERSION="${NDMAJORVERSION}" -DMINORVERSION="${NDMINORVERSION}" "${repo_root}/packaging/windows/installer.nsi"
43 -${GITHUB_ACTIONS+echo "::endgroup::"}
packaging/windows/netdata.wxs.in
+35
@@ -33,6 +33,11 @@
33 <Feature Id="Main">
34 <ComponentGroupRef Id="NetdataComponents" />
35 <ComponentRef Id="NetdataVarCache" />
36 + <ComponentRef Id="NetdataDevShm" />
37 + <ComponentRef Id="NetdataDevMqueue" />
38 + <ComponentRef Id="NetdataTmp" />
39 + <ComponentRef Id="NetdataHome" />
40 + <ComponentRef Id="NetdataRoot" />
41 <ComponentRef Id="NetdataVarLib" />
42 <ComponentGroupRef Id="WevtComponents" />
43 <ComponentRef Id="NetdataService" />
@@ -50,6 +55,16 @@
55 <Directory Id="ETCDIR" Name="etc">
56 <Directory Id="ETCDIRNETDATA" Name="netdata" />
57 </Directory>
58 + <Directory Id="DEVDIR" Name="dev">
59 + <Directory Id="DEVSHMDIR" Name="shm" />
60 + <Directory Id="DEVMQUEUEDIR" Name="mqueue" />
61 + </Directory>
62 + <Directory Id="TMPDIR" Name="tmp">
63 + </Directory>
64 + <Directory Id="HOMEDIR" Name="home">
65 + </Directory>
66 + <Directory Id="ROOTDIR" Name="root">
67 + </Directory>
68 </Directory>
69 </StandardDirectory>
70
@@ -90,6 +105,26 @@
105 <CreateFolder />
106 </Component>
107
108 + <Component Id="NetdataDevShm" Directory="DEVSHMDIR" Guid="cbe39d53-a5c8-4375-9b25-e24df4d411be">
109 + <CreateFolder />
110 + </Component>
111 +
112 + <Component Id="NetdataDevMqueue" Directory="DEVMQUEUEDIR" Guid="f119d45f-b4d4-4918-bf05-89ee88be951a">
113 + <CreateFolder />
114 + </Component>
115 +
116 + <Component Id="NetdataTmp" Directory="TMPDIR" Guid="19247d2f-0f9d-4891-a3b0-ffc208d8d878">
117 + <CreateFolder />
118 + </Component>
119 +
120 + <Component Id="NetdataHome" Directory="HOMEDIR" Guid="13056229-7734-45ac-a982-572fa99f8e72">
121 + <CreateFolder />
122 + </Component>
123 +
124 + <Component Id="NetdataRoot" Directory="ROOTDIR" Guid="5f0b7def-c4e6-417a-a5ae-b6f9c4aff14e">
125 + <CreateFolder />
126 + </Component>
127 +
128 <CustomAction Id="ClaimAgent" Directory="USRBINDIR" ExeCommand='[USRBINDIR]NetdataClaim.exe /T &quot;[TOKEN]&quot; /R &quot;[ROOMS]&quot; /U &quot;[URL]&quot; /I [INSECURE] /P &quot;[PROXY]&quot; /F &quot;[INSTALLFOLDER]etc\netdata\claim.conf&quot;' Execute="deferred" Return="ignore" Impersonate="no"/>
129 <InstallExecuteSequence>
130 <Custom Action="ClaimAgent" After="InstallFiles" />
packaging/windows/package-windows.sh
+6
@@ -42,3 +42,9 @@ tar -xf /msys2-latest.tar.zst -C /opt/netdata/ || exit 1
42 cp -R /opt/netdata/msys64/* /opt/netdata/ || exit 1
43 rm -rf /opt/netdata/msys64/
44 ${GITHUB_ACTIONS+echo "::endgroup::"}
45 +
46 +${GITHUB_ACTIONS+echo "::group::Configure Editor"}
47 +if [ -f /opt/netdata/etc/profile ]; then
48 + echo 'EDITOR="/usr/bin/nano.exe"' >> /opt/netdata/etc/profile
49 +fi
50 +${GITHUB_ACTIONS+echo "::endgroup::"}