Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2008
    Posts
    15

    Custom bootstrappers with updated package codes

    In the Build Settings dialog, there is the option for building a Standard and Custom bootstrapper. The Standard option does everything including providing the bootstrap builder with the correct package code from the Summary Information from the MSI file just built. However it seems to newly create both the bootstrap_config.xml and the bootstrapper_main.lua, making this unsuitable for custom work.

    When building a Custom bootstrapper, you need to specify the packagecode on a custom commandline. In order to get the most current packagecode from the MSI, the MSI has to be built first. After the MSI has been built, the package code can be extracted from the MSI using using the vba script WiSumInf.

    Unless I know the PackageCode ahead of time, I can not use msifactory.exe in a build script, since I am faced with the chicken and egg problem.

    What sequence of command line tools can be used to:

    1) Create the MSI File???

    2) extract the package-code from the msi file.

    3) create the bootstrap file presenting package-code.

    Of course I want it to use the msiproj file to drive the process.

    Bill
    Last edited by BillMcLean; 08-25-2008 at 08:48 PM. Reason: Typo

  2. #2
    Join Date
    Jan 2008
    Posts
    15

    Updating Package Codes

    The following snippet of code is from a bash (cygwin.org/cygwin) script. You can install it from www.cygwin.org
    You need to get from the Windows SDK the scripts WiSumInf.vbs and WiRunSQL.vbs. These list the product code, package code and product name. The Build_Rev is set from the source control system.

    When the MSIFactory is first run it creates both a MSI file and corresponding setup.exe. The Setup.exe at this point in time will not work since the ProductCode, PackageCode and ProductCode have not been embedded in the Setup.exe.

    The ProductCode, PackageCode and ProductName are extracted by running the scripts WiSumInf.vbs and WiRunSQL.vbs.

    By running the IRMakeBootstrap.exe with the ProductCode, PackageCode, ProductName and ProductVersion set from the command line, a working bootstrapper can be built.

    Code:
    # Build the MSI Factory and disregard the bootstrapper that is built.
    MSIFILE /Log:build.setup.log
         "$MSIFACTORY" /Build FotobounceSetup/$MSIFILE /Log:build.setup.log
    	 
    # Get PackageCode, ProductCode, and Product Name. These are passed to the lua file associated with the product.xml file.
    	 
    export PackageCode=`cscript WiSumInf.vbs  $SRCMSI | gawk '$2 == "Revision" { printf "%s",  $4 }'`
    export ProductCode=`cscript WiRunSQL.vbs  $SRCMSI "Select * from Property" | gawk '$1 == "ProductCode" { printf "%s",  $2 }'` 
    export ProductName=`cscript WiRunSQL.vbs  $SRCMSI "Select * from Property" | gawk '$1 == "ProductName" { printf "%s",  $2 }'`
    echo "Building: " $ProductName " ProductCode: " $ProductCode$BUILD_REV " PackageCode: " $PackageCode
    
    # rebuild the bootstrapper
    echo "$BOOTSTRAP" $SRCXML c:/ardev/CurrentDev/$SRCEXE -var:ProductCode=\"$ProductCode\" -var:PackageCode=\"$PackageCode\" -var:ProductName=\"$PRoductName\"  -var:ProductVersion=\"$BUILD_REV\"

Similar Threads

  1. Problems with Packages
    By tkroeckel in forum Setup Factory 7.0
    Replies: 23
    Last Post: 03-09-2006, 08:20 AM
  2. Package selection
    By Sergio_S in forum Setup Factory 7.0
    Replies: 2
    Last Post: 09-28-2005, 07:54 AM
  3. SUF 6.0.0.0 bug: package variable state no recognized
    By pit in forum Setup Factory 5.0
    Replies: 1
    Last Post: 11-22-2001, 11:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts