Terminality icon indicating copy to clipboard operation
Terminality copied to clipboard

cmd problems in win64

Open ElectroPaul opened this issue 7 years ago • 5 comments
trafficstars

As soon as started to use Terminality found problems on launching user custom settings of g++, like: copied C++.terminality-collections to the user settings file and completed command up to the: "g++ $file -static -static-libgcc -static-libstdc++ -o $file_without_ext && $file_without_ext $arguments" because MinGW is asking me to copy libstdc++ into the source file directory otherwise. But it seems not getting effect as in case, for example of "Bouild System with" and custom build settings made for MinGW, which is working perfectly, but has no capability of input. If i copy the mentioned library it seems to gettin` through. Very similar thing is happening to the python settings: as far as I have "py -2" and "py -3" commands I got them to user setting file, edited it. But when I run it seems the Sublime Text is launching system with default settings containing "python" (which is py -3 in my case) and I get an output of python 3 instead of py -2. python 3 launch is crashing as default "python3" in cmd line does not suite my system. If I change "description" : "Some decription" then I see it in suggested run settings. Long story short: I suspect Terminality is not running user defined package properly in win64.

I guess it should be alright in case of win32 as generic_shell.py has: if sys.platform == "win32": return subprocess.Popen( cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=cwd, shell=True ) And no win64 things.

P.S.: Sorry, I am total newbie and used to bare iron c-code due to specifics of my work. Studied python this summer.

ElectroPaul avatar Jan 05 '18 08:01 ElectroPaul

Hmm, the platform checking condition should not effect how Terminality works on Windows both 32 and 64 bits version though, according to the Python documentation for sys.platform.

Also it would be nice if you can make a small repository to reproduce this issue as I can try on my machine (or someone's else computer).

spywhere avatar Jan 05 '18 08:01 spywhere

Well... can you send me some manual how I should do it. Or should I just upload my setting file to my repository? I guess I have more free time to make it in the evening as I got enough of job tasks at the moment. Yeah, checked the sys.platform.startswith you send me, seems you are right. Maybe I got some syntax errors, because of "newbieness" :D .

ElectroPaul avatar Jan 05 '18 08:01 ElectroPaul

Have you followed this section? It seems like you are trying to copy the content from a collection file to the User settings file instead of creating a new one.

spywhere avatar Jan 05 '18 08:01 spywhere

Ok I copy-paste my settings file and you can yell on me :

`{ // Enable debug mode "debug": false,

// Additional execution units
//    This will be merged with default execution units
//    See format in README.md file


"execution_units": {
    "source.cpp": {
        "run": {
            "name": "Run $file_name",
            "description": "Compile and Run $file_name with default C++ compiler",
            "required": ["file"],
            "command": "g++ $file -static -static-libgcc -static-libstdc++ -o $file_without_ext && $file_without_ext $arguments",
            ///////////// Things working with pure Build System:
            //"command": "g++ ${file} -static -static-libgcc -static-libstdc++ -o ${file_path}/${file_base_name}",
            //"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
            //"working_dir": "${file_path}",
            ////////////
            "macros": {
                "file_without_ext": [
                    ["$file", ".*(?=\\.)"]
                ]
            }
        }
    },
    "source.python": {
        "python2run": {
            "name": "Run $file_name",
            "description": "Run $file_name as Python 2 document",
            "required": ["file"],
            "command": "py -2 -u $file $arguments"
        },
        "python3run": {
            "name": "Run $file_name in python3",
            "description": "Run $file_name as Python 3 document",
            "required": ["file"],
            "command": "py -3 -u $file $arguments"
        }
    }

},



// Set to "false" to show menu if no command is available
"show_nothing_if_nothing": true,

// Set to "true" to run command if there is only one command available
"run_if_only_one_available": true,

// Amount of lines from bottom to snap into autoscrolling area
//    Increase this number if autoscroll is not working properly
"autoscroll_snap_range": 1,

// Always scroll view to bottom in output window
"autoscroll_to_bottom": true,

// Refresh rate for Terminal (in second)
//    Increase this value can helps output to print more smoothly but
//    it's also affect the system performances
"refresh_interval": 0.01,

// The encoding to handle input/output of the invoked process
//    Using the same format as str.encode() in Python 3 used
"encoding": "UTF-8",

// Error handler on output encoding
//    ignore = Remove all invalid encoding character
//    replace = Replace all invalid encoding character with "?" symbol
// Change this value without knowing what you're doing is not a good idea
"encoding_handle": "replace"

} `

ElectroPaul avatar Jan 05 '18 09:01 ElectroPaul

Seems like you have to configure your settings for the working directory. By default, Terminality only set the working directory to the project root which in your case seems to be file_path, hence you would need to change location key to your target directory (once again, refers to the documentation in README file).

spywhere avatar Jan 05 '18 09:01 spywhere