I need help trying to figure out how use my development machine for both development and test install. I started building an install and I'm running into a "chicken-and-an-egg" thing.

I need help trying to figure out how use my development machine for both development and test install. I started building an install and I'm running into a "chicken-and-an-egg" thing. 

I'm using the "{CSIDL_COMMON_APPDATA}\CCMath" path to store the database for my application.

I don't want to build an installer that overwrites the "{CSIDL_COMMON_APPDATA}\CCMath" path and all the contents because that is the same location I use for development.

There's got to be a way to initialize a different CSIDL path depending on if I'm running the program on my development machine.

Comments

  1. Have you tried virtualization? You could have a testing machine sandboxed in your own machine behaving just like your customer's one.
    Most important, as a virtual machine, it will be unaware of your developing machine. I suggest you to use Oracle's Virtualbox, very light, fast and free!

    ReplyDelete
  2. {$ifdef debug}
    MyDBPath := 'c:\users\MichaelRiley\';
    {$else}
    MyDBPath := {CSIDL_COMMON_APPDATA}\CCMath;
    {$endif}

    ReplyDelete
  3. I would use a virtual machine, just as Heinz Toskano said. Very useful things and quite quick to set up. For testing, you would probably find the ability to make a snapshot and restore the VM to that snapshot very useful too.

    ReplyDelete
  4. I use VM's for everything, from development to testing.

    Always test your new installs in a "fresh" OS install, without a prior installation.

    Always test updates on a "clean" OS with just your app installed.

    Avoid confusion(s) by using VM's and all the powerful features that come with it => snapshots, ability to pause-resume in a very short time, ability simply delete without losing data, ability to test with or without network connection almost instantly, copy-past of data from one VM to another and host, etc. there are way too many upsides of using a VM rather than doing it on host system -- which I try to keep as clean as possible => only browser, VMWare and notepad++ installed...

    P.S. you also have the ability to test how your app works on a system with limited resources: cpu cores, ram, disk, etc. you can easily control all these factors for a real-world test.

    ReplyDelete
  5. Not to mention that you can test against several OS.

    ReplyDelete
  6. Thank you everyone for your input.

    ReplyDelete
  7. Do what Delphi does. Use a command line arg to redirect when developing.

    ReplyDelete

Post a Comment