Re: Getting Started with IUP
- Posted by jeremy (admin) Apr 25, 2011
- 1756 views
cp,
You need to download a runtime from: https://bitbucket.org/jcowgar/euiup/downloads for Windows.
The DLL's contained in the runtime should then be placed in your local executing directory or in the same location as your eui.exe if running via the interpreter. You can then simply run the demos:
C:\Development> cd euiup\demos C:\Development\euiup\demos> eui hello.ex
You can see some of the new 4.0 configuration magic by looking at euiup\demos\eu.cfg, it contains one simple line:
-i ..
What that does is simply place -i .. onto the command line of eui, it would have been the same as simply running:
C:\Development\euiup\demos> eui -i .. hello.ex
Now, looking at hello.ex, you'll see
include iup/iup.e as iup
So, in the root of the "euiup" directory, you'll see that I put all the includes under a directory named "iup"
C:\Development\euiup> dir attributes.e common.e ... iup.e ... wrap.e
Thus, when in your source file you use "include iup/iup.e" you are actually including "iup.e" from the "iup" directory, which Euphoria can find because -i .. in the case of the demos places "iup/iup.e" in the include path. So... taking this a step further, say you have this setup:
C:\Development\Projects> dir euiup MyEuIupApp C:\Development\Projects> cd MyEuIupApp C:\Development\Projects\MyEuIupApp> dir hello_world.ex
You can execute:
C:\Development\Projects\MyEuIupApp> eui -i ..\euiup hello_world.ex
and that will work because the -i ..\euiup places the root EuIUP folder in the include path and thus Euphoria can find "iup/iup.e" that your hello_world.ex program would include. To avoid having to type -i ..\euiup all the time, you can place that line in the eu.cfg file, create one if necessary. Now, you can also create a system wide configuration file if you would like and add something like this:
-i C:\Development\Projects\euiup
to it. You will then be able to use eui and euiup from any directory on your system as you have given an absolute path. The system wide configuration file should go in the same place as your eui.exe file:
C:\Development\Tools\euphoria\bin> dir eui.exe eu.cfg euc.exe ...
Does that help out any?
Jeremy