@@ -21,7 +21,7 @@ const isLite = process.env.ASCOPE_DISTRIBUTION === "LITE";
2121const licenseHeader =
2222 "// Copyright (c) 2021-2026 Littleton Robotics\n// http://github.com/Mechanical-Advantage\n//\n// Use of this source code is governed by a BSD\n// license that can be found in the LICENSE file\n// at the resources directory of this application.\n" ;
2323
24- function bundle ( input , output , isMain , isXRClient , external = [ ] ) {
24+ function bundle ( input , output , isMain , isXRClient , external = [ ] , intro = "" ) {
2525 const packageJson = JSON . parse (
2626 fs . readFileSync ( "package.json" , {
2727 encoding : "utf-8"
@@ -32,7 +32,8 @@ function bundle(input, output, isMain, isXRClient, external = []) {
3232 output : {
3333 file : ( isLite ? "lite/static/" : "" ) + "bundles/" + output ,
3434 format : isMain ? "cjs" : "es" ,
35- banner : licenseHeader
35+ banner : licenseHeader ,
36+ intro : intro
3637 } ,
3738 context : "this" ,
3839 external : external ,
@@ -111,23 +112,34 @@ function bundle(input, output, isMain, isXRClient, external = []) {
111112const mainBundles = isLite
112113 ? [ bundle ( "main/lite/main.ts" , "main.js" , false , false ) ]
113114 : [
114- bundle ( "main/electron/main.ts" , "main.js" , true , false , [
115- "electron" ,
116- "electron-fetch" ,
117- "fs" ,
118- "jsonfile" ,
119- "net" ,
120- "os" ,
121- "ws" ,
122- "http" ,
123- "path" ,
124- "basic-ftp" ,
125- "download" ,
126- "youtube-dl-exec" ,
127- "tesseract.js" ,
128- "lzma-native" ,
129- "@rev-robotics/revlog-converter"
130- ] ) ,
115+ bundle (
116+ "main/electron/main.ts" ,
117+ "main.js" ,
118+ true ,
119+ false ,
120+ [
121+ "electron" ,
122+ "electron-fetch" ,
123+ "fs" ,
124+ "jsonfile" ,
125+ "net" ,
126+ "os" ,
127+ "ws" ,
128+ "http" ,
129+ "path" ,
130+ "basic-ftp" ,
131+ "download" ,
132+ "youtube-dl-exec" ,
133+ "tesseract.js" ,
134+ "lzma-native" ,
135+ "@rev-robotics/revlog-converter"
136+ ] ,
137+ `
138+ if (process.platform === "linux") {
139+ process.env.XDG_SESSION_TYPE = "x11";
140+ }
141+ `
142+ ) ,
131143 bundle ( "preload.ts" , "preload.js" , true , false , [ "electron" ] )
132144 ] ;
133145const largeRendererBundles = [
0 commit comments