소스 검색

Fix shortcut target path when using script

In script mode, previously the shortcut would use the entire path
provided in the config file rather than the filename of the script,
resulting in a broken path and useless shortcut.
Luke Evans 1 년 전
부모
커밋
806a4017eb
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      nsist/__init__.py

+ 2 - 1
nsist/__init__.py

@@ -316,8 +316,9 @@ if __name__ == '__main__':
 
                 target = '$INSTDIR\\Python\\python{}.exe'
                 sc['target'] = target.format('' if sc['console'] else 'w')
+                sc['script'] = os.path.basename(sc['script'])
                 sc['parameters'] = '"%s"' % ntpath.join('$INSTDIR', sc['script'])
-                files.add(os.path.basename(sc['script']))
+                files.add(sc['script'])
 
             shutil.copy2(sc['icon'], self.build_dir)
             sc['icon'] = os.path.basename(sc['icon'])