Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e84d18e

Browse files
authored
Merge pull request #1435 from stonebig/master
post rc1fix
2 parents 22964b3 + 9bfb105 commit e84d18e

File tree

3 files changed

+52
-8
lines changed

3 files changed

+52
-8
lines changed

portable/launcher_basic.nsi

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/* WinPython launcher template script
2+
Copyright © 2012 Pierre Raybaut
3+
Licensed under the terms of the MIT License
4+
(see winpython/__init__.py for details)
5+
*/
6+
;================================================================
7+
; These lines are automatically filled when winpython/make.py creates launchers:
8+
!addincludedir ""
9+
!define COMMAND ""
10+
!define PARAMETERS ""
11+
!define WORKDIR ""
12+
Icon ""
13+
OutFile ""
14+
;================================================================
15+
# Standard NSIS plugins
16+
!include "WordFunc.nsh"
17+
!include "FileFunc.nsh"
18+
19+
SilentInstall silent
20+
AutoCloseWindow true
21+
ShowInstDetails nevershow
22+
RequestExecutionLevel user
23+
24+
Section ""
25+
Call Execute
26+
SectionEnd
27+
28+
Function Execute
29+
;Set working Directory ===========================
30+
StrCmp ${WORKDIR} "" 0 workdir
31+
System::Call "kernel32::GetCurrentDirectory(i ${NSIS_MAX_STRLEN}, t .r0)"
32+
SetOutPath $0
33+
Goto end_workdir
34+
workdir:
35+
SetOutPath "${WORKDIR}"
36+
end_workdir:
37+
;Get Command line parameters =====================
38+
${GetParameters} $R1
39+
StrCmp "${PARAMETERS}" "" end_param 0
40+
StrCpy $R1 "${PARAMETERS} $R1"
41+
end_param:
42+
;===== Execution =================================
43+
Exec '"${COMMAND}" $R1'
44+
FunctionEnd

winpython/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
OTHER DEALINGS IN THE SOFTWARE.
2929
"""
3030

31-
__version__ = '11.2.20241226'
31+
__version__ = '11.2.20241228'
3232
__license__ = __doc__
3333
__project_url__ = 'http://winpython.github.io/'

winpython/utils.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def exec_run_cmd(args, path=None):
268268
def get_r_version(path):
269269
"""Return version of the R installed in *path*"""
270270
return (
271-
exec_shell_cmd('dir ..\README.R*', path)
271+
exec_shell_cmd(r'dir ..\README.R*', path)
272272
.splitlines()[-3]
273273
.split("-")[-1]
274274
)
@@ -373,11 +373,11 @@ def patch_shebang_line(
373373
) # Python2.7
374374
else:
375375
shebang_line = re.compile(
376-
b"(#!.*pythonw?\.exe)\"?"
376+
rb"(#!.*pythonw?\.exe)\"?"
377377
) # Python3+
378378
if 'pypy3' in sys.executable:
379379
shebang_line = re.compile(
380-
b"(#!.*pypy3w?\.exe)\"?"
380+
rb"(#!.*pypy3w?\.exe)\"?"
381381
) # Pypy3+
382382

383383
target_dir = target_dir.encode('utf-8')
@@ -420,15 +420,15 @@ def patch_shebang_line_py(
420420
# WinPython doesn't break running executable files.
421421
return
422422
if to_movable:
423-
exec_path = '#!.\python.exe'
423+
exec_path = r'#!.\python.exe'
424424
if 'pypy3' in sys.executable: # PyPy !
425-
exec_path = '#!.\pypy3.exe'
425+
exec_path = r'#!.\pypy3.exe'
426426
else:
427427
exec_path = '#!' + sys.executable
428428
for line in fileinput.input(fname, inplace=True):
429-
if re.match('^#\!.*python\.exe$', line) is not None:
429+
if re.match(r'^#\!.*python\.exe$', line) is not None:
430430
print(exec_path)
431-
elif re.match('^#\!.*pypy3\.exe$', line) is not None:# PyPy !
431+
elif re.match(r'^#\!.*pypy3\.exe$', line) is not None:# PyPy !
432432
print(exec_path)
433433
else:
434434
print(line, end='')

0 commit comments

Comments
 (0)