executable

Haskell, stack: locate the executable

筅森魡賤 提交于 2019-12-05 22:44:05
I'm looking for something like $ stack whereis hasktags where whereis acts more or less like UNIX whereis command. hasktags is to be run like this: $ stack exec -- hasktags stack exec -- whereis hasktags will do. stack exec -- whereis yourprogramname works for me on a Linux box, but I have to use stack exec -- which yourprogramname on Mac OS X. ( which also works on Linux, of course.) Note that neither of these are useful for automating deployments when the executable name is the same as one on the build machine -- not likely, but not impossible. 来源: https://stackoverflow.com/questions

Embed C++ compiler in application

泪湿孤枕 提交于 2019-12-05 21:28:14
问题 Aren't shaders cool? You can toss in just a plain string and as long as it is valid source, it will compile, link and execute. I was wondering if there is a way to embed GCC inside a user application so that it is "self sufficient" e.g. has the internal capability to compile native binaries compatible to itself. So far I've been invoking stand alone GCC from a process, started inside the application, but I was wondering if there is some API or something that could allow to use "directly"

Difference between ./executable and . executable

混江龙づ霸主 提交于 2019-12-05 20:57:13
In a shell, what is the difference between? . executable and ./executable In the first one, the dot a shortcut for source right? So is there a difference between ./executable and source executable ? is there a difference between ./executable and source executable? basic difference is, ./foo.sh - foo.sh will be executed in a sub-shell source foo.sh - foo.sh will be executed in current shell some example could help to explain the difference: let's say we have foo.sh : #!/bin/bash VAR=100 source it: $ source foo.sh $ echo $VAR 100 if you : ./foo.sh $ echo $VAR [empty] another example, bar.sh #!

How do I find out if a .exe is running in c++?

可紊 提交于 2019-12-05 20:51:08
How can you find out if an executable is running on Windows given the process name, e.g. program.exe? The C++ standard library has no such support. You need an operating system API to do this. If this is Windows then you'd use CreateToolhelp32Snapshot(), followed by Process32First and Process32Next to iterate the running processes. Beware of the inevitable race condition, the process could have exited by the time you found it. I just created one using Hans suggestion. Works like a champ! Oh and here is the basic code. Please you will have to add CStrings sAppPath and sAppName. StartProcess is

ImportError: cannot import name Publisher

允我心安 提交于 2019-12-05 19:52:03
问题 I succesfully created an executable version (Py2exe, Pyinstaller) of my application. When I try to run the app from .exe, I get an error as follows in the log file: Traceback (most recent call last): File "CreateAS.pyw", line 8, in <module> ImportError: cannot import name Publisher I am really stuck in this part. Could you help me out? Thanks 回答1: I'm guessing that you are using a version of wxPython that is >= 2.8.11.0 ? If so, the wx.lib.pubsub package has changed. This page describes the

How to make an executable out of my LIBGDX game

扶醉桌前 提交于 2019-12-05 19:20:15
问题 I've never made a program into an executable before, and I've been looking into how to do this for some time now. When I try to put it into a jar everything works fine but when I try to run it nothing happens. How do I make my game into an executable so it can be run (on windows, not android) I feel like I am not Linking it to the libraries or something... Not sure. Thanks! Edit: I should add I get the error JAR export finished with warnings. See details for additional information. duplicate

Python: Making a standalone executable file on MacOS with py2app

亡梦爱人 提交于 2019-12-05 17:39:40
I have an application in a python script my_app.py and want to make a standalone executable out of it on a MacOS (10.14). Following the video-tutorial here , I entered sequentially the following commmands: pip install virtualenv virtualenv venv --system-site-packages source venv/bin/activate pip install py2app cd /path/to/my_app.py python setup.py py2app -A with the following setup.py file: from setuptools import setup APP = ["my_app.py"] DATA_FILES = [] OPTIONS = { "argv_emulation": True, "packages": ["certifi"], } setup( app = APP, data_files = DATA_FILES, options = {"py2app": OPTIONS},

How to get the executable path from a Managed DLL

懵懂的女人 提交于 2019-12-05 17:24:16
I have a managed DLL (written in C++/CLI) that contains a class used by a C# executable. In the constructor of the class, I need to get access to the full path of the executable referencing the DLL. In the actual app I know I can use the Application object to do this, but how can I do it from a managed DLL? Assembly.GetCallingAssembly() or Assembly.GetExecutingAssembly() or Assembly.GetEntryAssembly() Depending on your need. Then use Location or CodeBase property (I never remember which one). Brian Stewart @leppie: Thanks - that was the pointer I needed. For future reference, in C++/CLI this

How important is it to digitally sign our executables?

倖福魔咒の 提交于 2019-12-05 14:29:57
问题 We produce a content management system. It's a database-based system, used only by businesses and organizations, and never downloadable from the Internet. That is, it's not the kind of software someone might stumble upon and wonder what it is and whether it's safe to run. Over the 20+ years our system is being sold, its executables have never been digitally signed. Is it time for us to start signing them? For starters, I can think of a few pros and cons: Pro: If using Verisign certificates,

Run Executable from makefile

泄露秘密 提交于 2019-12-05 14:13:06
问题 Hey I just have a quick question about makefile's. Is there some way to auto run the executable generated from a makefile? Like if I just type "make" it will compile and build and automatically execute so I can skip the extra step of ./myExecutable I have down in my notes: run: prog1 ./prog1 But it doesn't seem to work. Thanks 回答1: If you run make without specifying any targets, it would execute the first target it finds within the Makefile. By convention all is the name of such a target. If