Welcome, Guest
Username: Password: Remember me
CodeTyphon MS Windows (Win7, Win8.x, Win10 and Win11) OS Development, discussions and problems
  • Page:
  • 1

TOPIC:

Tutorial: Install Several Versions of CT 9 years 6 months ago #7203

  • Tony_O_Gallos
  • Tony_O_Gallos's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Ελεύθερο λογισμικό ή θάνατος
  • Posts: 84
  • Thank you received: 23
Hi everyone,
I would like to share with you my technique to have several working versions of CodeTyphon on the same machine :)


]Install Several Versions of CodeTyphon under Windows
(manual or by script)


:lol: Forewords
This tutorial aims to permit you to install several versions of CodeTyphon on the same computer.
CodeTyphon uses hard-coded installation and settings folders. It is hard to use two or more versions (a stable one + a dev one for example) for this reason.
The solution I use is a VHD container with the content of C:\CodeTyphon and the AppData folders.
The VHD is dynamically mounted, and CodeTyphon is used transparently.

Among the advantages of this approach:
  • Each version (one at a time, of course) keeps its own configuration within.
  • You can duplicate the VHD (for backup, test of Lab Version, transfert to another computer or drive (to avoid to recompile, save your environment), put it on a USB key…
  • You avoid fragmentation of your C drive, as all the files are contained in only one big container (more than 60,000 files in CT 5.30 ) and can even defrag «inside» the VHD.
    To defrag specifically the VHD file for better performance, you could use the freeware Defraggler (www.piriform.com/defraggler) which offers this feature.
  • You can install CodeTyphon from scratch or even «convert» an existing installation.

B) Prerequisite
  • You need administrative rights on the machine, running Windows 7 or superior.
  • Before to do any manipulation on the VHD, ensure you leave CodeTyphon and Typhon IDE.
  • Each VHD needs some space. I use 6GB, 5 should be fine.
    For convenience, use a directory in which you will place all your VHDs.
    For example, C:\VHD.
  • In order to mount/dismount and automount your VHDs at startup, you should use the excellent VHD Attach (www.jmedved.com/vhdattach/) which is free and opensource.
    VHD Attach offers a service to mount automatically the VHD during the startup.
    You can also mount a VHD manually everytime but it is less comfortable ;)

:silly: Overview



:blink: -= =Manual Installation – The hard way ==-

:huh: Prepare your VHD
If it doesn't exist yet, create the C:\CodeTyphon directory (it will be empty and used as mounting point for the VHD).
If you already installed CodeTyphon, rename the existing directory as (CodeTyphon.bak) and create a new one, you will move its content later in the VHD.

If you don't know how to create a VHD, follow the tutorial www.howtogeek.com/howto/5291/how-to-crea...-drive-in-windows-7/
Create you VHD file with a relevant name, such as CodeTyphon-530.vhd
5GB should be ok. You can make it dynamically expanding, but it is more slow.
Don't forget to select it, initialize it (MBR), create a volume on it, and use the maximum of space.
Mount it as T:\ (or any other letter) then format it as NTFS.
As an additionnal mountpoint set it to C:\CodeTyphon.
In VHD Attach, select your VHD file and set it as automount to have it mounted at every boot up.

:S Prepare your AppData
Go under C:\CodeTyphon (or T:\) and create the following directories:
"c:\CodeTyphon\AppData\Roaming\typhon32\"
"c:\CodeTyphon\AppData\Roaming\typhon64\"
"c:\CodeTyphon\AppData\Local\Typhon Data Desktop\"

Under Windows 7 and 8, your CodeTyphon configuration can be found (or will be created) in:
"c:\Users\[yourUserName]\AppData\Roaming\typhon32\"
"c:\Users\[yourUserName]\AppData\Roaming\typhon64\"
"c:\Users\[yourUserName]\AppData\Local\Typhon Data Desktop\"
If these folders don't exist, don't create them (they will be created by mklink used as mountpoints).
If they do, we will have to copy their contents in their «mirrors» in the VHD container, and then delete them (otherwise mklink will not work).

:pinch: Create SymLinks
Open a Dos Command Prompt (run, cmd) as Administrator or privileged used (try Win+X under Windows 8) and let's do symbolic links from your AppData to the VHD.
See ss64.com/nt/mklink.html for more details, if it doesn't work, check your rights
By default, only Administrators can create symbolic links.
The security setting 'Create symbolic links' can be granted at:
Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\

Replace yourUserName of course :
mklink /D "c:\Users\yourUserName\AppData\Roaming\typhon32\" "c:\CodeTyphon\AppData\Roaming\typhon32"
mklink /D "c:\Users\yourUserName\AppData\Roaming\typhon64\" "c:\CodeTyphon\AppData\Roaming\typhon64"
mklink /D "c:\Users\yourUserName\AppData\Local\Typhon Data Desktop\" "c:\CodeTyphon\AppData\Local\Typhon Data Desktop\"

:P Move or Install CodeTyphon
Once everything has been done, you can install CodeTyphon as usual or move the content of c:\CodeTyphon.bak to C:\CodeTyphon.
You existing links and installations will still be valid.

:whistle: -== Automated Installation – The easy way ==-

You have the possibility to use the batch script below.
There are a few settings you can change inside, and you will have to start it as Administrator.
You can use it to prepare your disk to do a regular install after.
Or, if there is already a valid installed CodeTyphon, be patient, it will take about 15-20 minutes to migrate it transparently and you will not have to reconfigure it after :)

:evil: How it works (Flowchart)



:blush: The Script (MakeCodeTyphonVHD.bat)
Warning: Spoiler!


:side: What's next?
Before to do any manipulation on the VHD, ensure you have closed CodeTyphon and Typhon IDE.
From VHD Attach, unmount the VHD file.

:lol: :lol: Duplicate it
You want to install a new or Lab Version, but avoid to lose a working version?
You should be able to keep the same links without to affect the rest.
  • Locate your VHD files,
  • Unmount the original one.
  • Duplicate it (and rename it)
  • Mount the new one.
  • Thats all :)

:woohoo: Move it
You can copy an unmounted VHD to a USB key or another computer, another drive.
Bring your CodeTyphon to a friend…
Compile it on you fastest computer, the copy it back on the slowest…

:laugh: Enjoy!
Hoping this will help you :)
You can apply such system to other applications which contain a lot of files.
Use it the way you want, no licence/copyright on it ;)

Tony_O_Gallos

File Attachment:

File Name: MakeCodeTyphonVHD.zip
File Size:2 KB
The following user(s) said Thank You: Ahmad

Please Log in or Create an account to join the conversation.

Last edit: by Tony_O_Gallos.

Tutorial: Install Several Versions of CT 9 years 6 months ago #7204

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
:woohoo: I can't say anything
only a simple Thanks Sir
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

  • Page:
  • 1