#Portable Development Environment Using Dropbox and Windows
I get annoyed when moving to a new Windows system. I'm an OS X user at heart, but have a laptop, a netbook, and a workstation at my job that all use the Windows operating system. To combat the pain of setting up a development environment and not having my OS X terminal commands at hand, I have created a way to get my development environment up and running by downloading Dropbox on the new Windows machine and running a .reg
file.
That's all. No fuss. Download Dropbox (I put it in the root C: directory for easy use), run the .reg
, and I'm off and running with all my code projects, git, ruby, gvim, and even Sublime Text 2.
To achieve command line aliases, like I have on my OS X machine, I use the Windows Doskey
command. It comes with Windows. I have successfully used it in both Windows XP and Windows 7.
My Dropbox folder is setup with the following structure:
C:\Dropbox\
\Apps \Apps\DevKit\ # This allows Ruby to use the C bindings in certain gems \Apps\git \Apps\ruby \Apps\SublimeText2 \Apps\tmp\ \macinit \Mine.reg \myRun.bat \pik\ # This is a Windows Ruby version manager \Apps\vim \Development
The tmp
directory is where all the magic happens. The .reg
file holds an entry that says to run myRun.bat
every time a new command prompt window is opened.
You should update myRun.bat as follows:
doskey /macrofile=%~dp0macinit
%~dp0 makes the file load dynamic, so as long as the alias file is sitting next to the batch file, you won't need to have an explicit path. It's a little more flexible for people like me who don't intend on using dropbox.