romdigger Code
Status: Alpha
Brought to you by:
benderam
1. Alias+Platform should give unique value, 2 equal aliases are permitted on different platforms. They should be used for preview image naming. For example, we provide 2 icon sets - "artwork" and "gameplay"; the base directory for all images is "imagebase". The structure of directories with images should be the following: imagebase/artwork/ imagebase/artwork/NES imagebase/artwork/NES/Zen.png imagebase/artwork/NES/Bomberman.png imagebase/artwork/NES/PrinceOfPersia.png ... imagebase/artwork/Sega imagebase/artwork/Sega imagebase/artwork/Sega/MortalCombat1.png imagebase/artwork/Sega/LionKing.png imagebase/artwork/Sega/PrinceOfPersia.png ... imagebase/gameplay/ imagebase/gameplay/NES imagebase/gameplay/NES/Zen.png imagebase/gameplay/NES/Bomberman.png ... imagebase/gameplay/Sega imagebase/gameplay/Sega imagebase/gameplay/Sega/MortalCombat1.png imagebase/gameplay/Sega/LionKing.png ... Note: -PrinceOfPersia.png exists both in NES and Sega - same names are allowed on different platforms -gameplay directory does not contain preview image for PrinceOfPersia. In this case image would be searched in the next icon set directories ("artwork" in this case). Any number of icon sets can be provided - they all should be sorted in the way, which one is more preferable. For example, with 3 icon sets {"gameplay1", "artwork", "gameplay2"} the images would be searched in the following order: first search in "gameplay1", if not found search in "artwork", and the last one "gameplay2" is checked. 2. Support for localized database - the localized (for example rom_info_ru) table would exist with the same id's as in original rom_info. It would contain some fields (the main is description) on the local language. For the fields, which wanted to left unlocalized (game title for example, or developer company name) , the corresponding column values should be left blank - such values would be taken from the orinal table. Also, if some id was not found in the localized table, all info for it would be automatically taken from the original table, so only part of all available games might be localized - other would be in the english language. Remove Alias, Platform etc 3. Support for different preview image directories. 4. Sourceforge descriptions: Romdigger is a small library that would allow to extract info from rom files (images of game cartridges for old game consoles - like dendy, sega, nintendo etc) - game name, description, preview image etc and to view it in kde file browser. It seems to be that currently there are no similar solutions. From the technical side it consists of 2 main parts: 1. The file info extractor library - which would identify the rom file and search its description in the rom info database. 2. Plugins for kde that would show the extracted info in the described kde's parts (in konqueror and in file properties dialog). 5. Autotools: add the following macros to configure.in.in (in kdevelop project for romdigger-kde3) to detect libromdigger.so and romdigger.h files: dnl ----------------------------------------------------------------------- dnl romdigger library check dnl First check for libromdigger itself - show error message and exit if not present dnl romdiggerVersion constant is defined inside libromdigger.so library (romdigger.cc source file): dnl const char* romdiggerVersion = "0.0.1"; AC_CHECK_LIB(romdigger, romdiggerVersion, [], [ echo "Error! You need libromdigger library to be installed." exit -1 ]) dnl Then check for develpment package (romdigger.h header) - show error message and exit if not present AC_CHECK_HEADERS(romdigger.h, [], [ echo "Error! You need romdigger.h to be installed." exit -1 ]) dnl ----------------------------------------------------------------------- TODO: avoid the following warning during ./configure (see http://www.gnu.org/software/automake/manual/autoconf/Present-But-Cannot-Be-Compiled.html): checking romdigger.h usability... no checking romdigger.h presence... yes configure: WARNING: romdigger.h: present but cannot be compiled configure: WARNING: romdigger.h: check for missing prerequisite headers? configure: WARNING: romdigger.h: see the Autoconf documentation configure: WARNING: romdigger.h: section "Present But Cannot Be Compiled" configure: WARNING: romdigger.h: proceeding with the preprocessor's result configure: WARNING: romdigger.h: in the future, the compiler will take precedence checking for romdigger.h... yes Also, make it work, when the romdigger.h is located not in a standard system place (like /usr/include), but also in any other place which is also present in the $CLUS_INCLUDE_PATH - probably this is related to AC_LANG([C++]) or AC_LANG_PUSH and AC_LANG_POP (see http://osdir.com/ml/sysutils.autoconf.general/2003-11/msg00113.html for example) 6. Important!: In the kfile_romdigger.cpp which is mostly autogenerted by KDevelop, change the following line: K_EXPORT_COMPONENT_FACTORY(kfile_RomDigger, RomDiggerFactory( "kfile_romdigger" )) to the following: K_EXPORT_COMPONENT_FACTORY(kfile_romdigger, RomDiggerFactory( "kfile_romdigger" )) without this the file info would never shouw up. 7. See this files #also see the files: #/opt/kde3/lib64/kde3/nesthumbcreator.la #/opt/kde3/lib64/kde3/nesthumbcreator.so #/home/benderamp/.kde/share/services/NESThumbCreator.desktop #/home/benderamp/.kde/share/mimelnk/application/nes.desktop 7. Install strigi module: >cmake . >cp strigiea_romdigger.so /usr/lib64/strigi >xmlindexer myfile check the output 8. Configuration file location is determined following XDG Base Directory Specification - see the http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html 9. Run cmake in the following way: %ifarch i386 i586 i686 cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSYSCONF_INSTALL_DIR=%{_sysconfdir} . %else # x86_64 cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSYSCONF_INSTALL_DIR=%{_sysconfdir} -DLIB_SUFFIX=64 . %endif make make DESTDIR=./root install