creating winmerge with python

Main development forum.

creating winmerge with python

Postby matthias1955 » Wed Dec 17, 2008 2:06 pm

I'm using VS2008.
I'm trying to use the script to create winmerge, but I don't get it running.

1. fault , as in info we should be abre to start from two different position. Therefore in the script
"create_release.py" we must interchange to this.

# Check all required tools are found (script configuration)
if check_tools() == False:
sys.exit()


# Check we are running from correct folder (and go to root if found)
if find_winmerge_root() == False:
print 'ERROR: Cannot find WinMerge root folder!'
print 'The script must be run from WinMerge tree\'s root folder'
print '(which has Src- and Filter -folders as subfolders) or from'
print 'Tools/Scripts -folder (where this script is located).'
sys.exit()

# Check 64-bit ShellExtension is compiled
if check_x64shellext() == False:
sys.exit()
so it will start from both catalogs ok.

2. I found in Postbuild.bat the env _ACP_ATLPROV is empty,
therefor we will miss some files to run the link correctly.
3. run "BuildManualChm.bat "to craete the help is not working as expected.
error "com/ICL/saxon/stylesheet" not found.


Matthias
matthias1955
 
Posts: 162
Joined: Wed Dec 17, 2008 1:55 pm

Re: creating winmerge with python

Postby kimmov » Wed Dec 17, 2008 2:40 pm

Matthias1955 wrote:I'm using VS2008.
I'm trying to use the script to create winmerge, but I don't get it running.


This isn't really even supposed to work (and you definitely are first one trying to do this). And the real question is why would you want to create WinMerge release from Visual Studio? Things definitely go complex with this, there are many external programs run etc.

If you just want to compile everything (manuals etc), I think we should create new script for that (which can be then used by the release script).

And the create_release.py really is an hacky script I made for myself to make creating releases easier and faster. I really don't know if it works for others. I've never heard anybody else using it... And the script makes many assumptions about environment.

If command/script is run from Visual Studio build steps, is the environment for it similar than for commands run from Visual Studio Command Prompt?

Matthias1955 wrote:1. fault , as in info we should be abre to start from two different position. Therefore in the script
"create_release.py" we must interchange to this.


[Code removed]

Sorry I don't understand the point of this change? Just changing the order of if blocks fixes something?


Matthias1955 wrote:2. I found in Postbuild.bat the env _ACP_ATLPROV is empty,
therefor we will miss some files to run the link correctly.


When running from Visual Studio?

Matthias1955 wrote:3. run "BuildManualChm.bat "to craete the help is not working as expected.
error "com/ICL/saxon/stylesheet" not found.


You must install our Manual tools from downloads section as documented here. Look at the end of the page. There is a link to downloads too.
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Re: creating winmerge with python

Postby kimmov » Wed Dec 17, 2008 6:53 pm

Ok, Matthias sent me private mail explaining things.

Problem with #1 was that the script checked for X64 shellextension files before going to root folder. I've now fixed this bug in SVN trunk (r6183).

Problem with #2 is that VS seems to set the env variable we use to determine if Src/PreLink.bat gets called from VS6 or from some later VS version.

Since VC6 is now deprecated as compiler I'll submit a patch that removes these checks and code to support VC6 in PreLink.bat.
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Re: creating winmerge with python

Postby kimmov » Sun Dec 21, 2008 12:24 pm

Things advance.. :)

Matthias has sent me lot of good feedback, comments and questions about releasing. Unfortunately I can't paste it all here. But few points:

#1 Release script was always exporting from local workspace though I've claimed it did a export from SVN repository. So we added new config variable for script which allows setting the repository url or local workspace from where to export.

#2 I've added new document /Docs/Developers/Releasing.html which documents how to make WinMerge releases. It is still work in progress bug I'll keep updating it.

#3 We haven't actually documented all dependencies anywhere for all tools that are needed. I'm not sure where these would be good to list. One should remember that just building libraries and executables doesn't require so many tools as installer, documentation etc require their own tools.

#4 Current release script assumes one uses VS2003. If we do export from SVN we can't build it with other VS versions as the solution/project files are for VS2003. Mattias found this script conversion script. Its JS so I'm not sure how well it integrates to other tools. But worth looking definitely.

#5 VS doing the project file conversion misses adding external manifest files to project files. There is a Python script (Tools/Scripts/fix_manifest.py) adding the manifest options to converted project files.

#6 If we export clean source folder, we can't build release in it since manual tools are missing. I think this is pretty easy to handle in release script.
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Re: creating winmerge with python

Postby matthias1955 » Mon Dec 22, 2008 10:07 am

Now I got it silenced.

This now is working as you will like it also.

I have also add my setup for 2005/2008.
It also installs needed files, whitch aren’t included by winmerge. :=)

For the runtime you can add the path to a ini file.
So we can copy from there, we have only to check for
version of VS. But i think one more Parameter in release_script will be better, as we can select there whitch version we wont.
I also found a prog which will downgrade vcproj from version VS7 to VS6!
It's called "Magic VC7ToVC6".

Than we must modify also confic.is, can be done by a second parameter.
Convert.is
var vcProj = new ActiveXObject("VisualStudio.VCProjectEngine.9.0");
this line is importend, it's related to the VSxxxx
If a convert is not needed, nothing happened. Just only opend and closed.
If needed, convert to the given version(vcProj)! Opend convert closed.
The "sln" is needed only from IDE so far as I know.

To do the last steps shouldn't be to difficult now.

Matthias
matthias1955
 
Posts: 162
Joined: Wed Dec 17, 2008 1:55 pm

Re: creating winmerge with python

Postby kimmov » Mon Dec 22, 2008 12:51 pm

matthias1955 wrote:Now I got it silenced.

This now is working as you will like it also.


I'm not yet sure it is what we really need. The script (and build) system needs still a lot of work to get it more generalized. Its no point to add just another special case (in addition to special case for my need making releases). Just using different VS version seems a bit hard at the moment, not only for copying files, but also modifying the installer to include correct files.

And while we perhaps want to parametrize installer from the release script we must keep installer to be able to run outside the script.

matthias1955 wrote:I have also add my setup for 2005/2008.
It also installs needed files, whitch aren’t included by winmerge. :=)


This is one policy change we may need to make (discussed in private mails). Instead of having VS runtime files in source control, we perhaps should just configure paths for them in user's system. If user has proper VS installation there are VS runtime files too. And those runtime files can be also downloaded from MS. I definitely don't want multiple versions of runtime files in SVN.

matthias1955 wrote:For the runtime you can add the path to a ini file.
So we can copy from there, we have only to check for
version of VS. But i think one more Parameter in release_script will be better, as we can select there whitch version we wont.


Release script should not have too many parameters. If its too hard to use, then there will be just different kind of errors in making releases. Forgotten parameters etc, or we'll create a batch file to call the script with correct parameters... I'd prefer adding config variables that can be changed into the script or adding new ini file (release.ini?) which contains release-specific config.

matthias1955 wrote:I also found a prog which will downgrade vcproj from version VS7 to VS6!
It's called "Magic VC7ToVC6".


I'm not really interested about that kind of tool as we don't support VC6 anymore. But perhaps we can add link to it somewhere in case somebody still wants to try to compile WinMerge with VC6.

matthias1955 wrote:Than we must modify also confic.is, can be done by a second parameter.
Convert.is
var vcProj = new ActiveXObject("VisualStudio.VCProjectEngine.9.0");
this line is importend, it's related to the VSxxxx
If a convert is not needed, nothing happened. Just only opend and closed.
If needed, convert to the given version(vcProj)! Opend convert closed.


Hmm. So we could just run that conversion script for all vcproj files in the WinMerge sources..

Please submit your changes as a patch to patch tracker.
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland


Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests

cron