IAHM-COL/727-230

Hard-coded paths

Closed this issue · 5 comments

Many paths are hard-coded using Aircraft/727-230. This means that the aircraft must be installed into the 727-230 directory. These should probably be changed to relative paths:

$ find . -type f | xargs grep 'Aircraft/727' 2> /dev/null
./Models/727-230.xml:      var livery_update = aircraft.livery_update.new("Aircraft/727-230/Models/Liveries", 10);
./Models/727-230.xml:    <path>Aircraft/727-230/Models/shadow.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Instruments/hsi/hsi.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Instruments/hsi/hsi.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Instruments/rmi/rmi.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Instruments/rmi/rmi.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Instruments/dme/dme.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Instruments/clock.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/ai/ai.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/ai/ai.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/asi/asi.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/asi/asi.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/alt/alt.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/alt/alt.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/vsi/vsi.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/vsi/vsi.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/epr/eprL.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/epr/eprM.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/epr/eprR.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/rpm/rpmN1L.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/rpm/rpmN1M.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/rpm/rpmN1M.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/rpm/rpmN2L.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/rpm/rpmN2M.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/rpm/rpmN2M.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/oilpressure/oilpressureL.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/oilpressure/oilpressureM.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/oilpressure/oilpressureR.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/oiltemp/oiltempL.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/oiltemp/oiltempM.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/oiltemp/oiltempR.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/flaps/flaps.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/flaps/flaps.xml</path>
./Models/727-230.xml:       <path>Aircraft/727-230/Models/Flightdeck/alt2/alt.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Flightdeck/STBYai/STBYai.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Instruments/comm/comm1.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Instruments/nav-radio/nav1.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Instruments/comm/comm2.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Instruments/nav-radio/nav2.xml</path>
./Models/727-230.xml:    <path>Aircraft/727-230/Models/Instruments/adf-radio/adf1.xml</path>
./Nasal/livery.nas:aircraft.livery.init("Aircraft/727-230/Models/Liveries");
./727-230-set.xml:      <splash-texture>Aircraft/727-230/splash-tribute.png</splash-texture>
./727-230-set.xml:      <path>Aircraft/727-230/Sounds/Sounds.xml</path>
./727-230-set.xml:      <path>Aircraft/727-230/Models/727-230.xml</path>
./727-230-set.xml:    <path>Aircraft/727-230/Systems/727-230-instrumentation.xml</path>
./727-230-set.xml:      <file>Aircraft/727-230/Nasal/mk-ki266.nas</file>
./727-230-set.xml:      <file>Aircraft/727-230/Nasal/tyresmoke.nas</file>
./727-230-set.xml:      <file>Aircraft/727-230/Nasal/livery.nas</file>
./727-230ADV-JSB-set.xml:      <splash-texture>Aircraft/727-230/splash-tribute.png</splash-texture>
./727-230ADV-JSB-set.xml:      <path>Aircraft/727-230/Sounds/Sounds.xml</path>
./727-230ADV-JSB-set.xml:   <path>Aircraft/727-230/Systems/SYS8_0_autopilot.xml</path>
./727-230ADV-JSB-set.xml:      <path>Aircraft/727-230/Models/727-230.xml</path>
./727-230ADV-JSB-set.xml:    <path>Aircraft/727-230/Systems/727-230-instrumentation.xml</path>
./727-230ADV-JSB-set.xml:      <file>Aircraft/727-230/Nasal/mk-rmi-adf-nav.nas</file>
./727-230ADV-JSB-set.xml:      <file>Aircraft/727-230/Nasal/mk-ki266.nas</file>
./727-230ADV-JSB-set.xml:      <file>Aircraft/727-230/Nasal/tyresmoke.nas</file>
./727-230ADV-JSB-set.xml:      <file>Aircraft/727-230/Nasal/livery.nas</file>
./727-230ADV-JSB-set.xml:      <file>Aircraft/727-230/Nasal/727.nas</file>

I am assigning this to myself as well, but I am a little uncertain so far, so if @sanhozay could provide me a bit more details.

this is my questions:

  1. this aircraft is 727-230, so it is my understanding that it should be installed in Aircraft/727-230 , where here "Aircraft" means a collection of paths as by --fg-aircraft=$VARIABLE

  2. Is the solution here,. removing

Aicraft/727-230/ for every iteration?

Example

Aircraft/727-230/Nasal
becomes
Nasal

(?)

Thanks
@IAHM-COL

This is being discussed on the mailing list re the Connie, where paths have all been made relative Let's see what happens. Other aircraft, e.g. c172p-detailed have also done this.

Problem is, in oldfer versions, 3.2 and 3.0, if you make ALL pathes relative, the model isn't showing up per MP anymore

OK, it looks like relative paths are not good practice:

https://sourceforge.net/p/flightgear/mailman/message/34079175/

@sanhozay

Thanks for letting us know.
Luckily here, we only need to "skip" merging the branch.
I will fix separately a few "/Aircraft..." absolute paths, but, if you agree with me, we can cite the message 9175 as the resolution for this issue (?)

Best
IH-COL