executable

How to compile a linux shell script to be a standalone executable *binary* (i.e. not just e.g. chmod 755)?

╄→尐↘猪︶ㄣ 提交于 2019-11-27 06:23:19
I'm looking for a free open source tool-set that will compile various "classic" scripting languages, e.g. Korn Shell, ksh, csh, bash etc. as an executable -- and if the script calls other programs or executables, for them to be included in the single executable. Reasons: To obfuscate the code for delivery to a customer so as not to reveal our Intellectual Property - for delivery onto a customer's own machine/systems for which I have no control over what permissions I can set regarding access, so the program file has to be binary whereby the workings cannot be easily seen by viewing in a text

How do I make a hyperlink to a local executable?

a 夏天 提交于 2019-11-27 06:03:41
问题 We have an Intranet website, and a WPF windows executable installed on every workstation. How can we create a hyperlink on the intranet website that will launch the locally installed executable? Ideally we want the launch to be seamless. Is there a way of setting the browsers trust settings so that it won't display a security warning dialog for this executable? We have full admin capabilities on each workstation, and each user only uses Internet Explorer. We also know the correct local path

How do I make this file.sh executable via double click?

风流意气都作罢 提交于 2019-11-27 05:54:05
First off I'm using Mac. Next, I need to execute this "file.sh" we will call it. Everytime I need to execute it I have to open Terminal and type: cd /Users/Jacob/Documents/folderWithFileInIt bash file.sh This is okay, but I feel like it would be a lot quicker if I make the file execute on double click, don't you think? So my question is, how do I make this file executable via double click? My ideas were either: a) type something like chmod into terminal and change permissions? b) make a file, put code I wrote above in it ^ and then make that file executable? c) make an automation somehow to do

How do you avoid over-populating the PATH Environment Variable in Windows?

六月ゝ 毕业季﹏ 提交于 2019-11-27 05:49:52
I would like to know what are the approaches that you use to manage the executables in your system. For example I have almost everything accessible through the command line, but now I come to the limit of the path string, so i can't add any more dir. So what do you recommend? A long time ago, I tried to use softLinks of the executables in a Dir that belonged to the path, but that approach didn't work. Throw the "executable only" to a known Dir,has the problems that almost any application require a set of files, so this also is bad. Throw the executable and all his files to a known Dir, mmm

How can the terminal output of executables run by Python functions be silenced in a general way?

前提是你 提交于 2019-11-27 05:31:59
I want to suppress all of the terminal output produced by a function that runs executables. I have attempted to suppress the output of a Python function by using a context manager that temporarily redefines stdout and stderr each time the function is called. This suppresses terminal output produced by print calls in the function, but it doesn't seem to work when the function calls executables that produce terminal output. So, how could the output of executables called by Python functions be suppressed? My code is below. I have included an example function that calls ls to try to illustrate the

How to reduce the size of executable produced by MinGW g++ compiler?

好久不见. 提交于 2019-11-27 05:15:40
I have a trivial "Hello world" C++ program that is compiled to 500kB executable by MinGW g++ compiler under Win XP. Some say that is caused by iostream library and static link of libstdc++.dll . Using -s linker option helped a bit (reducing 50% size), but I would by satisfied only by <10kB executable. Is there any way how to achieve this using MinGW compiler? Portability is not a big concern for me. Is it possible to copy libstdc++.dll with the executable using dynamic linking? If so, how to achieve this? Solved: I was using MinGW 3.4. Now I updated to latest MinGW 4.6 and the size was

run program in Python shell

心不动则不痛 提交于 2019-11-27 04:59:44
问题 I have a demo file: test.py . In the Windows Console I can run the file with: C:\>test.py How can I execute the file in the Python Shell instead? 回答1: Use execfile for Python 2 : >>> execfile('C:\\test.py') Use exec for Python 3 >>> exec(open("C:\\test.py").read()) 回答2: If you're wanting to run the script and end at a prompt (so you can inspect variables, etc), then use: python -i test.py That will run the script and then drop you into a Python interpreter. 回答3: It depends on what is in test

Is a Linux executable “compatible” with OS X?

╄→尐↘猪︶ㄣ 提交于 2019-11-27 04:47:32
If you compile a program in say, C, on a Linux based platform, then port it to use the MacOS libraries, will it work? Is the core machine-code that comes from a compiler compatible on both Mac and Linux? The reason I ask this is because both are "UNIX based" so I would think this is true, but I'm not really sure. Tom No, Linux and Mac OS X binaries are not cross-compatible. For one thing, Linux executables use a format called ELF . Mac OS X executables use Mach-O format . Thus, even if a lot of the libraries ordinarily compile separately on each system, they would not be portable in binary

Python equivalent of unix “strings” utility

a 夏天 提交于 2019-11-27 04:38:15
问题 I'm trying to write a script which will extract strings from an executable binary and save them in a file. Having this file be newline-separated isn't an option since the strings could have newlines themselves. This also means, however, that using the unix "strings" utility isn't an option, since it just prints out all the strings newline-separated, meaning there's no way to tell which strings have newlines included just by looking at the output of "strings". Thus, I was hoping to find a

Producing executable jar in NetBeans

可紊 提交于 2019-11-27 04:37:39
I'm using NetBeans 6.5 and for some reason it won't produce executable jar "out of the box". I set my project to be the main project, defined main class in the project properties "run" menu and it works flawlessly when I press F6 to run it. I looked at the manifest file and it indeed didn't define the main class there, and also omitted the library dependencies. Am I missing something? Is there a way (other than manually altering the manifest file) to produce executable jar files? EDIT: yes, I tried clean and rebuild and it produced the jar in the dist folder, still with the same manifest.mf