Daniel
Sat Mar 18 08:43:14 CST 2006
> Does this sum it up as the way to go?
Yes, I think so
Cheers
Daniel
--
http://www.danielmoth.com/Blog/
"mobilemobile" <mobilemobile@discussions.microsoft.com> wrote in message
news:DC652414-43BB-44AF-9CED-EF5A17817D58@microsoft.com...
> Thanks Daniel, in particular your article
> (
http://www.danielmoth.com/Blog/2004/09/share-code-if-fullframe_17.html) --
> a
> "Why didn't I think of that?". Of course --
>
> 1) Create separate projects for each target (in same dir)
> 2) Point each project to the same code base
> 3) Create other constants besides the generated PocketPC/Smartphone in
> each
> project
> 4) Conditional compilation to target platform-specific features
> 5) Avoid "Change Target Paltform" completely
> 6) Point each project's build dirs to separate sub-dirs
>
> Does this sum it up as the way to go?
>
> Steve
>
> "Daniel Moth" wrote:
>
>> If you need to have separate binaries for different targets, then you
>> will
>> need separate projects. You can share the code and use conditional
>> compilation for the different code paths. That is what the PocketPC
>> predefined constant is about (and you can define your own). This process
>> is
>> traditionally used for targeting desktop and device but can equally be
>> applied to different device versions as you require:
>>
http://www.danielmoth.com/Blog/2004/09/share-code-if-fullframe_17.html
>>
>> Change Target Platform makes no backup of your project so if you are
>> going
>> to use that make sure you make a manual backup. It is useful for
>> creating/forking a new project typically going from PPC to SP.
>>
>> Cheers
>> Daniel
>> --
>>
http://www.danielmoth.com/Blog/
>>
>> "mobilemobile" <mobilemobile@discussions.microsoft.com> wrote in message
>> news:D5258B7D-0F14-46AD-8309-66137B224161@microsoft.com...
>> >
>> >
>> > "Chris Scott" wrote:
>> >
>> > Thanks for your reply Chris.
>> >
>> >> What language are you developing with?
>> >
>> > VB and NETcf v2
>> >
>> >>
>> >> Here's what I do for C/C++:
>> >> 1. I think there's a preprocessor constant defined that will give you
>> >> this.
>> >> I don't use the predefined ones because I can't trust that Microsoft
>> >> will
>> >> keep them constant so I just define my own. You can define
>> >> preprocessor
>> >> constants by target platform in the project properties.
>> >>
>> >> 2. I build separate EXE's for the separate OS's as it helps to keep
>> >> things
>> >> simpler for me. They build into their own separate directories
>> >> automatically, and my automated build process picks them up and rolls
>> >> them
>> >> into a CAB that's specific to the target OS. I think the 2003 EXE's
>> >> are
>> >> supposed to run on WM5 if you follow all the rules, but I don't know
>> >> if
>> >> it
>> >> works the other way around or not.
>> >
>> > Yeah, that sounds like what I've done in eVC, but VB seems to force you
>> > to
>> > only target one platform at a time. When I "Change Target Platform" VS
>> > closes the project then reopens, so I get the feeling it will only let
>> > me
>> > target one platform at a time, but I'm definitely not sure. I can't
>> > find
>> > options for compile/link by device like eVC.
>> >
>> >>
>> >> "mobilemobile" <mobilemobile@discussions.microsoft.com> wrote in
>> >> message
>> >> news:4D8D1333-BD8C-46C6-A077-8ABB284DFF37@microsoft.com...
>> >> > 1) Is there a constant that I can use to separate PPC2003 from
>> >> > WinMob5?
>> >> >
>> >> > 2) Is there any reason to compile/build with the platform set to
>> >> > WinMob5
>> >> > (rather than PPC2003) when I create the shippable versions? I've
>> >> > read
>> >> > elsewhere here that PPC2003 exe's will run on WinMob5 (assuming I'm
>> >> > not
>> >> > using
>> >> > deprecated classes etc). Are the exe's different? If I should have
>> >> > 2
>> >> > versions (for both PPC2003 and WinMob5) is there any way to tell the
>> >> > project
>> >> > that each should go in different subdirectories?
>> >>
>> >>
>> >>
>>
>>
>>