Hi I am trying to make my qt app run just copying the exe. With hours of static build I succeded it however; I discovered that there is a tool for mac named 'macdeployqt' doing all the process for you.
So I wondered if any equivalent tool or script exists for windows. It will get the exe extract dependencies, creates qt.conf file and put the dll's and exe into right paths.
What I mean here is not about creating setup package, just a folder containing all necesseray libraries etc.
Related
I am using QtCreator to run my application and have a CMake target that copies the DLLs next to my executable every time I press run.
This worked fine, but now I am writing unit tests and for each module, I have a separate executable.
So, the question is how can I avoid copying the DLLs to every single unit test folder, is there anything similar to Linux's LD_LIBRARY_PATH on Windows?
Nevermind, you can just add the build folder to your PATH and it will find the DLLs.
Running the solution without problems in Visual studio 2017, or directly through .exe file in solution folder (inside release and debug folders). But when the ".exe" file is not in the solution folder, it will crash and stop working.
I found that these lines are causing the issue:
ScreenReaderAPIWrapper.ScreenReader sc = new ScreenReaderAPIWrapper.ScreenReader();
sc.SayString(textDisplay.Text.ToString());
The ScreenReaderAPIWrapper library for .net you're using is a wrapper around another library called UniversalSpeech. There are several solutions alike out there, like Davy Kager's Tolk or Chris Toth's AccessibleOutput. All of these libraries make use of native APIs provided by corresponding screen reader modules (jfwapi.dll, saapi32.dll, NvdaController32.dll and others).
For these libraries to work, you have to provide all of the needed DLLs along with your executable, otherwise you'll get those errors about the exe file that stopped working.
If you need to distribute your program, consider using installer tools like NSIS or InnoSetup to pack all needed files into one single installer.
The structure of my ANE file looks like this:
<META-INF>
<ANE>
<Windows-x86>
ExtensionDll.dll
DllUsedByExtensionDll.dll
extension.xml
mimetype
catalog.xml
library.swf
If ExtensionDll.dll uses the functions in the other Dll, the extension won't load. DllMain is not called. It seems like DllUsedByExtensionDll.dll is not in the Dll search path when the air application uses the extension is running.
How should I make the application find the extra Dlls, if I don't want to put them into some common Dll path?
I've had the same problem and went at this for a few days. Turns out there's two ways to solve this.
Export Release Build, while making sure that the DllUsedByExtensionDll.dll is packaged in the same directory as your executable.
For debugging purposes, copy the DllUsedByExtensionDll.dll into your Adobe AIR SDK bin directory, where the Air Debug Launcher (adl) executable is located.
You do not need to package DllUsedByExtensionDll.dll in the ANE that you are building.
The problem is that ExtensionDll.dll cannot find the DllUsedByExtensionDll.dll when it is launched from the debugger, since the executable for the debugger is located in the AIR SDK. Once you export the release build however, the your app is the executable, so now it looks for the dll in its root directory.
If you want to debug this in order to find out more information on what could be wrong, I suggest that you run your app by command line using the adl command.
For me, running through Flash Builder's debug/run meant that I could not see the Windows error "the program can't start because dll is missing from your computer". And that led me on a wild goose chase for a long time.
If your dll is using other dlls then include the reference dll's in the project where you are going to use that ANE file.
I would lik to make 1 exe-file (win32) with all obj, idp, pdb... files embeded to make it easier to copy the program and use it on other computers, can anyone help me?
You don't need obj, idp, pdb... files to run on another computer.
Start by selecting the Release configuration and see what ends up in the output folder. Most likely it's just 1 file.
You can embed Text, Xml and in principal even DLL files but it is not always worth it.
If you want to simply run the generated program on another computer, just copy the .exe and any associated dll files. The pdb file is a debug information database that is not actually needed to run the program - only to load it in the debugger with specific information. The other files are intermediate files created during the build process.
If you don't want to have to install the Visual C++ Runtime on the target machine, or rely on it being there, you will want to go into the Project Settings -> C/C++ Settings -> Code Generation and select that you want the "Multithreaded" library instead of the "Multithreaded DLL" library (or equivalent). This will embed the C++ runtime into your program.
Of course if you're trying to copy the project over to perhaps do more debugging or development on another computer, just pack it all into a zip file.
How to run the exe file to other system?
Using VB 6
I copied the exe file to other system, then run that exe file, it not working it showing error
“component comdlg32.ocx or one its dependencies not correctly registered a file is missing or invalid”`
Can any one help me how to avoid this error?
When deploying VB6 applications, you should create a Setup, this will manage the DLL's that the VB6 application depends on. Since it is not enough to just copy the .Exe and .Dll's. You also need to register them.
The creation of the setup is included in the VB6 environment.
You can read this http://support.microsoft.com/kb/830761 which is very comprehensive.
1: http://support.microsoft.com/kb/830761 for more information.
Or if you just want the redistributable files check this kb http://support.microsoft.com/kb/290887
Copy and register the comdlg32.ocx on other system. Link: Fix Missing Comdlg32.ocx Run time Error in Portable apps.
Create an installer for your program.
Unless you are deploying your program to really old versions of Windows (prior to XP), one nice alternative is to create an XCopy package using reg-free COM. This is fairly easy for most simple programs using Make My Manifest though it can be done by hand or using other tools if you invest in a little study.
Even then a formal installer package is usually desireable though, if nothing else to create Start Menu shortcuts and set up application workspace directories.
Keep in mind that even the PDWizard is difficult to use blindly. Packaging and deployment is a topic that requires some learning investment.
Outdated or missing comdlg32.ocx runtime library is causing this error. Here is a copy of comdlg32.ocx (~60 Kb Zip). Download the file to the Desktop and extract the comdlg32.ocx to your the Windows\System32 folder.
Note: If you already have a copy of comdlg32.ocx, backup the existing file to a different folder and delete it from System32 folder.
1. Download comdlg32.zip and save to Desktop.
2. Unzip the file using WinZip or any other utility.
3. Extract comdlg32.ocx to Windows\System32 folder.
4. Type the following command from Start, Run dialog:
regsvr32 %Systemroot%\System32\comdlg32.ocx
Typically a VB 6 app will consist of an .exe some .dll libraries and a config.ini file. The exe is the starting place and it consumes the dll's and config.ini and other resources to run => you have to have all parts in the same directory for the app to run typically called "packaging" an app. E.g. An installer simply ensures that all those files in a packaged app are placed on a users computer in an Windows application directory, and creates a shortcut launch icon so that a user can click the shortcut in the start bar and the app will run.
To "package" your app (put the dll's and exe in the same folder) you can use an Add-In called "Package and Deployment Wizard":
And here is a demo of using it: https://www.youtube.com/watch?v=XT7jaoAiKDo
You can either package and create an installer and package or just create a package:
Now if the Deployment Wizard doesnt show as an add-in on your VB6 Editor Installation, go to editor's program folder and find the tools Tools folder, i.e:
Then you should be able to find the Deployment Wizard there:
Open it to use it.