|
92 | 92 | # This points the headless->electron launcher to our Electron |
93 | 93 | export KUI_ELECTRON_HOME="${KUI_ELECTRON_HOME-$NODE}" |
94 | 94 |
|
95 | | -# Linux may not have the prereqs needed to run Electron |
96 | | -if [ ! -f ~/.codeflare ] && [ $(uname) = Linux ]; then |
97 | | - if [ $(grep '^ID_LIKE' /etc/os-release) = "ID_LIKE=debian" ]; then |
98 | | - if [ $(apt -qq list sudo curl libx11-6 libglib2.0-0 libx11-xcb1 libxcb-dri3-0 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxi6 libxtst6 libnss3 libatk1.0-0 libdrm2 libgbm1 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 | grep installed 2> /dev/null | wc -l) != 20 ]; then |
99 | | - # it's also possible we didn't see these in the list, because we have an out-of-date package list |
100 | | - # so apt update to refresh that, then recheck |
101 | | - apt update |
102 | | - if [ $(apt -qq list sudo curl libx11-6 libglib2.0-0 libx11-xcb1 libxcb-dri3-0 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxi6 libxtst6 libnss3 libatk1.0-0 libdrm2 libgbm1 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 | grep installed 2> /dev/null | wc -l) != 20 ]; then |
103 | | - # we really don't have them installed, so install them |
104 | | - apt install -y sudo curl libx11-6 libglib2.0-0 libx11-xcb1 libxcb-dri3-0 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxi6 libxtst6 libnss3 libatk1.0-0 libdrm2 libgbm1 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 |
105 | | - touch ~/.codeflare |
106 | | - else |
107 | | - touch ~/.codeflare |
108 | | - fi |
109 | | - else |
110 | | - touch ~/.codeflare |
111 | | - fi |
112 | | - else |
113 | | - touch ~/.codeflare |
114 | | - fi |
115 | | -fi |
116 | | - |
117 | 95 | if [ $# = 1 ] && [ "$1" = "-v" ] || [ "$1" = "--version" ]; then |
118 | 96 | shift |
119 | 97 | args=(version) |
@@ -147,11 +125,34 @@ if [ -n "$do_cli" ]; then |
147 | 125 | # using electron as the nodejs binary (this is what |
148 | 126 | # ELECTRON_RUN_AS_NODE does for us) |
149 | 127 | export ELECTRON_RUN_AS_NODE=true |
| 128 | + export MWSTORE="$GUIDEBOOK_STORE" |
150 | 129 | exec "$NODE" \ |
151 | 130 | --experimental-specifier-resolution=node --no-warnings --experimental-import-meta-resolve \ |
152 | 131 | "$HEADLESS"/../../node_modules/madwizard/bin/madwizard.js \ |
153 | 132 | $* |
154 | 133 | fi |
155 | 134 |
|
| 135 | +# Linux may not have the prereqs needed to run Electron |
| 136 | +if [ ! -f ~/.codeflare ] && [ $(uname) = Linux ]; then |
| 137 | + if [ $(grep '^ID_LIKE' /etc/os-release) = "ID_LIKE=debian" ]; then |
| 138 | + if [ $(apt -qq list sudo curl libx11-6 libglib2.0-0 libx11-xcb1 libxcb-dri3-0 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxi6 libxtst6 libnss3 libatk1.0-0 libdrm2 libgbm1 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 | grep installed 2> /dev/null | wc -l) != 20 ]; then |
| 139 | + # it's also possible we didn't see these in the list, because we have an out-of-date package list |
| 140 | + # so apt update to refresh that, then recheck |
| 141 | + apt update |
| 142 | + if [ $(apt -qq list sudo curl libx11-6 libglib2.0-0 libx11-xcb1 libxcb-dri3-0 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxi6 libxtst6 libnss3 libatk1.0-0 libdrm2 libgbm1 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 | grep installed 2> /dev/null | wc -l) != 20 ]; then |
| 143 | + # we really don't have them installed, so install them |
| 144 | + apt install -y sudo curl libx11-6 libglib2.0-0 libx11-xcb1 libxcb-dri3-0 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxi6 libxtst6 libnss3 libatk1.0-0 libdrm2 libgbm1 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 |
| 145 | + touch ~/.codeflare |
| 146 | + else |
| 147 | + touch ~/.codeflare |
| 148 | + fi |
| 149 | + else |
| 150 | + touch ~/.codeflare |
| 151 | + fi |
| 152 | + else |
| 153 | + touch ~/.codeflare |
| 154 | + fi |
| 155 | +fi |
| 156 | + |
156 | 157 | # otherwise, we launch the UI version |
157 | 158 | exec "$NODE" "$HEADLESS"/codeflare.min.js -- $args 3>&1 1>&2 2>&3 3>&- | grep -v WebSwapCGLLayer |
0 commit comments