Useful scripts for developers: Difference between revisions

Jump to navigation Jump to search
+- Minor spelling and cleanup; template: Github source, Forum link; cat: Aircraft enhancement, Perl software
(+- Minor spelling and cleanup; template: Github source, Forum link; cat: Aircraft enhancement, Perl software)
 
Line 1: Line 1:


== Aircrafts scripts ==
== Aircraft scripts ==
 
=== Files loaded ===
=== files loaded ===
There are many files used for an aircraft and it could be difficult when developing or maintaining an aircraft to know how all these files are loaded, by which file and if they are used.
 
There are many files used for an aircraft and it could be difficult when developping or maintaining an aircraft to know how all theese files are loaded, by which file and if they are used.


The script below searches in xml, nas and ac files other loaded files : nas, xml, wav, rgb and png.
The script below searches in xml, nas and ac files other loaded files : nas, xml, wav, rgb and png.
Line 10: Line 8:
Feel free to improve it !
Feel free to improve it !


==== script (linux) ====
==== Perl script (linux) ====
 
<syntaxhighlight lang="perl" enclose="div">
<syntaxhighlight lang="perl" enclose="div">
#!/usr/bin/perl -W
#!/usr/bin/perl -W
Line 192: Line 189:
</syntaxhighlight>
</syntaxhighlight>


==== configuration and installation ====
==== Configuration and installation ====
 
# Copy-paste the text in a text file named "files-loaded.pl"
# copy-past the text in a text file named "files-loaded.pl"
# '''You should modify some constants on the top of the file''' : $dirname_aircraft, $aircraft, $dirpath_fgdata, $dirpath_root
# '''You should modify some constants on the top of the file''' : $dirname_aircraft, $aircraft, $dirpath_fgdata, $dirpath_root
# chmod the file : chmod ug+x files-loaded.pl  
# chmod the file : chmod ug+x files-loaded.pl  
# run the script : ./files-loaded.pl
# Run the script : ./files-loaded.pl


== Related content ==
<!-- == Related content ==
-->
== External links ==
* {{github source|user=mherweg|repo=d-laser-fgtools}}
* {{forum link|title=script to find unused files|t=29950}}


== External links ==
[[Category:Aircraft enhancement]]
* [https://github.com/mherweg/d-laser-fgtools] - d-laser's python scripts
[[Category:Perl software]]
* [https://forum.flightgear.org/viewtopic.php?f=4&t=29950] - forum topic

Navigation menu