Skip to content

Commit 1e10b04

Browse files
committed
Fix bug in NSIS installer script that includes non-installer files.
The NSIS "File /r" command treat the given directory name as a pattern and search recursively by default. To disable the behavior, add \*.* to the end of the path.\ as stated in the NSIS doc. Reference: https://nsis.sourceforge.io/Reference/File
1 parent 7093075 commit 1e10b04

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

installer/installer.nsi

+30-30
Original file line numberDiff line numberDiff line change
@@ -355,15 +355,15 @@ SectionGroup /e $(PYTHON_SECTION_GROUP) python_section_group
355355
SectionGroup /e $(PYTHON_CHT_SECTION_GROUP) python_cht_section_group
356356
Section $(CHEWING) chewing
357357
SectionIn 1 2
358-
SetOutPath "$INSTDIR\python\input_methods"
359-
File /r "..\python\input_methods\chewing"
358+
SetOutPath "$INSTDIR\python\input_methods\chewing"
359+
File /r "..\python\input_methods\chewing\*.*"
360360
StrCpy $INST_PYTHON "True"
361361
SectionEnd
362362

363363
Section $(CHECJ) checj
364364
SectionIn 2
365-
SetOutPath "$INSTDIR\python\input_methods"
366-
File /r "..\python\input_methods\checj"
365+
SetOutPath "$INSTDIR\python\input_methods\checj"
366+
File /r "..\python\input_methods\checj\*.*"
367367
StrCpy $INST_PYTHON "True"
368368
StrCpy $INST_CINBASE "True"
369369
SectionEnd
@@ -375,8 +375,8 @@ SectionGroup /e $(PYTHON_SECTION_GROUP) python_section_group
375375
nsDialogs::SelectFileDialog open "" "liu-uni.tab file|liu-uni.tab"
376376
Pop $LIU_UNI_TAB_FILE
377377
${If} ${FileExists} "$LIU_UNI_TAB_FILE"
378-
SetOutPath "$INSTDIR\python\input_methods"
379-
File /r "..\python\input_methods\cheliu"
378+
SetOutPath "$INSTDIR\python\input_methods\cheliu"
379+
File /r "..\python\input_methods\cheliu\*.*"
380380
SetOutPath "$INSTDIR\python\cinbase\cin"
381381
StrCpy $INST_PYTHON "True"
382382
StrCpy $INST_CINBASE "True"
@@ -388,65 +388,65 @@ SectionGroup /e $(PYTHON_SECTION_GROUP) python_section_group
388388

389389
Section $(CHEARRAY) chearray
390390
SectionIn 2
391-
SetOutPath "$INSTDIR\python\input_methods"
392-
File /r "..\python\input_methods\chearray"
391+
SetOutPath "$INSTDIR\python\input_methods\chearray"
392+
File /r "..\python\input_methods\chearray\*.*"
393393
StrCpy $INST_PYTHON "True"
394394
StrCpy $INST_CINBASE "True"
395395
SectionEnd
396396

397397
Section $(CHEDAYI) chedayi
398398
SectionIn 2
399-
SetOutPath "$INSTDIR\python\input_methods"
400-
File /r "..\python\input_methods\chedayi"
399+
SetOutPath "$INSTDIR\python\input_methods\chedayi"
400+
File /r "..\python\input_methods\chedayi\*.*"
401401
StrCpy $INST_PYTHON "True"
402402
StrCpy $INST_CINBASE "True"
403403
SectionEnd
404404

405405
Section $(CHEPINYIN) chepinyin
406406
SectionIn 2
407-
SetOutPath "$INSTDIR\python\input_methods"
408-
File /r "..\python\input_methods\chepinyin"
407+
SetOutPath "$INSTDIR\python\input_methods\chepinyin"
408+
File /r "..\python\input_methods\chepinyin\*.*"
409409
StrCpy $INST_PYTHON "True"
410410
StrCpy $INST_CINBASE "True"
411411
SectionEnd
412412

413413
Section $(CHESIMPLEX) chesimplex
414414
SectionIn 2
415-
SetOutPath "$INSTDIR\python\input_methods"
416-
File /r "..\python\input_methods\chesimplex"
415+
SetOutPath "$INSTDIR\python\input_methods\chesimplex"
416+
File /r "..\python\input_methods\chesimplex\*.*"
417417
StrCpy $INST_PYTHON "True"
418418
StrCpy $INST_CINBASE "True"
419419
SectionEnd
420420

421421
Section $(CHEPHONETIC) chephonetic
422422
SectionIn 2
423-
SetOutPath "$INSTDIR\python\input_methods"
424-
File /r "..\python\input_methods\chephonetic"
423+
SetOutPath "$INSTDIR\python\input_methods\chephonetic"
424+
File /r "..\python\input_methods\chephonetic\*.*"
425425
StrCpy $INST_PYTHON "True"
426426
StrCpy $INST_CINBASE "True"
427427
SectionEnd
428428

429429
Section $(CHEEZ) cheez
430430
SectionIn 2
431-
SetOutPath "$INSTDIR\python\input_methods"
432-
File /r "..\python\input_methods\cheez"
431+
SetOutPath "$INSTDIR\python\input_methods\cheez"
432+
File /r "..\python\input_methods\cheez\*.*"
433433
StrCpy $INST_PYTHON "True"
434434
StrCpy $INST_CINBASE "True"
435435
SectionEnd
436436

437437
Section $(CHEENG) cheeng
438438
${If} ${AtLeastWin8}
439439
SectionIn 2
440-
SetOutPath "$INSTDIR\python\input_methods"
441-
File /r "..\python\input_methods\cheeng"
440+
SetOutPath "$INSTDIR\python\input_methods\cheeng"
441+
File /r "..\python\input_methods\cheeng\*.*"
442442
StrCpy $INST_PYTHON "True"
443443
${EndIf}
444444
SectionEnd
445445

446446
Section $(BRAILLE_CHEWING) braille_chewing
447447
SectionIn 2
448-
SetOutPath "$INSTDIR\python\input_methods"
449-
File /r "..\python\input_methods\braille_chewing"
448+
SetOutPath "$INSTDIR\python\input_methods\braille_chewing"
449+
File /r "..\python\input_methods\braille_chewing\*.*"
450450
StrCpy $INST_PYTHON "True"
451451
SectionEnd
452452

@@ -455,8 +455,8 @@ SectionGroup /e $(PYTHON_SECTION_GROUP) python_section_group
455455
SectionGroup /e $(PYTHON_CHS_SECTION_GROUP) python_chs_section_group
456456
Section $(RIME) rime
457457
SectionIn 2
458-
SetOutPath "$INSTDIR\python\input_methods"
459-
File /r /x "brise" "..\python\input_methods\rime"
458+
SetOutPath "$INSTDIR\python\input_methods\rime"
459+
File /r /x "brise" "..\python\input_methods\rime\*.*"
460460
SetOutPath "$INSTDIR\python\input_methods\rime\data"
461461
File "..\python\input_methods\rime\brise\*.txt"
462462
File "..\python\input_methods\rime\brise\*.yaml"
@@ -474,8 +474,8 @@ SectionGroup /e $(NODE_SECTION_GROUP) node_section_group
474474
SectionGroup /e $(NODE_CHT_SECTION_GROUP) node_cht_section_group
475475
Section $(EMOJIME) emojime
476476
SectionIn 2
477-
SetOutPath "$INSTDIR\node\input_methods"
478-
File /r "..\node\input_methods\emojime"
477+
SetOutPath "$INSTDIR\node\input_methods\emojime"
478+
File /r "..\node\input_methods\emojime\*.*"
479479
StrCpy $INST_NODE "True"
480480
SectionEnd
481481
SectionGroupEnd
@@ -491,8 +491,8 @@ Section "" Register
491491
SectionIn 1 2
492492
; Install the python backend and input method modules along with an embedable version of python 3.
493493
${If} $INST_PYTHON == "True"
494-
SetOutPath "$INSTDIR"
495-
File /r /x "__pycache__" /x "input_methods" /x "cinbase" /x ".git" /x ".idea" "..\python"
494+
SetOutPath "$INSTDIR\python"
495+
File /r /x "__pycache__" /x "input_methods" /x "cinbase" /x ".git" /x ".idea" "..\python\*.*"
496496
SetOutPath "$INSTDIR\python\input_methods"
497497
File "..\python\input_methods\__init__.py"
498498
${EndIf}
@@ -511,8 +511,8 @@ Section "" Register
511511

512512
; Install the node.js backend and input method modules along with an embedable version of node v6.
513513
${If} $INST_NODE == "True"
514-
SetOutPath "$INSTDIR"
515-
File /r /x "input_methods" "..\node"
514+
SetOutPath "$INSTDIR\node"
515+
File /r /x "input_methods" "..\node\*.*"
516516
${EndIf}
517517

518518
; Install the text service dlls

0 commit comments

Comments
 (0)