Changed the extension of the generated script files for Windows from '.bat' to '.cmd'.

Mon, 10 Sep 2018 18:15:10 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 10 Sep 2018 18:15:10 +0200
changeset 6495
6e73d31af3af
parent 6494
72e3d61e5a20
child 6496
191c2289593e

Changed the extension of the generated script files for Windows from '.bat' to '.cmd'.

APIs/Python3/eric6.api file | annotate | diff | comparison | revisions
Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Help/source.qhp file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Cooperation.Connection.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.Utilities.__init__.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.install.html file | annotate | diff | comparison | revisions
Documentation/Source/eric6.uninstall.html file | annotate | diff | comparison | revisions
Plugins/PluginEricapi.py file | annotate | diff | comparison | revisions
Plugins/PluginEricdoc.py file | annotate | diff | comparison | revisions
Utilities/__init__.py file | annotate | diff | comparison | revisions
VirtualEnv/VirtualenvExecDialog.py file | annotate | diff | comparison | revisions
changelog file | annotate | diff | comparison | revisions
install.py file | annotate | diff | comparison | revisions
uninstall.py file | annotate | diff | comparison | revisions
--- a/APIs/Python3/eric6.api	Sun Sep 09 19:30:54 2018 +0200
+++ b/APIs/Python3/eric6.api	Mon Sep 10 18:15:10 2018 +0200
@@ -59,6 +59,7 @@
 eric6.Cooperation.Connection.PingInterval?7
 eric6.Cooperation.Connection.PongTimeout?7
 eric6.Cooperation.Connection.SeparatorToken?7
+eric6.Cooperation.Connection.SeparatorToken_b?7
 eric6.Cooperation.Connection.TransferTimeout?7
 eric6.Cooperation.CooperationClient.CooperationClient.banKickUser?4(nick)
 eric6.Cooperation.CooperationClient.CooperationClient.banUser?4(nick)
@@ -12701,7 +12702,7 @@
 eric6.install.shutilCopy?4(src, dst, perm=0o644)
 eric6.install.sourceDir?7
 eric6.install.usage?4(rcode=2)
-eric6.install.wrapperName?4(dname, wfile)
+eric6.install.wrapperNames?4(dname, wfile)
 eric6.patch_modpython.initGlobals?4()
 eric6.patch_modpython.main?4(argv)
 eric6.patch_modpython.modDir?7
@@ -12736,4 +12737,4 @@
 eric6.uninstall.settingsNameOrganization?7
 eric6.uninstall.uninstallEric?4()
 eric6.uninstall.usage?4(rcode=2)
-eric6.uninstall.wrapperName?4(dname, wfile)
+eric6.uninstall.wrapperNames?4(dname, wfile)
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Help/source.qhp	Sun Sep 09 19:30:54 2018 +0200
+++ b/Documentation/Help/source.qhp	Mon Sep 10 18:15:10 2018 +0200
@@ -19354,8 +19354,8 @@
       <keyword name="worker" id="worker" ref="eric6.Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheck.html#worker" />
       <keyword name="worker" id="worker" ref="eric6.Plugins.CheckerPlugins.SyntaxChecker.jsCheckSyntax.html#worker" />
       <keyword name="worker" id="worker" ref="eric6.Plugins.CheckerPlugins.Tabnanny.Tabnanny.html#worker" />
-      <keyword name="wrapperName" id="wrapperName" ref="eric6.install.html#wrapperName" />
-      <keyword name="wrapperName" id="wrapperName" ref="eric6.uninstall.html#wrapperName" />
+      <keyword name="wrapperNames" id="wrapperNames" ref="eric6.install.html#wrapperNames" />
+      <keyword name="wrapperNames" id="wrapperNames" ref="eric6.uninstall.html#wrapperNames" />
       <keyword name="writeEncodedFile" id="writeEncodedFile" ref="eric6.Utilities.__init__.html#writeEncodedFile" />
       <keyword name="writePlist" id="writePlist" ref="eric6.Utilities.binplistlib.html#writePlist" />
       <keyword name="writePlistToBytes" id="writePlistToBytes" ref="eric6.Utilities.binplistlib.html#writePlistToBytes" />
--- a/Documentation/Source/eric6.Cooperation.Connection.html	Sun Sep 09 19:30:54 2018 +0200
+++ b/Documentation/Source/eric6.Cooperation.Connection.html	Mon Sep 10 18:15:10 2018 +0200
@@ -25,7 +25,7 @@
 </p>
 <h3>Global Attributes</h3>
 <table>
-<tr><td>MaxBufferSize</td></tr><tr><td>PingInterval</td></tr><tr><td>PongTimeout</td></tr><tr><td>SeparatorToken</td></tr><tr><td>TransferTimeout</td></tr>
+<tr><td>MaxBufferSize</td></tr><tr><td>PingInterval</td></tr><tr><td>PongTimeout</td></tr><tr><td>SeparatorToken</td></tr><tr><td>SeparatorToken_b</td></tr><tr><td>TransferTimeout</td></tr>
 </table>
 <h3>Classes</h3>
 <table>
--- a/Documentation/Source/eric6.Utilities.__init__.html	Sun Sep 09 19:30:54 2018 +0200
+++ b/Documentation/Source/eric6.Utilities.__init__.html	Mon Sep 10 18:15:10 2018 +0200
@@ -1156,9 +1156,9 @@
     Function to build the full path of an executable file from the environment
     on Windows platforms.
 </p><p>
-    First an executable with the extension .exe is searched for, thereafter one
-    with the extension .bat and finally the given file name as is. The first
-    match is returned.
+    First an executable with the extension .exe is searched for, thereafter
+    such with the extensions .cmd or .bat and finally the given file name as
+    is. The first match is returned.
 </p><dl>
 <dt><i>file</i></dt>
 <dd>
--- a/Documentation/Source/eric6.install.html	Sun Sep 09 19:30:54 2018 +0200
+++ b/Documentation/Source/eric6.install.html	Mon Sep 10 18:15:10 2018 +0200
@@ -103,8 +103,8 @@
 <td><a href="#usage">usage</a></td>
 <td>Display a usage message and exit.</td>
 </tr><tr>
-<td><a href="#wrapperName">wrapperName</a></td>
-<td>Create the platform specific name for the wrapper script.</td>
+<td><a href="#wrapperNames">wrapperNames</a></td>
+<td>Create the platform specific names for the wrapper script.</td>
 </tr>
 </table>
 <hr /><hr />
@@ -440,11 +440,11 @@
 </dl>
 <div align="right"><a href="#top">Up</a></div>
 <hr /><hr />
-<a NAME="wrapperName" ID="wrapperName"></a>
-<h2>wrapperName</h2>
-<b>wrapperName</b>(<i>dname, wfile</i>)
+<a NAME="wrapperNames" ID="wrapperNames"></a>
+<h2>wrapperNames</h2>
+<b>wrapperNames</b>(<i>dname, wfile</i>)
 <p>
-    Create the platform specific name for the wrapper script.
+    Create the platform specific names for the wrapper script.
 </p><dl>
 <dt><i>dname</i></dt>
 <dd>
@@ -456,7 +456,7 @@
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-the name of the wrapper script
+the names of the wrapper scripts
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
--- a/Documentation/Source/eric6.uninstall.html	Sun Sep 09 19:30:54 2018 +0200
+++ b/Documentation/Source/eric6.uninstall.html	Mon Sep 10 18:15:10 2018 +0200
@@ -61,8 +61,8 @@
 <td><a href="#usage">usage</a></td>
 <td>Display a usage message and exit.</td>
 </tr><tr>
-<td><a href="#wrapperName">wrapperName</a></td>
-<td>Create the platform specific name for the wrapper script.</td>
+<td><a href="#wrapperNames">wrapperNames</a></td>
+<td>Create the platform specific names for the wrapper script.</td>
 </tr>
 </table>
 <hr /><hr />
@@ -158,11 +158,11 @@
 </dl>
 <div align="right"><a href="#top">Up</a></div>
 <hr /><hr />
-<a NAME="wrapperName" ID="wrapperName"></a>
-<h2>wrapperName</h2>
-<b>wrapperName</b>(<i>dname, wfile</i>)
+<a NAME="wrapperNames" ID="wrapperNames"></a>
+<h2>wrapperNames</h2>
+<b>wrapperNames</b>(<i>dname, wfile</i>)
 <p>
-    Create the platform specific name for the wrapper script.
+    Create the platform specific names for the wrapper script.
 </p><dl>
 <dt><i>dname</i></dt>
 <dd>
@@ -174,7 +174,7 @@
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-the name of the wrapper script
+the names of the wrapper scripts
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
--- a/Plugins/PluginEricapi.py	Sun Sep 09 19:30:54 2018 +0200
+++ b/Plugins/PluginEricapi.py	Mon Sep 10 18:15:10 2018 +0200
@@ -51,7 +51,9 @@
     """
     exe = 'eric6_api'
     if Utilities.isWindowsPlatform():
-        exe = os.path.join(getConfig("bindir"), exe + '.bat')
+        exe = os.path.join(getConfig("bindir"), exe + '.cmd')
+        if not os.path.exists(exe):
+            exe = os.path.join(getConfig("bindir"), exe + '.bat')
     else:
         exe = os.path.join(getConfig("bindir"), exe)
     
--- a/Plugins/PluginEricdoc.py	Sun Sep 09 19:30:54 2018 +0200
+++ b/Plugins/PluginEricdoc.py	Mon Sep 10 18:15:10 2018 +0200
@@ -54,7 +54,9 @@
     # 1. eric6_doc
     exe = 'eric6_doc'
     if Utilities.isWindowsPlatform():
-        exe = os.path.join(getConfig("bindir"), exe + '.bat')
+        exe = os.path.join(getConfig("bindir"), exe + '.cmd')
+        if not os.path.exists(exe):
+            exe = os.path.join(getConfig("bindir"), exe + '.bat')
     else:
         exe = os.path.join(getConfig("bindir"), exe)
     dataList.append({
--- a/Utilities/__init__.py	Sun Sep 09 19:30:54 2018 +0200
+++ b/Utilities/__init__.py	Mon Sep 10 18:15:10 2018 +0200
@@ -1014,9 +1014,9 @@
     Function to build the full path of an executable file from the environment
     on Windows platforms.
     
-    First an executable with the extension .exe is searched for, thereafter one
-    with the extension .bat and finally the given file name as is. The first
-    match is returned.
+    First an executable with the extension .exe is searched for, thereafter
+    such with the extensions .cmd or .bat and finally the given file name as
+    is. The first match is returned.
     
     @param file filename of the executable to check (string)
     @return full executable name, if the executable file is accessible
@@ -1029,7 +1029,7 @@
         else:
             return ""
     
-    filenames = [file + ".exe", file + ".bat", file]
+    filenames = [file + ".exe", file + ".cmd", file + ".bat", file]
     
     for filename in filenames:
         cur_path = os.path.join(os.curdir, filename)
--- a/VirtualEnv/VirtualenvExecDialog.py	Sun Sep 09 19:30:54 2018 +0200
+++ b/VirtualEnv/VirtualenvExecDialog.py	Mon Sep 10 18:15:10 2018 +0200
@@ -302,7 +302,7 @@
         else:
             basename = "create_virtualenv"
         if isWindowsPlatform():
-            script = os.path.join(self.__targetDir, basename + ".bat")
+            script = os.path.join(self.__targetDir, basename + ".cmd")
             txt = self.__cmd
         else:
             script = os.path.join(self.__targetDir, basename + ".sh")
--- a/changelog	Sun Sep 09 19:30:54 2018 +0200
+++ b/changelog	Mon Sep 10 18:15:10 2018 +0200
@@ -2,6 +2,9 @@
 ----------
 Version 18.10:
 - bug fixes
+- General
+  -- changed the extension of the generated script files for Windows from
+     '.bat' to '.cmd'
 - Tasks
   -- added code to mark a line as not containing a task with '__NO-TASK__'
 
--- a/install.py	Sun Sep 09 19:30:54 2018 +0200
+++ b/install.py	Mon Sep 10 18:15:10 2018 +0200
@@ -373,20 +373,21 @@
     os.chmod(dst, 0o644)
 
 
-def wrapperName(dname, wfile):
+def wrapperNames(dname, wfile):
     """
-    Create the platform specific name for the wrapper script.
+    Create the platform specific names for the wrapper script.
     
     @param dname name of the directory to place the wrapper into
     @param wfile basename (without extension) of the wrapper script
-    @return the name of the wrapper script
+    @return the names of the wrapper scripts
     """
     if sys.platform.startswith("win"):
-        wname = dname + "\\" + wfile + ".bat"
+        wnames = (dname + "\\" + wfile + ".cmd",
+                  dname + "\\" + wfile + ".bat")
     else:
-        wname = dname + "/" + wfile
+        wnames = (dname + "/" + wfile, )
 
-    return wname
+    return wnames
 
 
 def createPyWrapper(pydir, wfile, isGuiScript=True):
@@ -414,7 +415,7 @@
     
     # all kinds of Windows systems
     if sys.platform.startswith("win"):
-        wname = wfile + marker + ".bat"
+        wname = wfile + marker + ".cmd"
         if isGuiScript:
             wrapper = \
                 '''@echo off\n''' \
@@ -645,9 +646,9 @@
             dirs.append(platBinDirOld)
         for rem_wname in rem_wnames:
             for d in dirs:
-                rwname = wrapperName(d, rem_wname)
-                if os.path.exists(rwname):
-                    os.remove(rwname)
+                for rwname in wrapperNames(d, rem_wname):
+                    if os.path.exists(rwname):
+                        os.remove(rwname)
         
         # Cleanup our config file(s)
         for name in ['eric6config.py', 'eric6config.pyc', 'eric6.pth']:
--- a/uninstall.py	Sun Sep 09 19:30:54 2018 +0200
+++ b/uninstall.py	Mon Sep 10 18:15:10 2018 +0200
@@ -102,20 +102,21 @@
     pyModDir = distutils.sysconfig.get_python_lib(True)
 
 
-def wrapperName(dname, wfile):
+def wrapperNames(dname, wfile):
     """
-    Create the platform specific name for the wrapper script.
+    Create the platform specific names for the wrapper script.
     
     @param dname name of the directory to place the wrapper into
     @param wfile basename (without extension) of the wrapper script
-    @return the name of the wrapper script
+    @return the names of the wrapper scripts
     """
     if sys.platform.startswith("win"):
-        wname = dname + "\\" + wfile + ".bat"
+        wnames = (dname + "\\" + wfile + ".cmd",
+                  dname + "\\" + wfile + ".bat")
     else:
-        wname = dname + "/" + wfile
+        wnames = (dname + "/" + wfile, )
 
-    return wname
+    return wnames
 
 
 def uninstallEric():
@@ -195,9 +196,9 @@
     
     try:
         for rem_wname in rem_wnames:
-            rwname = wrapperName(getConfig('bindir'), rem_wname)
-            if os.path.exists(rwname):
-                os.remove(rwname)
+            for rwname in wrapperNames(getConfig('bindir'), rem_wname):
+                if os.path.exists(rwname):
+                    os.remove(rwname)
         
         # Cleanup our config file(s)
         for name in ['eric6config.py', 'eric6config.pyc', 'eric6.pth']:

eric ide

mercurial