Well I wasnt going to add anything more to this thread.  But seeing as I
started it here is my last words - albeit long on the topic.


In the end of the day until the documentation is sorted out the key players
in Wix will be answering the same questions over and over again – for ever -
or they get sick of doing so and give up.

The underlying structure of Wix is there - but it seems more like coding in
assembler than a high level language.  It isn’t really shielding people from
the intricacies of the underlying MSI data base. And MSI may be the source
of a lot of the frustration - but Wix is what people see....

Common problems people have seem to be things like creating icons, shortcuts
and conditional syntax.   All the basic building blocks.  These are the
things that people coming from a C++ VB etc background rather than an MSI
background need to know. BTW these guys are the majority of potential users.
People who have written an app and now need an installer - who don’t work
for a company that they can convince to pay the $500+ for a commercial one.


My main problem over the last few weeks has been say for example I want to
create a shortcut.  I go to the Schema – shortcut isn’t there.  I search
nabble for shortcut and get a huge pile of references – none of them
complete.  I search google and find what looks like an example.  I try that
and it doesn’t like the syntax of the identifier of the file . Ok so I look
at what I have done.  I have defined a file, created a reference to it, now
I want to use that reference to the file I have just loaded which contains
the icon I want to use  - how do I do it? – I don’t want to have to hardcode
the reference to the file every time I use the icon.  I again search google,
nabble etc and find things like [!FileName] [#FileName],0 etc.  None work.  
This goes on and on with every line – in fact every parameter I attempt to
use I have to spend an hour or so trying to find the correct syntax.  

This forum is of little use – in fact I find the tone arrogant. 

Please keep in mind that unless you are employed to write and maintain
installers most users will write an installer once per application – if
that. They do not want to have to learn the whole MSI table structure.  


When answering questions take a lesson from the VMS and Unix sys admin guys.
If they are worth their salt they never respond to a user change request by
typing commands in at the prompt because they know that the problem that
user has today – another hundred users will have in the future. What they do
is they write a script to perform the task and then every time they get a
“Can you restore my files, change my privileges, mount my tape etc” they
simply run the script. 

You guys need to do the same thing. When a question comes into this forum –
ie a support request. Take the time to answer it completely and provide a
well coded working example – better yet put it into the Wiki.  The next time
the same question comes in – point them at the Wiki.

You should find that the Wiki itself will reduce support calls – as people
can find the definitive example.

You guys know the problems people have  – you are answering them


What people need is a definitive language definition. 

A list of each of the objects in Wix and how to use them. All the basic
building blocks;  File References, CDATA etc.  Look up a normal programming
language reference for an example.  The really easy things – file
references, short cuts.

When do you use square brackets when don’t you, What is a CDATA – how do you
use it. Do you need to include the icon file with the source – or does it
get picked up automatically. What does advertised mean?

People also probably don’t know XML – web coders maybe – but application
coders probably don’t. XML is a data definition language. The basics of XML
usage need to be included.  You could tell people that they have to go and
learn XML first – but that wont help people use Wix.

You have your own jargon with no definitions. What the hell does File/@Id
mean? It certainly doesn’t parse.

All the basic stuff you guys forgot years ago.

When people answer questions on this forum they need to include complete
working example code fragments.  Have a look at a C language forum to see
how it is normally done.  

Examples need to use good programming practices. I have seen lots of
examples that use hard coded references to source files icons etc.  I am
sorry guys – working examples that use bad technique are dangerous because
people are going to copy them.

Interestingly these are usually accompanied by someone singing the praises
of Wix.  

While I am on that bandwagon - All physical source locations should be
assigned to variables listed once in one part of the code – and all use of
these objects should be via the identifier. If you don’t you will end up
with buggy releases where file XYZ changes and that change was not
propagated through the install kit. 

Methinks these guys haven’t had to sit down and explain to their project
manager why the code that worked in test has just been rolled out to 10,000
users using last years product pricing model in words the PM can take to the
CIO who in turn has an angry CEO to explain why the company now has to
explain to a million customers that they were charged wrongly....

But I am digressing, in the end of the day I have finally got my installer
running – but to put some context on the difficulty. All I have is some
client server code which handles the scenario in which a user may want to
install the client or the server or both. Most of the registration takes
place in the actual code. That is the application itself looks into the
registry to see what is installed and what version of things are there – it
needs to handle the server being upgraded on a remote machine.  So all I
needed to do was conditionally put files under Program Files with some links
on the start menu. I have one custom action to stop the server if it is
being removed and one that starts the server configuration module if the
server is being installed.  Basic stuff. This has now taken 3 weeks to write
including a week wasted on the Visual Studio installer.

To write the little application that is started by the custom action and
watches for the installer to complete so it can start the server
configuration module after the installer finishes took a couple of hours
from start to finish – including false starts of watching for the msiexec
process to finish – it doesn’t there is always one running, and then finding
another way to do it.

Wix is a good step in the right direction - but as I said before it is the
assembly langauge of installers. 

What I Want

Now it needs template procedures built on top.   Ie the "correct" way of
doing things needs to be included in some form of procedure so that users
write statements and then the Wix compiler takes the statement and replaces
it with the right way of doing something so that a user like me can write
something like the following


BinDir=CreateDirectory(PARENT_DIR,"Directory Name");
StartMenuDir= CreateDirectory(START_MENU,"Directory Name");

File1=LoadFile(File1SourcePath);
Icon1=LoadIcon(Icon1SourcePath);
File1ShortCut=ShortCut(File1,Icon1);

Install(File1,BinDir);
Install(File1ShortCut, StartMenuDir);

Component1={ File1, Icon1, File1ShortCut }
.
.
.
FileN=LoadFile(FileNSourcePath);
IconN=LoadIcon(IconNSourcePath);
FileNShortCut=ShortCut(FileN,IconN);
ComponentN={ FileN, IconN, FileNShortCut }
Install(FileN,BinDir);


Feature1={Component1,Component2…}
Feature1.Properties={Visible,Advertised,etc}

Feature1={Component1,Component2…}
Feature1.Properties={Visible,Advertised,etc}


if  (Feature1.IsInstalled() and Feature1.ToBeRemoved())
{
        CallCustomAction(FredsDLL,EntryPoint)
}






-- 
View this message in context: 
http://www.nabble.com/File-Reference-Syntax-tf4762398.html#a13687916
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to