File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @hydrooj/xcpc-tools" ,
3
- "version" : " 1.0.2 " ,
3
+ "version" : " 1.0.3 " ,
4
4
"description" : " A tools for XCPC contests" ,
5
5
"main" : " index.ts" ,
6
6
"repository" : " https://github.com/Hydro-dev/xcpc-tools" ,
Original file line number Diff line number Diff line change @@ -22,8 +22,10 @@ export function initWinPrinter() {
22
22
'./SumatraPDF.exe' ,
23
23
path . resolve ( __dirname , 'SumatraPDF.exe' ) ,
24
24
path . resolve ( process . cwd ( ) , 'SumatraPDF.exe' ) ,
25
- 'C:\\Program Files\\SumatraPDF\\SumatraPDF.exe' ,
26
- 'C:\\Program Files (x86)\\SumatraPDF\\SumatraPDF.exe' ,
25
+ path . resolve ( process . env . ProgramFiles , 'SumatraPDF\\SumatraPDF.exe' ) ,
26
+ path . resolve ( process . env [ 'ProgramFiles(x86)' ] , 'SumatraPDF\\SumatraPDF.exe' ) ,
27
+ path . resolve ( process . env . LOCALAPPDATA , 'SumatraPDF\\SumatraPDF.exe' ) ,
28
+ path . resolve ( process . env . APPDATA , 'SumatraPDF\\SumatraPDF.exe' ) ,
27
29
] ;
28
30
const sumatraPdfPath = execPath . find ( ( p ) => fs . existsSync ( p ) ) ;
29
31
if ( ! sumatraPdfPath ) {
You can’t perform that action at this time.
0 commit comments