#NEWLINE# def get_nsis_exe( ) : #NEWLINE# #INDENT# 'Return NSIS executable' #NEWLINE# localdir = osp . join ( sys . prefix , os . pardir , os . pardir ) #NEWLINE# for drive in get_drives ( ) : #NEWLINE# #INDENT# for dirname in ( 'C:\\Program Files' , 'C:\\Program Files (x86)' , ( drive + 'PortableApps\\NSISPortableANSI' ) , ( drive + 'PortableApps\\NSISPortable' ) , osp . join ( localdir , 'NSISPortableANSI' ) , osp . join ( localdir , 'NSISPortable' ) ) : #NEWLINE# #INDENT# for subdirname in ( '.' , 'App' ) : #NEWLINE# #INDENT# exe = osp . join ( dirname , localdir , 'NSIS' , 'makensis.exe' ) #NEWLINE# include = osp . join ( dirname , subdirname , 'NSIS' , 'include' ) #NEWLINE# if osp . isfile ( exe ) : #NEWLINE# #INDENT# return exe #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# raise RuntimeError ( 'NSIS is not installed on this computer.' )