GSoC - Windows Support

From Liberty Eiffel Wiki
Revision as of 00:31, 23 August 2016 by Petru (talk | contribs)
Jump to navigation Jump to search

Liberty Eiffel meets Windows




Final Goal

   Bootstrap the Liberty-Eiffel programming language (compiler,classes, functions etc.)
   from the UNIX/LINUX environment to the WINDOWS environment and wrap it into a nice installer.


Progress

I've created a working application that replicates all the facilities, but one, that Liberty Eiffel offers in POSIX systems, in Windows Environment. The only facility that I didn't reproduce caused the following tools : eiffeltest_server and wrappers_generator, to be unoperable. This issue comes from the fact that I was not able to port the functions from net plugin.




The other tools (se, clean, ace_check, eiffeltest, mock, eiffeltest_ng, pretty, short, class_check, finder, eiffeldoc, extract_internals) work just fine together will all the other plugins and all functionalities.




What I coded:

  • install.bat, which creates the "T stages" and compiles *almost* all the tools, creates the configuration file and the binaries from the tools.
  • set_path.cmd, simple utility used to create the Liberty Eiffel configuration file, called by installer.nsi .
  • installer.nsi, a nicely wrapped NSIS installer + uninstaller, that follows the best practices : required executionlevel, write/delete registers, function to create/delete environment variable for the binaries created from the compiled Liberty Eiffel tools, has a function that reads the product version of the Liberty Eiffel install application and downloads from it's official website documentation regarding that patch( at the moment the site's structure does not allow that, but the function will be used in the near future, the installers now is only downloading from a plain link), an option for downloading mingw-w64, custom images etc.





General

The original main goal was to create two versions of an installer application: one that assumes that the end-user already has mingw-w64 installed, and one that installs mingw-w64 for the user.

The reason was flexibility: the installer with mingw attached would be bigger with around 300mb. After serching, I found out that there are not offline installers for mingw, but online versions of only around 200kb. Therefore I only created one version that has the option to select to call mingw's installer and downloads online.




The "T stages" refers to compiling smarteiffel's base code (136 .c files) and create an application from those, and from that application other 136 .c files, and so on for three times. After three such processes, if the resulting applications are binary indentical the installer proceeds further to the tools compilation.



The NSIS installer does just as mentioned above in the Progress section and has incorporated an uninstaller that uninstalls exactly what the installer created.



Repository structure

Please note that I did not want to create a very long post about all the details of installer.nsi, but you can check some of those here.




From this repository only the files mentioned [above], 'What I coded' paragraph were made by me, plus the images. The other files are duplicates from Liberty Eiffel's core structure(only the most relevant files) to create an ease of use of the installer script for testing purposes.