executable

What Can I Do To Reduce My Executable's Size (Delphi)?

◇◆丶佛笑我妖孽 提交于 2019-11-27 04:30:34
I release a single executable (.EXE) for a desktop program using Delphi 2009. I have no external DLLs or resources that I need for the program to run. I use two components: LMD Innovative's ELPack and Sergey Tkachenko's TRichView that are compiled into my executable. When I build my production version, using the "Release" build configuration, the executable file produced is 13,533 KB. Prior to using Delphi 2009, I was using Delphi 4. The executable it produced was only 2,671 KB while incorporating the same two components and basically having the same code as my current version. I do understand

Hide Command Window of .BAT file that Executes Another .EXE File

瘦欲@ 提交于 2019-11-27 04:17:00
问题 This is a batch file in Windows. Here is my .bat file @echo off copy "C:\Remoting.config-Training" "C:\Remoting.config" "C:\ThirdParty.exe" This works fine except the .bat file leaves the command window open the whole time the "ThirdParty" application is running. I need the command window to close. I would use the short-cut for the application but I must be able to run this copy command first (it actually changes which data base and server to use for the application). The ThirdParty

How to create a executable .exe file from .m file

℡╲_俬逩灬. 提交于 2019-11-27 04:13:47
I was wondering if there is a way to create a '.exe' file from ' .m' file in matlab , such that it can be run in machine which does not have MATLAB ( like it can be done in C, C++) I know writing a MATLAB function is one way, but not sure if it can run in machine without MATLAB. Also i would like to hide my code and just create a script which can be run by a user using his own data files. The Matlab Compiler is the standard way to do this. mcc is the command. The Matlab Runtime is required to run the programs; I'm not sure if it can be directly integrated with the executable or not. If you

Difference between extracting and packaging libraries into a jar file

为君一笑 提交于 2019-11-27 03:48:10
I would like to know the difference between extracting and packaging libraries into a jar file from eclipse with the runnable jar file creation. If my program (runnable jar) uses other classes which require these external libraries(jars), what should I pick? If you want to put jars into your generated jar file, you can use packaging method. For example if you are using an Apache library or some other 3rd party jars, you may want to keep these jars preserved in your generated jar. In this case, use packaging. "Packaging required libraries into a jar file" option puts classes of org.eclipse.jdt

Making an executable in Cython

泪湿孤枕 提交于 2019-11-27 03:28:11
Been playing with cython. Normally program in Python, but used C in a previous life. I can't figure out how to make a free-standing executable. I've downloaded cython, and I can make a .pyx file (that's just a normal Python file with a .pyx extension), that executes in the Python shell, using: import pyximport; pyximport.install() I can generate a .c file at the command line with: cython file.pyx I can generate a .so file by building a standard setup.py and executing: setup.py build_ext --inplace I've tried making an executable out of the .so file using gcc with various options, but always

Running EXE with parameters

爷,独闯天下 提交于 2019-11-27 03:07:39
问题 I need help in trying to execute an executable from my C# application. Suppose the path is cPath , the EXE is HHTCtrlp.exe and the parameter that has to be passed is cParams . How would I go about this? The reason why the path is a variable is that there are 3 different EXE files to run and the path will change depending on which one will run, same with the parameter string. Any help would be greatly appreciated. 回答1: To start the process with parameters, you can use following code: string

How to make gcc generate only machine code that can be loaded directly into memory and executed?

两盒软妹~` 提交于 2019-11-27 02:09:42
问题 I would like to produce a file that I can load into memory (for example with mmap ) and then jump to the start of that memory to run the code. Ideally, I'd like the option of either making the code relocatable (which might be inefficient) or specifying an explicit address that the code expects to be loaded at (which is a pain), but either one would probably work fine on its own. 回答1: You can do this but you will need to go through the object file format. In particular, the objcopy command can

Is it possible to execute code from the stack in standard C?

不羁的心 提交于 2019-11-27 02:09:36
问题 The following code doesn't work as intended but hopefully illustrates my attempt: long foo (int a, int b) { return a + b; } void call_foo_from_stack (void) { /* reserve space on the stack to store foo's code */ char code[sizeof(*foo)]; /* have a pointer to the beginning of the code */ long (*fooptr)(int, int) = (long (*)(int, int)) code; /* copy foo's code to the stack */ memcpy(code, foo, sizeof(*foo)); /* execute foo from the stack */ fooptr(3, 5); } Obviously, sizeof(*foo) doesn't return

How to implement readlink to find the path

余生长醉 提交于 2019-11-27 02:07:42
问题 Using the readlink function used as a solution to How do I find the location of the executable in C?, how would I get the path into a char array? Also, what do the variables buf and bufsize represent and how do I initialize them? EDIT: I am trying to get the path of the currently running program, just like the question linked above. The answer to that question said to use readlink("proc/self/exe") . I do not know how to implement that into my program. I tried: char buf[1024]; string var =

How can I creating executable JAR with SWT that runs on all platforms?

邮差的信 提交于 2019-11-27 01:54:41
问题 SWT comes with a base JAR and one specific JAR per platform (Windows, Linux/32bit, Linux/64bit, Mac, AIX, ...). How can I create an executable JAR that will select the correct platform JAR at runtime? [EDIT] I was thinking to supply all platform JARs in a subdirectory and in main() would then modify the class loader. Has anyone already tried this? 回答1: Look at this, there is a code sample: Create cross platform java swt application 回答2: For my current job I needed to supply an executable jar