#1 support portable devices (USB key)

open
nobody
None
5
2012-09-06
2005-12-30
Anonymous
No

Please send updates to dlkj@myjaring.net

www.portablefreeware.com has a list of applications
that can run off a USB key.
Personally I use an external hard disk on a company
laptop. Same idea, didn't want to install anything on
the company laptop (policy).

Anyway, look at the FAQ on the website for requirements
to qualify as 'portable'. I wanted to submit this to
the website for inclusion.

Current implementation uses registry (no surprise).
However, I am proposing a very minor change to make it
'portable'. A simple check is done upon startup to see
if the 'current directory' has 'comical.ini'. If this
file exists, then it will be used to store all the
settings. The registry or other storage will not be
used. If the file does not exist, then the usual is
done where it is stored on a per user basis. In this
way, the exe can support both types of usage. either
portable type where the settings reside on the USB key
along with the exe or installed on a machine with per
user settings.

I've done all the changes and attached the file.
No big change. 2 files, less than 10 lines of code.

I hope you like the idea and accept the change.

Discussion

  • changed files

     
    Attachments
  • Dennis Lim
    Dennis Lim
    2006-05-20

    Logged In: YES
    user_id=117202

    Compiled binaries for testing are available at
    http://www.savefile.com/files/1045277

    CSDiff format as per below

    30a31

    include <wx fileconf.h="">

    48c49,57
    < wxConfig *config = new wxConfig(wxT("Comical"));


    wxConfigBase *config;
    if(wxFileExists( wxGetCwd()+wxT("\Comical.ini") ))
    {
    config = new wxFileConfig(wxT("Comical"), wxEmptyString,
    wxGetCwd()+wxT("\Comical.ini"));
    }
    else
    {
    config = new wxConfig(wxT("Comical"));
    }