Setting up Open Dylan in Windows
Robert Roland <[email protected]>
| Newsgroups | gmane.comp.lang.dylan.gwydion.devel |
|---|---|
| Message-ID | <E0DDDB5C6221DE4A917895E5A71A50B938A9080D@BN1PRD0712MB634.namprd07.prod.outlook.com> |
I found getting started with Open Dylan in Windows a bit more difficult than doing so on Mac OS X was, so I write this up today. This was all on a Windows 8 machine, but Windows 7 should work exactly the same. There's nothing specific to 8 here. Attached as a text file, mostly because I wrote it in Notepad. Hope someone else finds this useful. Thanks, Rob _______________________________________________ hackers mailing list [email protected] https://lists.opendylan.org/mailman/listinfo/hackers
windows-open-dylan.txt
(text/plain, 3.5 KB)
Setting up Open Dylan in Windows
================================
Requirements
------------
* Open Dylan 2012.1 - http://opendylan.org/downloads/opendylan/2012.1/opendylan-2012.1-win32.exe
* PellesC - http://www.smorgasbordet.com/pellesc/700/setup64.exe
Optional
--------
* GNU Emacs 24.2 - ftp://ftp.gnu.org/pub/gnu/emacs/windows/emacs-24.2-bin-i386.zip
* GitHub for Windows - http://github-windows.s3.amazonaws.com/GitHubSetup.exe
Installation
------------
Install the Open Dylan distribution, keeping all the defaults, choosing PellesC as your C compiler. Don't run the IDE when complete, as there's more you need to do to make this useful.
Install PellesC, also using all the defaults.
Open a Windows Explorer window, and go to Open Dylan's lib folder: C:\Program Files (x86)\Open Dylan\lib - from here, we're going to change the default JAM file used for builds to pick up PellesC.
Rename x86-win32-build.jam to x86-win32-build-default.jam
Copy x86-win32-pellesc-build.jam and name it x86-win32-build.jam
Now to set up the proper environment variables. This will set up PellesC and Open Dylan so they are accessible in any command prompt.
Open the "System" Control Panel, and choose "Advanced system settings" from the left. Click on the "Environment Variables" button towards the bottom. We'll be working within the "User variables for ___" section at the top.
Click New and add the following variables:
Variable name: PellesCDir
Variable value: C:\Program Files\PellesC
Variable name: INCLUDE
Variable value: %PellesCDir%\Include;%PellesCDir%\Include\Win
Variable name: LIB
Variable value: %PellesCDir%\Lib;%PellesCDir%\Lib\Win
PATH may already exist. In that case, we'll be using the "Edit" button on it and adding the value below to the beginning of the existing value.
Variable name: PATH
Variable value: %HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Open-Dylan\bin;%OPEN_DYLAN_HOME%\bin;%PellesCDir%\Bin;
Now, you can launch Open Dylan via the "Open Dylan 2012.1" icon on your desktop or start menu / start screen. You can use the "Dylan playground" and it will compile successfully now.
Optional - Setting up Emacs
===========================
For everything below, replace the "Robert" in the paths with your username.
Compile dswank
--------------
Open a Command Prompt and run the following commands:
cd "\Program Files (x86)\Open Dylan\sources\environment\dswank"
dylan-compiler-with-tools -build dswank
When this completes, you'll have a dswank.exe binary in C:\Users\Robert\AppData\Roaming\Open-Dylan\bin.
Setup emacs
-----------
Extract the emacs-24.2-bin-i386.zip file to C:\
Install GitHub for Windows. You'll need this to sync the latest dylan-mode.
After installing GitHub, launch the "Git Shell" from the icon on your desktop.
cd \Users\Robert\AppData\Roaming
md .emacs.d
cd .emacs.d
md vendor
cd vendor
git clone git://github.com/dylan-lang/dylan-mode.git
Launch emacs via the Run command (Windows-R): c:\emacs-24.2\bin\runemacs.exe
Edit your ~/.emacs file and add the following:
(add-to-list 'load-path "~/.emacs.d/vendor/dylan-mode")
(autoload 'dylan-mode "dylan-mode" "Dylan-mode" t)
(add-to-list 'auto-mode-alist '("\\.dylan\\'" . dylan-mode))
(setq inferior-dylan-program "C:/Users/Robert/AppData/Roaming/Open-Dylan/bin/dswank.exe") ; your dswank binary
(require 'dime)
(dime-setup '(dime-dylan dime-repl dime-compiler-notes-tree))
Save your .emacs file, close and relaunch Emacs. Now you can 'M-x dime' and have a full DIME interface in Windows.