Joe Cincotta: Thoughts and such…

Icon

Nerdism for the masses.

Essential nAnt Utilities from Pixolüt

Download the nAnt Utilities from here

This is a set of nAnt includes which we use in our build pipeline which I thought may be helpful to other developers using .Net and nAnt… Download them and give them a shot…

Whats included:

build.include handles .Net compilation of projects of any size and also provides build output and error management. This also allows for multiple .Net platforms to be targetted from a single nAnt script, which is something nAnt does not do natively.

ftp.include handles automated FTP of files to a server from within nAnt

prenis.include processes a Nullsoft Scriptable Install System (NSI) file using the PreNIS pre-processor.

svn.include will do most automated gets and checkouts including automated version labels on tags using SubVersion. This is a very useful incude since the current Subversion support in nAnt is rather poor.

How to use them:

These properties are used for all scripts:
<property name="include.path" value=".\InstallScripts\targets" />
<property name="nant.contrib" value="c:\nant\contrib\bin\nant.contrib.tasks.dll" />

These properties are used for the build.include
<property name="solution.config" value="debug" />
<property name="compiler.target2003" value="C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exe" />
<property name="compiler.target2005" value="C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" />

These properties are set for ftp.include which also needs the ftp_mostrecent.bat file as well as the other parameters defined in the actual .include file for logging in.
<property name="ftp.executable" value="${include.path}\ftp_mostrecent.bat" />

These properties are set for prenis.include
<property name="prenis.executable" value="${include.path}\prenis.exe" />

These properties are set for svn.include and also you will require a command line version of subversion and also the GetAssemblyVersion.exe file which is included in the utilities pack.
<property name="svn.executable" value="C:\Program Files (x86)\CollabNet Subversion\svn.exe" />
<property name="svn.assemblyparser" value="${include.path}\GetAssemblyVersion.exe" />
<property name="svn.versionsrc" value="${include.path}" />
<property name="svn.username" value="username" />
<property name="svn.password" value="password" />
<property name="svn.baseuri" value="svn://subversion.pixolut.com/myrepository" />

Use the following to include the include files in your build script.


<include buildfile="${include.path}\ftp.include" />
<include buildfile="${include.path}\svn.include" />
<include buildfile="${include.path}\prenis.include" />
<include buildfile="${include.path}\build.include" />

Filed under: Open Source, pixolut, PreNIS, Software Development

PreNIS 1.2 Released with Visual Studio 2008 support!

PreNIS 1.2 has been released and it contains some minor changes so that the PreNIS engine will recognise new Visual Studio 2008 projects and handle them as it does Visual Studio 2005 projects. 
 
As the differences between VS2005 and VS2008 projects appear minimal on initial inspection, Prenis should work with both, though we will continue to monitor this.

Special thankyou to Stephen for updating the latest rev of PreNIS and getting it live so quick…

Filed under: Open Source, PreNIS

PreNIS 1.1 Released

This version of the Nullsoft Install System Pre-Processor is built for .Net framework 2.0 and all source has been migrated to build under .Net 2.0 and Visual Studio 2005

UPDATES TO THIS VERSION FROM 1.0.3

+ 1.0.3 added the ability to have recursive includes – so that all
dependant DLLs could be grabbed from all projects which are used by
the referenced one. This concept has been extended to the macro
language so that you can dynamically choose to recurse projects.

+ We have added some new arguments for the macro.bin Macros – now
you can use the following:

includeProjects = [true|false]
* this will include all DLLs which are from the project(s).

includeReferences = [true|false]
* this will include referenced DLLs

recursive = [true|false]
* this will set the recursion through all dependancies capability.

Example:

##macro.bin;
assembly = Mobux.Web.Public;
includeProjects = true;
includeReferences = false;
##
File /nonfatal "%%absfilename%%"
##
macro.end
##

+ The final thing that we did in this release was make the script language
MUCH more tolerant of white space. As you can see in the above example you
can now split macros, imports or any command across lines and have as much
white space as you desire in your scripts. You can also use any case you
like with commands.

For more information on PreNIS you should go to the following places:

1. Learn about it at http://www.pixolut.com/prenis

2. Find out about NSIS http://nsis.sourceforge.net/

3. Contribute to the project at http://www.sourceforge.net/projects/prenis/

Filed under: Open Source, pixolut, PreNIS, Software Development

New releases coming next week: PreNIS2 and BizBlox Builder

We have been busily migrating our core technologies from .Net 1.1 to .Net 2.0 – that is nearly two million lines of code across several projects and I have to say that it is testament to the Visual Studio 2005 environment that it has taken two developers less than a week to complete most of the migration. Increadible…

 Whilst we were at it, we found that there were some tools which had been left behind and needed a refresh:

 PreNIS, the NullSoft Install System pre-processor is going to version TWO next week. It now supports Visual Studio 2005 projects and also supports more advanced developer UI suites like Infragistics where they do not always ‘copy local’ all of the DLLs, but they are needed for web deployment.

The other product which desperately needed a refresh was the BizBlox Builder. Since the open source API went to version 1.4 it has supported Visual Studio 2005, however the Builder has not supported the newer SQL Schema of SQL2005 until now. You can now dynamically create thousands of lines of ORM code from the Builder using either SQL2000 or SQL2005 generated scripts.

Final testing is next week and releases will be up by then. If you’re really keen you can check out the current trunk on PreNIS to see what the new verison is capable of.

Filed under: BizBlox, Open Source, PreNIS, Software Development

Big News for 2007

Lots happening for Pixolüt in 2007.

Firstly, I would like to let you know that we will be releasing the BizBlox API on SourceForge as an Open Source project. The BizBlox Builder will remain the commercial developer product that it is, however given the existing flexible license which the BizBlox API used, we decided that it made sense to convert the API and library to an LGPL and release it to the open source community.

There are several benefits in doing this which will benefit all users and customers using BizBlox. First of all, it allows other code generation systems to be used on the BizBlox platform and not just our BizBlox Builder. Secondly, it opens our code to public scrutiny – yet allows for our continued control over the direction of the platform – allowing for a more robust and secure product. Finally, it allows access to the technology to the greater developer community and that’s always a good thing.

So what is the commercial benefit of selling the BizBlox Builder software if the most important part is free? Well, BizBlox Builder has been designed to integrate with the BizBlox library from the beginning, it comes with loads of example code in C# and VB.Net and also integrates with Visual Studio natively. We also provide enterprise support for our customers. All in all, as the director of Pixolüt and chief architect of the BizBlox ORM I feel like we have made right decision in opening the platform to the developer community and I hope many people can benefit from our research and development over the past three years.

We will have binary releases and the SubVersion repository ready for use by mid-January.

Pixolüt will also be releasing PreNIS under the LGPL as another project on SourceForge within the next couple of months and we aim to have a .Net 2.0 / VS2005 version of it ready for April.

Filed under: BizBlox, Open Source, pixolut, PreNIS

Our PreNIS Page on SourceForge!

We have a dedicated PreNIS page on SourceForge and also have set up new project pages for PreNIS at Pixolut here.

Thanks for Stephen for making these happen!

Filed under: Open Source, PreNIS

Real World Example Using PreNIS

Download this example NSI file: Mobux.nsi to see how easy it is to use PreNIS in your project. We use PreNIS as an integral step in the build pipelines we create using nAnt. It means that the entire project is managed from the Visual Studio IDE without the need to modify external files.

Filed under: PreNIS

Download PreNIS 1.0.1

Download

Filed under: Open Source, PreNIS

PreNIS 1.0.1 Beta update

Major changes are:

1. Changed the macro.dll command to macro.bin (macro.dll is still supported) since the command includes exe as well as dlls…

2. Much better error reporting. Helps understand syntax errors better than previously.

3. Miscellaneous directory bugs fixed

Filed under: Open Source, PreNIS

PreNIS 1.0 – The NSIS PreProcessor for .Net

Download PreNIS 1.0 Beta

The PreProcessor for the NullSoft Installer System.

1. Why make a Pre-Processor for NSIS?

We at Pixolüt ONLY use NSIS for deployments. We have .Net user applications and also
server deployments which all use NSI scripts.

The only problem with using an external installer system, especially a scipt based one is that its painful to manage the sync between the project file and the installer script to ensure that only required DLLs and content files are included. Also, every time a new DLL, file or folder is added to the project, the install script needs to be updated.

What about version information – that needs to come from somewhere too!

Wouldn’t it be great to be able to use the .Net project file to dynamically create the NSI file whilst having all the power and features of NSIS? Well, with PreNIS you can. PreNIS provides a simple set of macro tags which will expand out and repeat for all folders or files specified and create a new NSI file which contains all correct files in the project.

2. Usage

prenis.exe “-source=c:\my project\installer\install.nsi” -target=c:\output.nsi

-source
source (input) nsi file

-target
target (output) nsi file

-help
shows a simple help text

To use quotes around a filename, make sure you use quotes around the argument too
“-source=bah bah” is correct
-source=”bah bah” is not correct

3. Script Documentation
All commands follow the format:
##command##
where they start and end with ## to specify the preprocessor arguments.
Arguments are sperated by the ; character and use argument=value format.
Arguments can be split over multiple lines

##command;
 arg=value;
 arg2=value##

The Import command


##import;
 project=filename of project file;
 folder=path to project files;
 config=Debug##

The folder argument is optional and not used if the project file is in the base folder of the project file.

Macro commands
In between a macro, you can put any NSI commands and use the macro-variables.
The macro-variables work as follows:

 %%absfilename%%  insert the absolute filename ie: c:projectmyfile.txt 

 %%abspath%%insert the absolute path ie: c:project %%outpath%%insert the relative path ie: project %%filename%%insert the filename only ie: myfile.txt 

 %%relfilename%%insert the relative path and filename ie: projectmyfile.txt which is equivalent to %%outpath%%%%filename%%

macro.dll will insert all DLLs for the specified assembly. Ensure all dependant projects are also imported!


##macro.dll;assembly=assembly name##
 %%absfilename%%
 %%abspath%%
 %%outpath%%
 %%filename%%
 %%relfilename%%
##macro.end##

macro.pdb will insert all PDB files for the specified assembly. Ensure all dependant projects are also imported!

##macro.pdb;assembly=assembly name##
 %%absfilename%%
 %%abspath%%
 %%outpath%%
 %%filename%%
 %%relfilename%%
##macro.end##

macro.contentfolders will iterate through all folders for the specified project.
You can insert the macro.content macro inside a macro.contentfolders macro to expand out for each content file in each directory. the %%filename%% and %%abspath%% variables will act strange inside the contentfolders macro since they specify folders not files.

##macro.contentfolders;assembly=assembly name##
 %%absfilename%%
 %%abspath%%
 %%outpath%%
 %%filename%%
 %%relfilename%%
 ##macro.content##
  %%absfilename%%
  %%abspath%%
  %%outpath%%
  %%filename%%
  %%relfilename%%
 ##macro.end##
##macro.end##

macro.content will iterate through all files in the project if not used inside a contentfolders macro

##macro.content;assembly=assembly name##
 %%absfilename%%
 %%abspath%%
 %%outpath%%
 %%filename%%
 %%relfilename%%
##macro.end##

You can exclude or include specific files using the exclude or include commands inside a macro. The names allow wildcards either *name, name* or *name* to specifiy part of a filename. You can only use exclude or include exclusively, since by using the include command will automatically EXCLUDE ALL FILES except the files included. The Exclude command with INCLUDE ALL FILES except the ones excluded by the exclude commands.

You can have multiple of the same kind inside a single macro.


##exclude;filename=*config*##
##include;filename=config*##

The version command will take the version number from the assemblyinfo.cs (assemblyinfo.vb) for the specified assembly. The assembly must be imported first.

##version;assembly=assembly name;delimiter=.##

Filed under: Open Source, PreNIS

Follow

Get every new post delivered to your Inbox.