@@ -15,31 +15,112 @@ as the starting point for a new generic IOC. Again we will create this in
15
15
your personal GitHub user space.
16
16
17
17
TODO: the following steps to create a new generic IOC project will be automated
18
- using and ``ec `` command.
18
+ using an ``ec `` command.
19
19
20
20
#. Create a new, completely blank repository in your GitHub account
21
- called ``ioc-adurldetector ``. To do this got to https://github.com/new
21
+ called ``ioc-adurl ``. To do this got to https://github.com/new
22
22
and fill in the details as per the image below. Click
23
23
``Create repository ``.
24
24
25
- #. Clone the template repo locally and rename from ioc-template to ioc-adurldetector
25
+ #. Clone the template repo locally and rename from ioc-template to ioc-adurl
26
26
27
27
.. code-block :: bash
28
28
29
29
git clone [email protected] :epics-containers/ioc-template.git
30
- mv ioc-template ioc-adurldetector
31
- cd ioc-adurldetector
30
+ mv ioc-template ioc-adurl
31
+ cd ioc-adurl
32
32
33
33
#. Add your new repo to your VSCode workspace and take a look at what you
34
34
have.
35
35
36
36
From the VSCode menus: File->Add Folder to Workspace
37
- then select the folder ioc-adurldetector
37
+ then select the folder ioc-adurl
38
38
39
39
#. Push the new repo back to a the new repo on github
40
40
41
41
.. code-block :: bash
42
42
43
43
git remote rm origin
44
- git remote add origin [email protected] :< YOUR USER NAME> /ioc-adurldetector.git
45
- git push origin main
44
+ git remote add origin [email protected] :< YOUR USER NAME> /ioc-adurl.git
45
+ git push origin main
46
+
47
+ Configure the ibek-defs Submodule
48
+ ---------------------------------
49
+
50
+ The ``ibek-defs `` submodule is used to share information about how to build
51
+ support modules. It contains two kinds of files:
52
+
53
+ #. Patch Files: these are used to update a support module so that it will
54
+ build correctly in the container environment. These should typically only
55
+ add one or both of these files:
56
+
57
+ - configure/RELEASE.local
58
+ - configure/CONFIG_SITE.linux-x86_64.Common
59
+
60
+ #. IBEK support module definitions: These are used to help IOCs build their
61
+ iocShell boot scripts from YAML descriptions. They are not used in this
62
+ tutorial as we are supplying a hand crafted boot script. For information
63
+ on IBEK see https://github.com/epics-containers/ibek.
64
+
65
+ ibek-defs is curated for security reasons, therefore we need to work with
66
+ a fork of it so we can add our own definitions for ADUrl. If you make changes
67
+ to ibek-defs that are generally useful you can use a pull request to get them
68
+ merged into the main repo.
69
+
70
+ Perform the following steps to create a fork and update the submodule:
71
+
72
+ - goto https://github.com/epics-containers/ibek-defs/fork
73
+ - uncheck ``Copy the main branch only ``
74
+ - click ``Create Fork ``
75
+ - click on ``<> Code `` and COPY the ssh URL
76
+ - cd to the ioc-adurl directory
77
+ -
78
+ .. code-block :: bash
79
+
80
+ git submodule set-url ibek-defs < PASTE URL HERE>
81
+ git submodule init
82
+ git submodule update
83
+ cd ibek-defs
84
+ git checkout tutorial
85
+ cd ..
86
+
87
+ We are using the tutorial branch which has a snapshot of the ibek-defs state
88
+ appropriate for this tutorial.
89
+
90
+ The git submodule allows us to share the ibek-defs definitions between all
91
+ ioc-XXX projects but also allows each project to have its copy fixed to
92
+ a particular commit (until updated with ``git pull ``).
93
+
94
+
95
+ .. git submodule init
96
+ .. git submodule update
97
+ .. cd ibek ibek-defs TODO - do they need a fork of this??
98
+ .. checkout main
99
+ .. push --set-upstream origin main
100
+ .. mkdir adurl
101
+
102
+ .. ec dev build
103
+
104
+
105
+ .. copy steps from ADSimDetector
106
+ .. copy makefile from ADSimDetector/ioc/iocApp/Makefile
107
+
108
+ .. Update this but discuss how we could have changed ADSupport to build GraphicsMagick
109
+ .. configure/CONFIG_SITE.linux-x86_64.Common
110
+ .. WITH_GRAPHICSMAGICK = YES
111
+ .. GRAPHICSMAGICK_INCLUDE=/usr/include/GraphicsMagick
112
+
113
+ .. # THIS COULD GO INTO ADSUPPORT AND THEN WE DONT NEED INCLUDE OR apt-install
114
+ .. # GRAPHICSMAGICK_EXTERNAL = NO
115
+
116
+ .. apt update
117
+ .. apt install apt-file
118
+ .. apt-file find Magick++.h
119
+ .. add boost lib apt install
120
+ .. AND libgraphicsmagick++1-dev
121
+ .. change last step to adurl from ADSimDetector
122
+ .. cp ibek-defs/adcore/adcore.sh ibek-defs/adurl/adurl.sh
123
+
124
+
125
+ .. Once running:-
126
+ .. caput -S BL01T-EA-TST-02:CAM:URL1
0 commit comments