mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 23:02:28 +01:00
Update wikipage IRON: Eiffel package repository. (Signed-off-by:jocelyn).
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1454 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
[[Property:title|IRON: Eiffel package repository]]
|
[[Property:title|IRON: Eiffel package repository]]
|
||||||
[[Property:link_title|IRON packages]]
|
[[Property:link_title|IRON packages]]
|
||||||
[[Property:weight|0]]
|
[[Property:weight|0]]
|
||||||
[[Property:uuid|7A89C720-160B-4A8E-96E6-1FE9C3AFB0D9]]
|
[[Property:uuid|8CD35EE7-682A-4A8D-A4E7-E5B66AB15FC5]]
|
||||||
{{ReviewRequested}}
|
{{ReviewRequested}}
|
||||||
|
|
||||||
=Purpose=
|
=Purpose=
|
||||||
@@ -16,7 +16,7 @@ Most often a package is a library or a set of libraries, but it could also other
|
|||||||
|
|
||||||
Certainly the IRON repository is a repository of Eiffel libraries. However, sometimes libraries are used together, or cross reference one another, and thus are appropriate to be delivered together as a unit.
|
Certainly the IRON repository is a repository of Eiffel libraries. However, sometimes libraries are used together, or cross reference one another, and thus are appropriate to be delivered together as a unit.
|
||||||
Such unit can also include other types of files, such as external .c files that may need to be compiled on the local platform to make .LIB or .OBJ files available to the linker (.a or .o on Unix and Linux systems), scripts or executables that need to be run as part of the installation process (e.g. to generate other files required by the library, install environment variables, generate source code from LEX files), or tool kits that are part of, or needed by, the library.
|
Such unit can also include other types of files, such as external .c files that may need to be compiled on the local platform to make .LIB or .OBJ files available to the linker (.a or .o on Unix and Linux systems), scripts or executables that need to be run as part of the installation process (e.g. to generate other files required by the library, install environment variables, generate source code from LEX files), or tool kits that are part of, or needed by, the library.
|
||||||
Since the IRON repository permits programmers to install software components in "units", and since sometimes those units can contain more than one library, as well as other types of files, a new term was required to convey this concept: package.
|
Since the IRON repository permits programmers to install software components in "units"Â, and since sometimes those units can contain more than one library, as well as other types of files, a new term was required to convey this concept: package.
|
||||||
|
|
||||||
{{Definition|package|a downloadable unit of software from an IRON repository that contains one or more Eiffel libraries and their related files.}}
|
{{Definition|package|a downloadable unit of software from an IRON repository that contains one or more Eiffel libraries and their related files.}}
|
||||||
|
|
||||||
@@ -29,9 +29,11 @@ To configure Eiffel projects, programmers uses "ECFs" (Eiffel Configuration File
|
|||||||
One application of ECFs is to reference libraries installed in different locations. Without IRON, the usual solution is to use relative or absolute path, and generally using environment variables such as ISE_LIBRARY or EIFFEL_LIBRARY, and a few package specific variables such as GOBO, ...
|
One application of ECFs is to reference libraries installed in different locations. Without IRON, the usual solution is to use relative or absolute path, and generally using environment variables such as ISE_LIBRARY or EIFFEL_LIBRARY, and a few package specific variables such as GOBO, ...
|
||||||
|
|
||||||
Typical library references without IRON in ECF:
|
Typical library references without IRON in ECF:
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
<code>
|
||||||
<library name="xml_parser" location="$EIFFEL_LIBRARY\library\text\parser\xml\parser\xml_parser.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||||
<library name="dummy_foobar" location="$LIB_DUMMY\src\foo\bar.ecf"/>
|
<library name="xml_parser" location="$EIFFEL_LIBRARY\library\text\parser\xml\parser\xml_parser.ecf"/>
|
||||||
|
<library name="dummy_foobar" location="$LIB_DUMMY\src\foo\bar.ecf"/>
|
||||||
|
</code>
|
||||||
|
|
||||||
As projects grow and multiply, the number of these variables adds up quickly. A dozen or more such environment variables per system is (prior to IRON) not uncommon. Coordinating their use and evolution among a team of programmers can become a challenge.
|
As projects grow and multiply, the number of these variables adds up quickly. A dozen or more such environment variables per system is (prior to IRON) not uncommon. Coordinating their use and evolution among a team of programmers can become a challenge.
|
||||||
|
|
||||||
@@ -42,9 +44,11 @@ IRON has made it possible to simplify this scenario dramatically. For any commo
|
|||||||
** as you can see, no more environment variable, and only a relative path from the root of the package. This simplifies a lot the referencing, and package/library management. No need to know where are located the installed files on the local machine.
|
** as you can see, no more environment variable, and only a relative path from the root of the package. This simplifies a lot the referencing, and package/library management. No need to know where are located the installed files on the local machine.
|
||||||
|
|
||||||
That's all! In the above example, the location of the libraries, in the project, then become something like:
|
That's all! In the above example, the location of the libraries, in the project, then become something like:
|
||||||
<library name="base" location="iron:base:base.ecf" />
|
<code>
|
||||||
<library name="xml_parser" location="iron:xml:parser/xml_parser.ecf" />
|
<library name="base" location="iron:base:base.ecf" />
|
||||||
<library name="foobar" location="iron:dummy:src/foo/bar.ecf" />
|
<library name="xml_parser" location="iron:xml:parser/xml_parser.ecf" />
|
||||||
|
<library name="foobar" location="iron:dummy:src/foo/bar.ecf" />
|
||||||
|
</code>
|
||||||
|
|
||||||
There is no more need for a set of environment variables.
|
There is no more need for a set of environment variables.
|
||||||
|
|
||||||
@@ -75,12 +79,12 @@ Notes:
|
|||||||
* In the scope of the .ecf file, the IRON_PATH variable is always set: to default path or to the value of environment variable IRON_PATH.
|
* In the scope of the .ecf file, the IRON_PATH variable is always set: to default path or to the value of environment variable IRON_PATH.
|
||||||
* In addition to the IRON way to reference library, it is also possible to use the absolute URL in the repository, see advanced usage for more details.
|
* In addition to the IRON way to reference library, it is also possible to use the absolute URL in the repository, see advanced usage for more details.
|
||||||
<code>
|
<code>
|
||||||
https://iron.eiffel.com/14.05/com.eiffel/library/base/base.ecf
|
https://iron.eiffel.com/14.05/com.eiffel/library/base/base.ecf
|
||||||
https://iron.eiffel.com/14.05/com.eiffel/library/text/parser/xml/parser/xml_parser.ecf
|
https://iron.eiffel.com/14.05/com.eiffel/library/text/parser/xml/parser/xml_parser.ecf
|
||||||
https://iron.eiffel.com/14.05/others/dummy/src/foo/bar.ecf
|
https://iron.eiffel.com/14.05/others/dummy/src/foo/bar.ecf
|
||||||
</code>
|
</code>
|
||||||
|
|
||||||
But this implies putting the version in the url (i.e 14.05), or you could set ISE_LIBRARY to <nowiki>https://iron.eiffel.com/14.05/com.eiffel</nowiki>
|
But this implies putting the version in the url (i.e 14.05), or you could set ISE_LIBRARY to <code>https://iron.eiffel.com/14.05/com.eiffel</code>
|
||||||
|
|
||||||
= IRON client tool =
|
= IRON client tool =
|
||||||
The '''iron''' client executable is a facility that permits Eiffel programmers to easily install, remove, update, list, examine, search and share Eiffel packages.
|
The '''iron''' client executable is a facility that permits Eiffel programmers to easily install, remove, update, list, examine, search and share Eiffel packages.
|
||||||
@@ -171,18 +175,23 @@ Finally, when you have found the package you want, click on its title, and the p
|
|||||||
== Associated paths ==
|
== Associated paths ==
|
||||||
Part of the information is a portion of the URI which you can use to define the path to the package.
|
Part of the information is a portion of the URI which you can use to define the path to the package.
|
||||||
For the '''base''' library (title: EiffelBase), these URIs look like this:
|
For the '''base''' library (title: EiffelBase), these URIs look like this:
|
||||||
/14.05/com.eiffel/library/base
|
<code>
|
||||||
/14.05/com.eiffel/library/data_structure/adt/base
|
/14.05/com.eiffel/library/base
|
||||||
|
/14.05/com.eiffel/library/data_structure/adt/base
|
||||||
|
</code>
|
||||||
|
|
||||||
Given that the server's HTTP address is (in this example) https://iron.eiffel.com/, you can compose full paths from this, and use them in your Eiffel project. In this case, you can include the EiffelBase library in your project by specifying either:
|
Given that the server's HTTP address is (in this example) https://iron.eiffel.com/, you can compose full paths from this, and use them in your Eiffel project. In this case, you can include the EiffelBase library in your project by specifying either:
|
||||||
https://iron.eiffel.com/14.05/com.eiffel/library/base/base.ecf
|
<code>
|
||||||
or https://iron.eiffel.com/14.05/com.eiffel/library/data_structure/adt/base/base.ecf
|
https://iron.eiffel.com/14.05/com.eiffel/library/base/base.ecf
|
||||||
|
or https://iron.eiffel.com/14.05/com.eiffel/library/data_structure/adt/base/base.ecf
|
||||||
|
</code>
|
||||||
|
|
||||||
Both will cause your project to compile with the same EiffelBase library provided by this IRON repository, provided you previously issued the following command on your system:
|
Both will cause your project to compile with the same EiffelBase library provided by this IRON repository, provided you previously issued the following command on your system:
|
||||||
|
<code>
|
||||||
> iron install base
|
> iron install base
|
||||||
or
|
or
|
||||||
> iron install https://iron.eiffel.com/14.05/com.eiffel/library/base
|
> iron install https://iron.eiffel.com/14.05/com.eiffel/library/base
|
||||||
|
</code>
|
||||||
|
|
||||||
'''IMPORTANT''': those associated URIs may be deprecated soon with the use of IRON uri <code>iron:base:base.ecf</code>.
|
'''IMPORTANT''': those associated URIs may be deprecated soon with the use of IRON uri <code>iron:base:base.ecf</code>.
|
||||||
|
|
||||||
@@ -259,7 +268,7 @@ The "iron" executable is used to perform various operations such as search, inst
|
|||||||
</code>
|
</code>
|
||||||
(or <nowiki>iron install https://iron.eiffel.com/14.05/com.eiffel/library/base</nowiki>)
|
(or <nowiki>iron install https://iron.eiffel.com/14.05/com.eiffel/library/base</nowiki>)
|
||||||
|
|
||||||
:(This latter form is useful in resolving name conflicts when, for instance, you have multiple IRON repositories registered on your system, and two or more contain a packaged called "base".)
|
:(This latter form is useful in resolving name conflicts when, for instance, you have multiple IRON repositories registered on your system, and two or more contain a packaged called "base"Â.)
|
||||||
|
|
||||||
===Uninstall a package===
|
===Uninstall a package===
|
||||||
<code> iron remove base
|
<code> iron remove base
|
||||||
@@ -278,11 +287,13 @@ The "iron" executable is used to perform various operations such as search, inst
|
|||||||
|
|
||||||
It is possible to have more than one IRON repository server registered.
|
It is possible to have more than one IRON repository server registered.
|
||||||
Examples:
|
Examples:
|
||||||
iron repository --list
|
<code>
|
||||||
iron repository --add <nowiki>https://iron.eiffel.com/14.05</nowiki>
|
iron repository --list
|
||||||
iron repository --add <nowiki>https://custom.example.com/14.05</nowiki>
|
iron repository --add https://iron.eiffel.com/14.05
|
||||||
iron repository --add C:\eiffel\my_repository
|
iron repository --add https://custom.example.com/14.05
|
||||||
iron repository --remove <nowiki>https://custom.example.com/14.05</nowiki>
|
iron repository --add C:\eiffel\my_repository
|
||||||
|
iron repository --remove https://custom.example.com/14.05
|
||||||
|
</code>
|
||||||
|
|
||||||
===Multiple-Repository Name Conflict Resolution===
|
===Multiple-Repository Name Conflict Resolution===
|
||||||
|
|
||||||
@@ -297,27 +308,29 @@ If the sequence of repositories is not to your liking, you can change it in thre
|
|||||||
==Building a package==
|
==Building a package==
|
||||||
An IRON package has to provide, at its root, a file <code>package.iron</code>. This file describes the package with name, description, and various other information.
|
An IRON package has to provide, at its root, a file <code>package.iron</code>. This file describes the package with name, description, and various other information.
|
||||||
See for instance, the package.iron for Eiffel Base package:
|
See for instance, the package.iron for Eiffel Base package:
|
||||||
package base
|
<code>
|
||||||
|
package base
|
||||||
project
|
|
||||||
base_safe = "base-safe.ecf"
|
project
|
||||||
base = "base.ecf"
|
base_safe = "base-safe.ecf"
|
||||||
base_testing = "testing/testing-safe.ecf"
|
base = "base.ecf"
|
||||||
base_testing = "testing/testing.ecf"
|
base_testing = "testing/testing-safe.ecf"
|
||||||
|
base_testing = "testing/testing.ecf"
|
||||||
note
|
|
||||||
title: Eiffel Base
|
note
|
||||||
description: "Eiffel Base: kernel library classes, data structure, Input and Output"
|
title: Eiffel Base
|
||||||
|
description: "Eiffel Base: kernel library classes, data structure, Input and Output"
|
||||||
tags: base,kernel,structure,io
|
|
||||||
license: Eiffel Forum License v2
|
tags: base,kernel,structure,io
|
||||||
copyright: 1984-2013 Eiffel Software and others
|
license: Eiffel Forum License v2
|
||||||
link<nowiki>[doc]</nowiki>: "Documentation" http://eiffelroom.com/
|
copyright: 1984-2013 Eiffel Software and others
|
||||||
link<nowiki>[source]</nowiki>: "Subversion" https://svn.eiffel.com/eiffelstudio/trunk/Src/library/base
|
link[doc]: "Documentation" http://eiffelroom.com/
|
||||||
link<nowiki>[license]</nowiki>: http://www.eiffel.com/licensing/forum.txt
|
link[source]: "Subversion" https://svn.eiffel.com/eiffelstudio/trunk/Src/library/base
|
||||||
maps: /com.eiffel/library/data_structure/adt/base
|
link[license]: http://www.eiffel.com/licensing/forum.txt
|
||||||
|
maps: /com.eiffel/library/data_structure/adt/base
|
||||||
end
|
|
||||||
|
end
|
||||||
|
</code>
|
||||||
|
|
||||||
Note: The package iron file for the Eiffel Base package is available online at <code>https://svn.eiffel.com/eiffelstudio/trunk/Src/library/base/package.iron</code> .
|
Note: The package iron file for the Eiffel Base package is available online at <code>https://svn.eiffel.com/eiffelstudio/trunk/Src/library/base/package.iron</code> .
|
||||||
|
|
||||||
@@ -332,13 +345,15 @@ Current status:
|
|||||||
A few packages may require '''post installation operations''', such as compiling C code, or others.
|
A few packages may require '''post installation operations''', such as compiling C code, or others.
|
||||||
For that, use the section '''setup''', and in particular the '''compile_library''' information.
|
For that, use the section '''setup''', and in particular the '''compile_library''' information.
|
||||||
During installation, '''iron''' will launch the <code>compile_library</code> tool delivered with EiffelStudio on the provided directory.
|
During installation, '''iron''' will launch the <code>compile_library</code> tool delivered with EiffelStudio on the provided directory.
|
||||||
Example at https://svn.eiffel.com/eiffelstudio/trunk/Src/library/cURL/package.iron :
|
|
||||||
|
|
||||||
package cURL
|
Example at https://svn.eiffel.com/eiffelstudio/trunk/Src/library/cURL/package.iron :
|
||||||
|
<code>
|
||||||
setup
|
package cURL
|
||||||
compile_library = Clib
|
|
||||||
...
|
setup
|
||||||
|
compile_library = Clib
|
||||||
|
...
|
||||||
|
</code>
|
||||||
|
|
||||||
This <code>compile_library</code> tool relies on <code>finish_freezing -library</code> and thus process the <code>Makefile-win.SH or Makefile.SH</code>.
|
This <code>compile_library</code> tool relies on <code>finish_freezing -library</code> and thus process the <code>Makefile-win.SH or Makefile.SH</code>.
|
||||||
|
|
||||||
@@ -357,20 +372,23 @@ Example on Windows:
|
|||||||
|
|
||||||
It should find and list all the official ISE IRON packages.
|
It should find and list all the official ISE IRON packages.
|
||||||
Now if you want to install the '''time''' package from it, just do
|
Now if you want to install the '''time''' package from it, just do
|
||||||
|
<code>
|
||||||
> iron install time
|
> iron install time
|
||||||
Searching [time]
|
Searching [time]
|
||||||
-> several packages for name [time]!
|
-> several packages for name [time]!
|
||||||
1) time (https://iron.eiffel.com/14.05) "EiffelTime"
|
1) time (https://iron.eiffel.com/14.05) "EiffelTime"
|
||||||
2) time (file:///C:/EiffelDev/Src/library)
|
2) time (file:///C:/EiffelDev/Src/library)
|
||||||
> Select a package [1] (q=cancel): 2
|
> Select a package [1] (q=cancel): 2
|
||||||
-> Install time (file:///C:/EiffelDev/Src/library)
|
-> Install time (file:///C:/EiffelDev/Src/library)
|
||||||
Installing [time (file:///C:/EiffelDev/Src/library)] -> successfully installed.
|
Installing [time (file:///C:/EiffelDev/Src/library)] -> successfully installed.
|
||||||
|
</code>
|
||||||
|
|
||||||
To make development easier, you may want to edit/update the repositories.conf file, in order to put that file://... local repository on the top.
|
To make development easier, you may want to edit/update the repositories.conf file, in order to put that file://... local repository on the top.
|
||||||
> iron path
|
<code>
|
||||||
C:\Users\jfiat\Documents\Eiffel User Files\14.05\iron
|
> iron path
|
||||||
and then edit "C:\Users\jfiat\Documents\Eiffel User Files\14.05\iron\repositories.conf"
|
C:\Users\jfiat\Documents\Eiffel User Files\14.05\iron
|
||||||
|
and then edit "C:\Users\jfiat\Documents\Eiffel User Files\14.05\iron\repositories.conf"
|
||||||
|
</code>
|
||||||
|
|
||||||
*However, unless you are using the iron tool in batch mode ( <code>--batch</code> flag ), you will be asked to choose which package you want to install.
|
*However, unless you are using the iron tool in batch mode ( <code>--batch</code> flag ), you will be asked to choose which package you want to install.
|
||||||
*You can also use the EiffelStudio "Add Library" dialog via the "Iron" tab, to install, uninstall the various packages.
|
*You can also use the EiffelStudio "Add Library" dialog via the "Iron" tab, to install, uninstall the various packages.
|
||||||
@@ -390,9 +408,11 @@ Example:
|
|||||||
|
|
||||||
To build the '''gps_nmea''' package from your library <code>c:\eiffel\library\gps_nmea\</code> :
|
To build the '''gps_nmea''' package from your library <code>c:\eiffel\library\gps_nmea\</code> :
|
||||||
|
|
||||||
iron share create --username <your_id> --password <your_password>
|
<code>
|
||||||
--repository https://iron.eiffel.com/14.05
|
iron share create --username <your_id> --password <your_password>
|
||||||
--package "c:\eiffel\library\gps_nmea\package.iron" --package-name "gps_nmea"
|
--repository https://iron.eiffel.com/14.05
|
||||||
|
--package "c:\eiffel\library\gps_nmea\package.iron" --package-name "gps_nmea"
|
||||||
|
</code>
|
||||||
|
|
||||||
This command will:
|
This command will:
|
||||||
* create a new package named '''gps_nmea''' on iron repository '''https://iron.eiffel.com/14.05''',
|
* create a new package named '''gps_nmea''' on iron repository '''https://iron.eiffel.com/14.05''',
|
||||||
|
|||||||
Reference in New Issue
Block a user