Skip to content

Commit 123632b

Browse files
author
stonebig
committed
move pyzo setup in the initialization place
so it's createed in build process
1 parent 1fd29f3 commit 123632b

File tree

1 file changed

+29
-8
lines changed

1 file changed

+29
-8
lines changed

make.py

+29-8
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,21 @@ def _create_batch_scripts_initial(self):
666666
echo Binaries = .>>"%tmp_pyz%"
667667
:pyqt4_conf_exist
668668
669+
rem ******************
670+
rem handle Pyzo configuration part
671+
rem ******************
672+
mkdir %HOME%\.pyzo
673+
if exist "%HOME%\.pyzo\config.ssdf" goto after_pyzo_conf
674+
set tmp_pyz="%HOME%\.pyzo\config.ssdf"
675+
echo shellConfigs2 = list:>>%tmp_pyz%
676+
echo dict:>>%tmp_pyz%
677+
echo name = 'Python'>>%tmp_pyz%
678+
echo exe = '.\\python.exe'>>%tmp_pyz%
679+
echo ipython = 'yes'>>%tmp_pyz%
680+
echo gui = 'none'>>%tmp_pyz%
681+
682+
:after_pyzo_conf
683+
669684
670685
rem ******************
671686
rem WinPython.ini part (removed from nsis)
@@ -788,6 +803,20 @@ def _create_batch_scripts_initial(self):
788803
}
789804
}
790805
806+
#####################
807+
### handle Pyzo configuration part
808+
#####################
809+
$env:tmp_pyz = "$env:HOME\.pyzo"
810+
if (-not (Test-Path "$env:tmp_pyz")) { md -Path "$env:tmp_pyz" }
811+
$env:tmp_pyz = "$env:HOME\.pyzo\config.ssdf"
812+
if (-not (Test-Path "$env:tmp_pyz")) {
813+
shellConfigs2 = list:| Add-Content -Path $env:tmp_pyz
814+
dict:| Add-Content -Path $env:tmp_pyz
815+
name = 'Python'| Add-Content -Path $env:tmp_pyz
816+
exe = '.\\python.exe'| Add-Content -Path $env:tmp_pyz
817+
ipython = 'yes'| Add-Content -Path $env:tmp_pyz
818+
gui = 'none'| Add-Content -Path $env:tmp_pyz
819+
}
791820
792821
#####################
793822
### WinPython.ini part (removed from nsis)
@@ -1192,14 +1221,6 @@ def _create_batch_scripts(self):
11921221

11931222
self.create_batch_script('winpyzo.bat',r"""@echo off
11941223
call "%~dp0env_for_icons.bat"
1195-
mkdir %HOME%\.pyzo
1196-
if exist "%HOME%\.pyzo\config.ssdf" goto after_create
1197-
set tmp_pyz="%HOME%\.pyzo\config.ssdf"
1198-
echo shellConfigs2 = list:>>%tmp_pyz%
1199-
echo dict:>>%tmp_pyz%
1200-
echo name = 'Python'>>%tmp_pyz%
1201-
echo exe = '.\\python.exe'>>%tmp_pyz%
1202-
:after_create
12031224
cd/D "%WINPYDIR%"
12041225
"%WINPYDIR%\scripts\pyzo.exe" %*
12051226
""")

0 commit comments

Comments
 (0)