From: Francesco M. <f18...@ya...> - 2009-03-18 15:02:29
|
Hi, Frans Schreuder ha scritto: >> Also, distributing the XML files would encourage the user to complete them with >> the missing info for their favourite PIC models (e.g. many names of pins in the >> <package> tags are missing...). >> >> Btw before releasing an upp_wx version which uses Piklab XML files it would be >> nice to inform Piklab developers of this (and we may periodically post them the >> diffs between our XML files and theirs, so that both projects can converge to a >> correct database of PICs info). >> > Of course, I'll contact Nicolas Hadacek about it. thanks - I saw your mail. >>> I know that loading the xml files at runtime has some advantages, eg >>> that you can edit them without having to recompile the program, but I am >>> sure that it will bring some problems especially when we are talking >>> about cross platform development... >>> >> sorry, which problems could it bring? >> I'm using XML files in various other (cross-platform, wx-based) projects and I >> never had troubles... >> > Well, I was just thinking about the location, we really have to think > where the files are being placed. >Linux puts them in > /usr/share/usbpicprog/... or usr/local/share/usbpicprog/... > Windows would put them somewhere in program files and mac will put them > in the .app bundle. It's not impossible but it takes some different > scripts and a lot of testing. This shouldn't be a big problem: wxStandardPaths::GetDataDir() returns the platform-specific correct path for such type of stuff. I've just committed a fix and now usbpicprog installs and works fine under linux. Unfortunately I cannot test on Mac. I'll test on Windows soon (but I'm not used to InstallJammer and thus I won't touch the installer :)). Btw I have (mostly) completed the new GUI (basically it's just using an array of wxChoice controls for all flags -- I emulated Piklab in this) but I need some help with the "backend" part :) First I'd like to discuss the Config[Value|Mask|Block] classes I've added to pictype.h; their names are probably not ideal (suggestions welcome) and also their member names are not ideal :) In particular I'd like not to use "Value" name as in reality those classes should only contain the description of the configuration flags of a PIC, not the actual configuration values (just like the Pic class stores description of a PIC model, but the real code/config/data bytes are stored in the HexFile class). After that, we need to - remove the Pic::ConfigMask[] field and update Hardware class to use newer config flags classes - correctly initialize values of the choice controls loading them from the hex file in UppConfigViewBook::SetHexFile - correctly modify the UppConfigViewBook::m_hexFile instance in UppConfigViewBook::OnChange These things are going to require me more knowledge about the exact meaning of the values stored in the Piklab files (some of them are not clear to me) and some bit-by-bit operations. If you have time to help, it would be very welcome :) Thanks, Francesco -- |