#NEWLINE# def create_launcher( self , name , icon , command = None , args = None , workdir = '$EXEDIR\\scripts' , launcher = 'launcher_basic.nsi' ) : #NEWLINE# #INDENT# 'Create exe launcher with NSIS' #NEWLINE# assert name . endswith ( '.exe' ) #NEWLINE# portable_dir = osp . join ( osp . dirname ( osp . abspath ( __file__ ) ) , 'portable' ) #NEWLINE# icon_fname = osp . join ( portable_dir , 'icons' , icon ) #NEWLINE# assert osp . isfile ( icon_fname ) #NEWLINE# if ( command is None ) : #NEWLINE# #INDENT# if ( ( args is not None ) and ( '.pyw' in args ) ) : #NEWLINE# #INDENT# command = '${WINPYDIR}\\pythonw.exe' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# command = '${WINPYDIR}\\python.exe' #NEWLINE# #UNINDENT# #UNINDENT# if ( args is None ) : #NEWLINE# #INDENT# args = '' #NEWLINE# #UNINDENT# if ( workdir is None ) : #NEWLINE# #INDENT# workdir = '' #NEWLINE# #UNINDENT# fname = osp . join ( self . winpydir , ( osp . splitext ( name ) [ 0 ] + '.nsi' ) ) #NEWLINE# data = [ ( 'WINPYDIR' , ( '$EXEDIR\\%s' % self . python_name ) ) , ( 'WINPYVER' , self . winpyver ) , ( 'COMMAND' , command ) , ( 'PARAMETERS' , args ) , ( 'WORKDIR' , fname ) , ( 'Icon' , icon_fname ) , ( 'OutFile' , name ) ] #NEWLINE# build_nsis ( launcher , fname , data )