Skip to content

Commit

Permalink
always Building portable version
Browse files Browse the repository at this point in the history
  • Loading branch information
boussaffawalid committed Dec 16, 2016
1 parent c6cb758 commit 123ca6b
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions windows/setup_py2exe.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
logger.info('ROOT_DIR ' + ROOT_DIR)
sys.path.append( ROOT_DIR )

logger.info('getenv(PATH) ' + str(os.getenv('PATH')))



GTK_DIR = 'C:\\Python27\\Lib\\site-packages\\gtk-2.0\\runtime'
NSIS_EXE = 'C:\\Program Files (x86)\\NSIS\\makensis.exe'
Expand Down Expand Up @@ -240,20 +243,20 @@ def run_cmd(cmd):
logger.info( 'Size after 7zip recompression ' + str( file_size ) + ' Mb')
shutil.rmtree( 'dist\\library', ignore_errors=True )
assert_exist( 'dist\\library.zip')
else:
logger.warning( 'Skip Recompressing library.zip with 7-Zip' )

logger.info('Building portable')
if os.path.exists( 'BleachBit-portable' ):
shutil.rmtree( 'BleachBit-portable', ignore_errors=True )

shutil.copytree('dist', 'BleachBit-portable')
with open("BleachBit-Portable\\BleachBit.ini", "w") as text_file:
text_file.write( "[Portable]" )
logger.info('Building portable')
if os.path.exists( 'BleachBit-portable' ):
shutil.rmtree( 'BleachBit-portable', ignore_errors=True )

cmd = SZ_EXE + ' a -mx=9 BleachBit-{0}-portable.zip BleachBit-portable'.format(BB_VER)
run_cmd(cmd)
else:
logger.warning( 'Skip Recompressing library.zip with 7-Zip' )
logger.warning( 'Skip Building portable' )
shutil.copytree('dist', 'BleachBit-portable')
with open("BleachBit-Portable\\BleachBit.ini", "w") as text_file:
text_file.write( "[Portable]" )

cmd = SZ_EXE + ' a -mx=9 BleachBit-{0}-portable.zip BleachBit-portable'.format(BB_VER)
run_cmd(cmd)


# NSIS
Expand Down

0 comments on commit 123ca6b

Please sign in to comment.