I've been using C++ builder XE under Windows 7 for a couple of years now. At some time I must have set the shortcut to C++ builder to "run as administrator", however I recently found that a bug which crashes my program when run from the command line (double clicking the .exe file in Windows Explorer) doesn't show itself in the IDE unless I DON'T run it as administrator. However, when I now pick another project I've been working on and try to compile and run it, I now get : "Error : Unable to create process: The requested operation requires elevation."
I realise this is due to Windows 7's UAC, but don't know how to debug my software any more !
Ideally, I would like to be able to compile and run my software in the debugger as a normal user.
Related
I need to build old components made for BCB6 (Borland C++ Builder 6) in Embarcadero RAD Studio XE5. Projects are CPP- projects, and the component code is contained in the *.PAS - files.
The project contain 6 packages:
three packages a design time
three packages runtime
First I build packages runtime. After that I start building and installing the packages design time that use packages runtime. And one design time package has a problem during installation:
I found a runtime package that causes this problem. My question is how do I find and resolve the following error? After all, when the package is installed, I cannot start the debugger, see the stack trace, nothing at all. What are the options? Thanks.
For that you need to run a second instance of the IDE in the debugger:
Uninstall the packages
Compile all packages with debug information
Load the project of the runtime package that causes the problem
In Run -> Parameters Set the Host application to $(BDS)\Bin\bds.exe
Press run with debug
This will start a second instance of the IDE. You might have to ignore some exceptions that it internally raises (and handles).
In that second instance, load the design time package which loads the runtime package that causes the problem
Hopefully you will now see what happens
I've uninstalled my RAD Studio 10.2.2 and installed 10.2.3 in my Win10 development VM. Along the way I uninstalled all the previous 3rd-party libs, including the Jedi GetIt packages, and per the instructions got rid of all the old Jedi source and DCP/DCLs. I'm attempting to install them back into 10.2.3 via GetIt. The JCL libs install fine, but when I try to install JVCL, the installation batch file hangs after compiling the installer and the VM comes to its knees. I rebooted, started taskmgr and watched as the batch file ran - it appears to go into a loop creating many instances of msgfmt. I've tried removing it all again, downloading and installing the 3.8 version myself and running the install batch file by itself, same problem; then backing up to the 3.6 version that had installed OK in 10.2.2, and it does the same thing. If I edit the batch file to skip the language-setup section, the batch file completes OK, but trying to re-run the GetIt update causes it to re-download and replace that batch file. :(
The installer does compile before the languages part of the batch file is reached, so I tried running the installer directly. I assume I'm not passing it cmd line info it needs, because it compiles the 64-bit libs fine but chokes immediately on compiling the 32-bit version of JvCore250.bpl with an unspecified compile error.
Anyone else run into this? Is a solution known?
Turns out to ultimately be a pathing problem. When multiple installations of the IDE exist on a machine (e.g. my VM has or previously had D2007, XE2 and 10.1 on it), the PATH environment variable can be too long - edit the PATH in the system to remove the old/stale paths. Then make sure that the library paths in the IDE includes $(BDSLIB)\$(PLATFORM)\release or you'll get "can't find RTL" when building the packages.
For me the problem is generated from the msgfmt.exe of dxgettext.
msgfmt.exe generates multilanguage messages, for a multilanguage support of jvcl installation.
For the specific problem of msgfmt.exe try to see this: dxgettext and Windows 10
I resolved the problem opened the install.bat file in jvcl folder, and I commented (with ::) every line where the msgfmt is executed.
Attention:
If you use getit I suppose you have to open the folder where jvcl is downloaded and search install.bat (I didn't use getit)
Instead I downloaded jvcl directly from github in my component folder, and I did what is written above in that folder.
I tried to install Delphi 5 on Windows 10, but hangs when configuring the BDE.
I've tried in a different directory with administrator permissions.
I've tried for compatibility mode as well.
If someone knows , I am very grateful!
This image is the error
This is the procedure I use to install Delphi 5 Pro on Windows 10:
Log in as Administrator
Turn UAC off
Log in as Standard User
Install Delphi 5 Pro via installer
The installation hangs while trying to install the BDE.
Use Task Manager to kill the install process.
Delete C:\Program Files (x86)\Borland\Delphi 5\Uninst.isu
Install Delphi 5 Pro via installer
Select registry settings only.
Install d5proupgrade.exe (Bug fix Upgrade for Delphi 5 Pro)
Open a command prompt as Administrator:
> cd C:\Program Files (x86)\Common Files\Borland Shared\Debugger
> tregsvr bordbk50.dll
> cd C:\see\below\regarding\winhlp32-windows-7-x86-x86-komeil
> Install.cmd
Edit permission on C:\Program Files (x86)\Borland\Delphi5\Bin\delphi32.dro adding Everyone with Full Control
Start Delphi 5
When prompted, don't change JIT debugger and check don't ask again.
Close Delphi 5
Turn UAC on.
I don't use the BDE and have never tested to see if it works or not after this procedure.
See http://www.komeil.com/blog/windows-help-program-winhelp-winhlp32-exe to find out how to get Delphi 5 Help working in Windows 10 and to obtain winhlp32-windows-7-x86-x64-komeil.cab. You'll have to download and extract the cab file then edit the Install.cmd, adding the last two line in the Settings so it reads:
:: ---------------------------------------------------------------------------
:: Settings
set MuiFileName=winhlp32.exe.mui
set ExeFileName=winhlp32.exe
set WindowsVersion=7
goto :BypassVersionError
I experienced the same problem but I found a workaround.
Install BDE from a separate source (for example you can download it from the EDN)
Start installing Delphi 5
When it stuck on the Configuring BDE screen open Task manager and close the installer with the End task.
Start the installer again but choose the latest option to setting Registry only.
Enjoy (?)
Recently i got a chance to work on delphi 7. I just created a sample application which display a welcome message and that exe is working fine on Delphi machine. if i moved that exe to non-delphi machine(where delphi is not installed), it is throwing error as "The program can't start beause rtl70.bpl is missing from your computer. Try reinstalling the program to fix the problem".
if i follow the same process with Delphi 5, it is working fine.
You have built the program to rely on runtime packages. That means that each machine that needs to run the program needs to have the runtime packages available.
There are two solutions:
Distribute the runtime packages that you use alongside the executable.
Disable runtime packages and so build an executable that contains the runtime.
The runtime packages options are determined by settings specified in the project options.
Unless you have some compelling reason to use runtime packages, the second option is much simpler because it allows the executable file to stand alone, with no external dependencies.
I know this might be a simple question but i searched the internet and couldn't find an answer. I am trying to install OExport - XLSX/ODS native Delphi/Lazarus import/export library http://www.kluug.at/xlsx-ods-delphi.php , but in order to install it I need to have prior installed OmniXMl. So I have downloaded from here http://www.kluug.at/xlsx-ods-delphi.php as well. I have extracted the archive and I opened from the dpk folder the OmniXml_Dxe2 package. And in the Delphi IDE i know that i need to right click on the project name (respectively OmniXml_Dxe2.bpl ) and then click install; but install option is missing (attached a picture); Then I thought that i need to run the project instead. So I when I run the project an error appears "Cannot run project unless a host application is defined. Use the Run|Parameters..dialog..box"
Could somebody please tell me where I am doing something wrong and what should I do in order to install OmniXml
The error you are seeing is because you are making a DLL or package, and they cannot be run. They only run when a host application is loading them, and you can use the Run/Parameters dialog to set this. But I suggest that you are really looking for the "Install" option for the project to load it as a package into Delphi.