How do I back up and restore my Delphi settings? [duplicate] - delphi

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to migrate Delphi or clone Delphi registry settings?
I need to format my PC soon, but I have the IDE and environment settings perfectly set up to just how I want them, along with some components I have installed.
Obviously formatting and reinstalling Windows will wipe all settings and registry entries, so when I do install Delphi again I will have to tweak it all to get it to how it originally was, which will take quite a bit of time that I would rather not use up.
What is the best way to retain Delphi IDE and environment settings and installed components?
Is it just a case of backing up registry entries and user data folders?

How to make a complete backup of delphi XE manually:
backup complete installation folder.
(tip: install your components under the delphi folder so they also get backed up).
export & backup HKLM\Software\Embarcadero registry key
in case of 64 bit os it will be HKLM\Software\Wow6432Node\Embarcadero
export & backup HKCU\Software\Embarcadero registry key
Some components may write BPL files to your system folder (check C:\Windows\System32 or C:\Windows\SysWOW64 folder)
after OS reinstallation:
reinstall Delphi to the SAME folder and apply same updates
overwrite installation with your backup
reimport registry keys from backup
if you have Delphi plugins/experts, reinstall them
some tips:
install Delphi under the root of your drive (eg c:\DelphiXE), this to prevent troubles with UAC under vista/W7.
Keep your projects under the delphi folder, is very handy if you have to cope with different delphi versions (eg c:\delphi5\projects, c:\delphixe\projects, ...)
make an automated daily backup of your delphi folder (via windows backup or other tool)

You can try CnWizard Backup/Restore tool. If you keep same path for components and delphi install, just make backup, install delphi and cnwizard, copy all components folders and make restore.
I only have problem when migrate from XP to W764b, must to manualy change path in registry for Program Files folder.

Yes, I agree with #Martin, VMWare is great for this VMWare. Not only for Delphi and its settings and component, but the whole O/S, including SPs, KBs, drivers, settings, applications & their settings, Anti virus, Firewalls.
This is what I do with VMWare ver 5 (other/newwer version might be different)
Install VMWare on the Host O/S. The host can be a Windows O/S or a Linux O/S variant. I personally like to use Linux as the host O/S, because, for me, the security is better towards virus, malware etc.
Install a guest O/S. This can be any supported O/S of choice, including any SPs, drivers needed.
Install Delphi and all components you need.
You can backup the guest O/S to a media, DVD-R, for example. If anything major happened, you can just restore it for less than 30 minutes. This is a huge benefit.
You can have as many as guest O/Ses you want (If you have the space). This is great for testing purposes. How many times you hear that your app is breaking on a particular O/S, with a specific SPs/KBs, dll or other specific settings on client PCs? With multiple guest O/Ses, you can test your app with different O/S and/or settings without having to have multiple PCs or multiple partitions with different O/Ses.
Of course VMWare has many other usages, but for me, the above usage scenario is enough.
Other Virtual Machine is from Oracle (Oracle VM) which is free Oracle VM. They claimed to be better than VMWare, but I myself have not tested it.

Related

How do I access Linux binaries from Windows when using WSL?

I'm experimenting with the new Windows Subsystem for Linux as a way to develop Rails applications in Windows. I have WSL installed and I have Ruby in it but how do I use that Ruby from a Windows GUI application, specifically, RubyMine:
This is so I can easily start rails, run tests, etc.
If anyone is wondering how this can be done at this time with the latest version of Ruby, there is a WSL connector for the remote repo of ruby.
[Update 2020-10-30]
Updating the response below as a lot has changed and improved since my initial reply in 2017 😜
The awesome team at JetBrains have enabled RubyMine to talk to WSL via SSH and to use the "remote" Ruby interpreter, and even debug Ruby code running in WSL! :)
Also, in Windows 10 1903, WSL provides the ability to access Linux distros' filesystems from Windows via the \\wsl$\ pseudo-UNC path.
In Windows 10 2004, WSL added a Linux icon to File Explorer making it easier to discover this pseudo-UNC path.
So, in Windows 10 >= 1903, Windows apps, editors, IDEs, etc. can also access files stored in, for example, \\wsl$\Ubuntu\...!
👉 Notes:
Accessing files in Linux via \\wsl$\... will be slower than accessing files locally because file IO requests have to be marshalled back and forth via a 9P fileserver. If you intend on accessing files intensively, we recommend storing the files in the filesystem closest to whatever you'll be using to access those files most intensively.
Thus ... while you can access files directly via the pseudo-path, using WSL integrations built-in to tools like RubyMine, VSCode, Visual Studio, etc. should be preferred if available.

Reinstalling Windows without re-registering Delphi

I'll be reinstalling Windows and I wondered if there's a way to backup/restore Delphi license info so I don't "lose" one of my installations for that.
In other words - is there a way to uninstall Delphi, reinstall Windows, reinstall Delphi without that being treated as a "new" installation?
[I want to completely wipe out my computer and start out from scratch. I'll be reinstalling XE5, XE7, and 10 Seattle.]
The .slip files used for registration info are in C:\ProgramData, in either the CodeGear or Embarcadero folders depending on which version of the IDE you're using.
I've successfully copied the files from these folders to a thumb drive and moved them to a new computer. Note that part of the registration information is the local computer name, so in order to work on a different machine (or a clean Windows install on the same machine) the computer name needs to stay the same. Just name the computer the same, copy the .slip files to the same location on the new machine, and then install Delphi/RAD Studio.
To be on the safe side, I always copy the entire folder (including all subfolders and their contents) to make sure I've gotten everything the IDE needs.
I had a similar problem when renaming my Windows 10 computer. Apparently the license is bound to the computer name. I had to re-register Delphi after renaming my computer but failed because of the limit of my license key.
Solution was renaming back my computer and renaming C:\ProgramData\Embarcadero\.cgb_license.corrupted and C:\ProgramData\Embarcadero\.licenses\.cg_license.corrupted to files without the .corrupted as suffix. My licence slip file was C:\ProgramData\Embarcadero\.2016_2.#############.slip.

Delphi 6 Update 2 installation workaround on Windows 8.1 x64?

I need to work with Delphi 6 Update 2 in Windows 8.1 x64 (in case you were wondering, it's about maintaining an old application, migrating to a newer version is not an option. I can't use a VM because I use the same machine to connect to some peripherals that don't work in a VM).
The problem is that Update 2 has a 32 bit installer with a 16 bit stub. So the current behaviour is that the installer starts, it extracts the files in a temp location, starts the setup then nothing appears on screen.
So far, I gathered that it is impossible to do it. But the same behaviour I 've seen for SQL Server 2000 (don't ask) but there I was able to use msetup.exe (DemoShield) to open a sqlservr.dbd that started the script. However, there is no such dbd file. I guess I was lucky on SQLServer 2000.
So far I've tried compatibility mode, DosBox, replacing the setup file with both Installshield 3 and 5, waiting for hours for the setup to start (sometimes, W8 does that), even comparing files and registries on an XP machine before and after update 2 but this might be a bit too risky to apply on a real machine.
Since Windows 8.1 86 includes Hyper-V for running VMs, most modern hardware supports Hyper-V, and Windows 8 x86 can still run 16-bit based apps:
Install a Windows 8.1 x86 VM under your host physical machine, then install it there.
The up-tick: it is easy to move your VM to a new host without needing to reinstall a full new VM.
See http://www.techrepublic.com/blog/windows-and-office/get-started-with-windows-8-client-hyper-v-the-right-way/7893/ and http://www.infoworld.com/d/virtualization/5-excellent-uses-of-windows-8-hyper-v-208436 to get started with Hyper-V.
Hyper-V can redirect quite a bit of hardware from the host to the VM nowadays. For "old" hardware like COM and LPT ports you often can buy USB adapters that can be redirected.
If installing on x86 Windows 8.1 works and x64 fails, I think you have proved the assumption that the 16-bit portion of the installer is the culprit.
Maybe my blog post from last year can solve your problem:
http://blog.dummzeuch.de/2013/11/11/delphi-6-on-windows-8-1/
excerpt:
I just deleted the registry entry
HKCU\Software\Borland\Delphi\6.0\LM
(I did not make a backup, what would have been the point?)
I started Delphi 6, ignored the warning about incompatibilities (which was talking about Delphi 7 anyway) and went through the registration/activation process again. This time it worked.
Maybe I should mention, that I did not install any of my Delphi versions to c:\program files but put them into c:\Delphi instead to avoid any problems with access rights to the installation directory.

How to make a struts2 project an executable Application

I have developed a Struts2 Project using Apache server and MySQL database.
Is it possible to make this application an executable application so that i do not need to give JDK, Apache and MySQL separately to the user. The installer could install all these 3 itself.
Also can i make this so that only a single user can use this application. How Please Tell.
Usually a Web Application has a central server (with at least: a Java Virtual Machine, a Web Server / Application Server, a Database, and the Web Application contanining the Java code), and all the client computers use their browsers to connect to it.
The kind of application that seems to arise from your description is a monolitic one, like a GUI App made in Swing or in Visual Basic; you install it in the clients, and each one has a copy of each component. If you install it 20 times, you will have 20 database, 20 copies of the files, etc...
Even in client-server applications, with centralized database and distributed code, the problems were always client-related; you can't know if the system were you are automatically installing a database, an JDK etc... already has that software, maybe in other versions, or has the environment variables messed up etc. When you need to update the software, or to tune up the system, you need to be physically log to that pc, remotely or by person. This are some of the reasons that led to the choice of preferring Web Applications to distributed applications.
If you need to craft a "package" of your application to be installed in one click by a dumb user (let's say, a portable version of your application, to let your PM perform some Demo in remote locations, or to give it to the big boss to let him see it), you should really evaluate the possibility of creating a Virtual Machine.
A Virtual Machine is a big file (on a hard disk, or read by an USB key, etc) that, once mounted by a Virtualization Software (usually the same software that created the Virtual Machine), will run an entire new OS inside a window of your guest OS.
The leading software to do this is VMWare (the Player is free and cross-platform), alternatively you can use VirtualBox.
Then, you need to
download VMWare Player
download the ISO of your favourite Linux distribution (I hope you don't use Windows as server)
create a, let's say, 10GB partition for your Linux distribution with VMWare Player, and mount it
plug the ISO with something like (the free edition of) Daemon Tools
install the Linux distribution
install and configure all the software you need there (Apache, MySQL, your favourite browsers, etc; JVM usually is already there)
install your web application
Then you will have a physical file with a complete Linux OS inside, with all the needed software already tuned up: just distribute this file to Windows, Mac or Linux users, they will only need the VMWare Player installed to run your file and access (their copy of) your application inside the Linux OS.

BlackBerry Code Signing for Multiple OS'es

I wanted to do a couple of things and am wondering if they're possible, and if so, how to do them.
I was going to make a Virtual Machine to run code-signing in. That way if my computer dies I can hopefully minimize downtime by simply running the VM in a new system. I know the code keys are tied to the machine they're run on. If anyone has done code signing in a VM and switched the VM to another physical machine please let me know if the keys continued to work or not.
I also wanted to run more than one JDE in the VM to sign code for different OSes. From what I understand the code signing uses a code signing app located in each JDE's directory. Is it possible to run multiple JDE's on the same system and be able to sign code for a specific OS (I'm planning on having JDE 4.2.1, 4.5, 4.6.1, 4.7, and eventually 5.0 on the code-signing VM). If so, do I need multiple keys - one for each JDE version - or is there some way to use the same keys for the different versions?
Thanks for any help in answering this.
It's certainly possible to migrate the keys between machines - We have a set of keys that have been used on Windows XP, Mac OS X and Linux machines.
If you look in one of your BlackBerry JDE Component Package X.Y.Z\bin directories after you've used the signing tool manually you'll see these files:
sigtool.csk
sigtool.db
These are the files you need. Simply copy them to the equivalent location in the alternate JDE trees and you will be able to use them for 'multiple targets'. I've not done this with 4.7.0, but have with 4.6.0, 4.5.0, 4.3.0, and 4.2.1. We're run the signer using
java -jar bin/SignatureTool.jar
I'm not sure whether other methods would work.
Migrating to UNIX-like build machines introduces a twist, and this is why I think RIM say the keys are not portable - the SignatureTool application seems to not detect the operating system-specific directory path separator character. The upshot is that it looks for the key files in these locations, even on a UNIX machine (note the backslashes):
bin\sigtool.csk
bin\sigtool.db
when you'd think it would look for bin/sigtool.csk for example. A solution for this is simply to create soft links with these names that point to the actual files. In the component package top-level directory we do this:
ln -s bin/sigtool.db bin\\sigtool.db
ln -s bin/sigtool.csk bin\\sigtool.csk
I've only signed in one VM - a Windows XP image. It worked fine.
Another solution is to just fix the problem with SignatureTool (FYI, RAPC has similar issues), as this blog describes:
http://www.slashdev.ca/2008/03/16/using-sigtool-in-linux/

Resources