Skip to content

Commit

Permalink
Release v3.1.59-20240731192333
Browse files Browse the repository at this point in the history
  • Loading branch information
esitarski committed Jul 31, 2024
2 parents 2a1f7e4 + 3025a30 commit c1afeb9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Binary file modified CrossMgrImpinj/CrossMgrImpinjImages/CrossMgrImpinj.ico
Binary file not shown.
Binary file modified SeriesMgr/SeriesMgrImages/SeriesMgr.ico
Binary file not shown.
Binary file modified SprintMgr/SprintMgrImages/SprintMgr.ico
Binary file not shown.
15 changes: 10 additions & 5 deletions crossmgr-install.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ def get_python_exe( env_dir ):
return python_exe

def env_setup( full=False ):
if full and os.path.isdir( env_dir ):
if full:
print( f"Removing existing python environment {os.path.abspath(os.path.join('.',env_dir))}... ", end='', flush=True )
try:
shutil.rmtree( env_dir, ignore_errors=True )
except Exception as e:
print( f"Failure: {e}... ", end='', flush=True )
print( 'Done.' )

if not os.path.isdir( env_dir ):
if full or not os.path.isdir( env_dir ):
print( f"Creating python environment in {os.path.abspath(os.path.join('.',env_dir))}... ", end='', flush=True )
subprocess.check_output( [sys.executable, '-m', 'venv', env_dir] ) # Call this with the script's python as we don't have an environment yet.
print( 'Done.' )
Expand Down Expand Up @@ -216,7 +216,7 @@ def env_setup( full=False ):
# Install wxPyhon from the extras url.
subprocess.check_output( [
python_exe, '-m',
'pip', 'install', '--upgrade', '-f', url, 'wxPython',
'pip', 'install', '--upgrade', '--quiet', '-f', url, 'wxPython',
], stderr=subprocess.DEVNULL ) # Hide stderr so we don't scare the user with DEPRECATED warnings.
else:
# If Windows or Mac, install mostly everything from regular pypi.
Expand All @@ -228,7 +228,7 @@ def env_setup( full=False ):
for line in f_in:
if 'pybabel' not in line: # Skip pybabel as we don't need it here. We use polib instead to convert the .po files to .mo.
f_out.write( line )
subprocess.check_output( [python_exe, '-m', 'pip', 'install', '--use-pep517', '--upgrade', '--quiet', '-r', 'requirements_os.txt'] )
subprocess.check_output( [python_exe, '-m', 'pip', 'install', '--use-pep517', '--upgrade', '-r', 'requirements_os.txt'] )

# Install polib and pyshortcuts for building the mo translation files and setting up the desktop shortcuts, respectively.
subprocess.check_output( [python_exe, '-m', 'pip', 'install', '--upgrade', '--quiet', 'polib', 'pyshortcuts'] )
Expand Down Expand Up @@ -346,11 +346,16 @@ def make_shortcuts( python_exe ):
python_launch_exe = python_exe

def get_ico_file( pyw_file ):
extension = {
'Windows': '.ico',
'Linux': '.png',
'Darwin': '.icns',
}
fname = os.path.basename( pyw_file )
basename = os.path.splitext( fname )[0]
dirname = os.path.dirname( pyw_file )
dirimages = os.path.join( dirname, basename + 'Images' )
return os.path.join( dirimages, basename + ('.ico' if is_windows else '.png') )
return os.path.join( dirimages, basename + extension.get(platform.system(), '.png') )

pyws = sorted( get_pyws(), reverse=True )

Expand Down

0 comments on commit c1afeb9

Please sign in to comment.