Re: [fossil-users] visual studio solution and project file for fossil

2016-10-06 Thread Arjen Markus
Hi Kevin,



Well, it may have been me as well who misread it :).



Regards,



Arjen



> -Original Message-
> From: fossil-users [mailto:fossil-users-boun...@lists.fossil-scm.org] On 
> Behalf Of
> arnoldemu
> Sent: Wednesday, October 05, 2016 8:14 PM
> To: fossil-users@lists.fossil-scm.org
> Subject: Re: [fossil-users] visual studio solution and project file for fossil
>
>
> > Fossil's primary use is to keep track of changes in your files, it is not a 
> > build
> system perse. If you want to use Visual Studio, why not use something like 
> CMake:
>
> Hi Arjun,
>
> Thankyou for your reply. Sorry but after reading back my question I don't 
> think I
> worded it well and I didn't make it clear about what I wanted.
>
> I want to build fossil itself because I want to patch it and hopefully submit 
> my
> patches for review.
>
> I see that fossil can be built with a batch file "buildmsvc.bat" which uses 
> the
> command-line visual studio compiler. It uses some kind of custom build where 
> the
> headers which are needed are added to the files and output into a separate
> directory. I don't really understand fully how this works and is a guess from 
> what I
> have seen so far.
>
> I want to make a solution for fossil so I can build fossil under visual 
> studio itself
> from the IDE itself. I can then use the IDE's debugger. I tried to add all 
> the source
> files from inside the src directory but that didn't work. So I then ran the 
> batch file,
> waited for it to build and then used the source files from the msvcbld and 
> that didn't
> seem to work either.
>
> So I have failed so far and wondered if anyone has made a solution and if 
> they did,
> how did they do it?
>
> The second question was:
> - Is there a way I can modify (or pass a parameter) to the buildmsvc.bat to 
> make a
> "debug" build without the compiler doing optimisations and with it generating 
> a
> debug pdb. I could also debug fossil from within visual studio this way.
>
> Thanks
>
> Kevin
>
>
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited. 
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] visual studio solution and project file for fossil

2016-10-05 Thread Ross Berteig

On 10/5/2016 3:27 PM, Richard Hipp wrote:

On 10/5/16, Ross Berteig  wrote:

Note that building for 64-bit needs something trickier than just
following that recipe from a 64-bit VisualStudio prompt.

Really?  Because just typing "nmake /f makefile.msc" from a 64-bit
VisualStudio prompt works fine for me on Windows10 with VS2012.

I have VS2010 installed here. It is possible I was fooled by not having 
a clean enough workspace.


Certainly, having zlib already built by a previous 32-bit compile wasn't 
helping. I tried to work around that by also setting 
FOSSIL_ENABLE_MINIZ=1 which did allow a clean compile and link. The 
resulting fossil.exe ran, at least fossil version -v worked. I did not 
run the test suite.


But handing it to DEPENDS.EXE to see what DLLs it was really linked 
against showed a mix of 32-bit and 64-bit DLLs. That might be a red 
herring, and does seem odd to me given that the program does run at all.


I certainly can try running the test suite over that fossil, and see 
what happens. I'll try that later tonight and report back.


--
Ross Berteig   r...@cheshireeng.com
Cheshire Engineering Corp.   http://www.CheshireEng.com/
+1 626 303 1602

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] visual studio solution and project file for fossil

2016-10-05 Thread Richard Hipp
On 10/5/16, Ross Berteig  wrote:
>
> Note that building for 64-bit needs something trickier than just
> following that recipe from a 64-bit VisualStudio prompt.

Really?  Because just typing "nmake /f makefile.msc" from a 64-bit
VisualStudio prompt works fine for me on Windows10 with VS2012.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] visual studio solution and project file for fossil

2016-10-05 Thread Ross Berteig


On 10/5/2016 11:30 AM, Richard Hipp wrote:

On 10/5/16, arnoldemu  wrote:

I see that fossil can be built with a batch file "buildmsvc.bat" which uses
the command-line visual studio compiler. It uses some kind of custom build
where the headers which are needed are added to the files and output into a
separate directory. I don't really understand fully how this works and is a
guess from what I have seen so far.

To build using msvc from the command-line:

 cd win
 nmake /f makefile.msc


To get a debug build, just add DEBUG=1 to the nmake command. You might 
want that to be a clean build the first time so that you get everything 
built for debugging. You should be able to just use the resulting EXE 
and PDB files in Visual Studio.


In a 32-bit VisualStudio command prompt where all the compiler tools are 
available:


C:>cd win
C:>nmake /f makefile.msc DEBUG=1

Note that building for 64-bit needs something trickier than just 
following that recipe from a 64-bit VisualStudio prompt. Fossil will 
build, but the resulting executable seems to be linked to a mix of 
64-bit and 32-bit DLLs, and that can't possibly be the right answer.


Personally, I've never built fossil other than 32-bit on Windows (and 
usually using GCC via MinGW) and I've never had any issues with it not 
being a 64-bit build.


There are other configuration options you can choose in a similar way, 
see the start of Makefile.msc for the complete list.


--
Ross Berteig   r...@cheshireeng.com
Cheshire Engineering Corp.   http://www.CheshireEng.com/
+1 626 303 1602

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] visual studio solution and project file for fossil

2016-10-05 Thread Steven Gawroriski
On Wed, 5 Oct 2016 15:40:46 -0400
Steven Gawroriski  wrote:

> Hello,
> 
> On Wed, 5 Oct 2016 20:13:36 +0200 (CEST)
> arnoldemu  wrote:
> 
> > I want to make a solution for fossil so I can build fossil under
> > visual studio itself from the IDE itself. I can then use the IDE's
> > debugger. I tried to add all the source files from inside the src
> > directory but that didn't work. So I then ran the batch file, waited
> > for it to build and then used the source files from the msvcbld and
> > that didn't seem to work either.
> > 
> > So I have failed so far and wondered if anyone has made a solution
> > and if they did, how did they do it?
> 
> On Wed, 5 Oct 2016 14:30:34 -0400
> Richard Hipp  wrote:
> 
> > Fossil uses a great deal of generated code.  IDEs such as Visual
> > Studio, on the other hand, are usually built around the assumption
> > that all code is hand-written.  Generated code is a more powerful
> > concept, and ultimately makes development easier and less error
> > prone. But since IDEs do not support it well, I think you will have
> > difficulty putting together a "solution" for Fossil.
> 
> Although it has been awhile since I last touched MSVC (I use Linux
> now), what you would want is to setup a custom build rule in the MSVC
> solution. Basically you can add an input source file which when ran
> through the rule produces the resulting source code or alternatively
> translates the source and then compiles it. The only issue would be
> that you may have to have a set of virtual files and dependencies for
> these autogenerated files if you do not want to do complete rebuilds
> each time you want to compile.
> 
> Depending on the maintainability requirements of the MSVC solution,
> one that would require minimal maintaining is to just have a complete
> build every time (always out of date), source code files that all use
> a build rule that effectively does nothing, and a custom build step
> which basically calls the batch file that exists at the root of the
> Fossil repository. With a base template and a script (such as a POSIX
> shell script), if a new source code file is added the script could be
> ran which generates a new MSVC solution as required (and commit that
> to the repository).

Or instead of doing all of that, you could just have the project use
the makefile that exists in `win/` and basically not worry about
everything else. You would still need to specify the output executable
name I believe (needed for debugging) along with arguments for
execution and the working directory.

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] visual studio solution and project file for fossil

2016-10-05 Thread Steven Gawroriski
Hello,

On Wed, 5 Oct 2016 20:13:36 +0200 (CEST)
arnoldemu  wrote:

> I want to make a solution for fossil so I can build fossil under
> visual studio itself from the IDE itself. I can then use the IDE's
> debugger. I tried to add all the source files from inside the src
> directory but that didn't work. So I then ran the batch file, waited
> for it to build and then used the source files from the msvcbld and
> that didn't seem to work either.
> 
> So I have failed so far and wondered if anyone has made a solution
> and if they did, how did they do it?

On Wed, 5 Oct 2016 14:30:34 -0400
Richard Hipp  wrote:

> Fossil uses a great deal of generated code.  IDEs such as Visual
> Studio, on the other hand, are usually built around the assumption
> that all code is hand-written.  Generated code is a more powerful
> concept, and ultimately makes development easier and less error prone.
> But since IDEs do not support it well, I think you will have
> difficulty putting together a "solution" for Fossil.

Although it has been awhile since I last touched MSVC (I use Linux
now), what you would want is to setup a custom build rule in the MSVC
solution. Basically you can add an input source file which when ran
through the rule produces the resulting source code or alternatively
translates the source and then compiles it. The only issue would be
that you may have to have a set of virtual files and dependencies for
these autogenerated files if you do not want to do complete rebuilds
each time you want to compile.

Depending on the maintainability requirements of the MSVC solution, one
that would require minimal maintaining is to just have a complete build
every time (always out of date), source code files that all use a build
rule that effectively does nothing, and a custom build step which
basically calls the batch file that exists at the root of the Fossil
repository. With a base template and a script (such as a POSIX shell
script), if a new source code file is added the script could be ran
which generates a new MSVC solution as required (and commit that to the
repository).

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] visual studio solution and project file for fossil

2016-10-05 Thread Richard Hipp
On 10/5/16, arnoldemu  wrote:
>
> I see that fossil can be built with a batch file "buildmsvc.bat" which uses
> the command-line visual studio compiler. It uses some kind of custom build
> where the headers which are needed are added to the files and output into a
> separate directory. I don't really understand fully how this works and is a
> guess from what I have seen so far.

To build using msvc from the command-line:

cd win
nmake /f makefile.msc

A description of the build process is found in
https://www.fossil-scm.org/fossil/doc/trunk/www/makefile.wiki

Fossil uses a great deal of generated code.  IDEs such as Visual
Studio, on the other hand, are usually built around the assumption
that all code is hand-written.  Generated code is a more powerful
concept, and ultimately makes development easier and less error prone.
But since IDEs do not support it well, I think you will have
difficulty putting together a "solution" for Fossil.

You can run Fossil in the visual studio debugger.  Joe showed me how
to do that once.  I could probably fumble my way through doing it
again, but I'm not comfortable trying to describe the process.  But
basically, you build the fossil.exe using nmake, then you fire up
Visual Studio to single-step through the code.  This gives you the
best of both worlds.  You can use powerful generated code techniques
from the command-line to construct the executable.  Then you can use
your nice GUI interface for single-stepping through the code to figure
out why it isn't working.

>
> I want to make a solution for fossil so I can build fossil under visual
> studio itself from the IDE itself. I can then use the IDE's debugger. I
> tried to add all the source files from inside the src directory but that
> didn't work. So I then ran the batch file, waited for it to build and then
> used the source files from the msvcbld and that didn't seem to work either.
>
> So I have failed so far and wondered if anyone has made a solution and if
> they did, how did they do it?
>
> The second question was:
> - Is there a way I can modify (or pass a parameter) to the buildmsvc.bat to
> make a "debug" build without the compiler doing optimisations and with it
> generating a debug pdb. I could also debug fossil from within visual studio
> this way.
>
> Thanks
>
> Kevin
>
>
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>


-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] visual studio solution and project file for fossil

2016-10-05 Thread arnoldemu

> Fossil's primary use is to keep track of changes in your files, it is not a 
> build system perse. If you want to use Visual Studio, why not use something 
> like CMake: 

Hi Arjun,

Thankyou for your reply. Sorry but after reading back my question I don't think 
I worded it well and I didn't make it clear about what I wanted.

I want to build fossil itself because I want to patch it and hopefully submit 
my patches for review.

I see that fossil can be built with a batch file "buildmsvc.bat" which uses the 
command-line visual studio compiler. It uses some kind of custom build where 
the headers which are needed are added to the files and output into a separate 
directory. I don't really understand fully how this works and is a guess from 
what I have seen so far.

I want to make a solution for fossil so I can build fossil under visual studio 
itself from the IDE itself. I can then use the IDE's debugger. I tried to add 
all the source files from inside the src directory but that didn't work. So I 
then ran the batch file, waited for it to build and then used the source files 
from the msvcbld and that didn't seem to work either.

So I have failed so far and wondered if anyone has made a solution and if they 
did, how did they do it?

The second question was:
- Is there a way I can modify (or pass a parameter) to the buildmsvc.bat to 
make a "debug" build without the compiler doing optimisations and with it 
generating a debug pdb. I could also debug fossil from within visual studio 
this way.

Thanks

Kevin


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] visual studio solution and project file for fossil

2016-10-05 Thread Arjen Markus
Fossil's primary use is to keep track of changes in your files, it is not a 
build system perse. If you want to use Visual Studio, why not use something 
like CMake: that can generate VS files from the description of your programs 
(CMakeLists.txt files and the like or plain Makefiles if you prefer them). 
These CMake files can in turn be maintained with Fossil, just as source code.



Regards,



Arjen



From: fossil-users [mailto:fossil-users-boun...@lists.fossil-scm.org] On Behalf 
Of arnoldemu
Sent: Wednesday, October 05, 2016 8:59 AM
To: fossil-users@lists.fossil-scm.org
Subject: [fossil-users] visual studio solution and project file for fossil

Hi

I am not familiar enough with the fossil build system so I hope somebody can 
answer these questions.

Is there a way to generate a visual studio solution and project file from the 
fossil source which I can then load up in visual studio 2015 community edition?

Or an alternative: is there a way to generate a debug build with pdbs which I 
can debug through visual studio?

I used to using visual studio for debugging and it would help me to finish my 
gmerge patch.

Thank you

Kevin


DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited. 
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] visual studio solution and project file for fossil

2016-10-05 Thread arnoldemu
Hi

I am not familiar enough with the fossil build system so I hope somebody can 
answer these questions.

Is there a way to generate a visual studio solution and project file from the 
fossil source which I can then load up in visual studio 2015 community edition? 

Or an alternative: is there a way to generate a debug build with pdbs which I 
can debug through visual studio?

I used to using visual studio for debugging and it would help me to finish my 
gmerge patch.

Thank you

Kevin



___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users