<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package VC6WorkspaceCreator;

# ************************************************************
# Description   : A VC6 Workspace Creator
# Author        : Chad Elliott
# Create Date   : 5/13/2002
# ************************************************************

# ************************************************************
# Pragmas
# ************************************************************

use strict;

use VC6ProjectCreator;
use WorkspaceCreator;

use vars qw(@ISA);
@ISA = qw(WorkspaceCreator);

# ************************************************************
# Subroutine Section
# ************************************************************


sub compare_output {
  #my($self) = shift;
  return 1;
}


sub crlf {
  my($self) = shift;
  return $self-&gt;windows_crlf();
}


sub workspace_file_name {
  my($self) = shift;
  return $self-&gt;get_modified_workspace_name($self-&gt;get_workspace_name(),
                                            '.dsw');
}


sub pre_workspace {
  my($self) = shift;
  my($fh)   = shift;
  my($crlf) = $self-&gt;crlf();

  print $fh 'Microsoft Developer Studio Workspace File, Format Version 6.00', $crlf,
            '#', $crlf,
            '# VC6WorkspaceCreator.pm,v 1.12 2004/03/15 16:04:13 elliott_c Exp', $crlf,
            '#', $crlf,
            '# This file was generated by MPC.  Any changes made directly to', $crlf,
            '# this file will be lost the next time it is generated.', $crlf,
            '#', $crlf,
            '# MPC Command:', $crlf,
            "# $0 @ARGV", $crlf,
            $crlf;
}


sub write_comps {
  my($self)     = shift;
  my($fh)       = shift;
  my($projects) = $self-&gt;get_projects();
  my($pjs)      = $self-&gt;get_project_info();
  my($crlf)     = $self-&gt;crlf();

  foreach my $project (@$projects) {
    my($name) = $$pjs{$project}-&gt;[0];
    my($deps) = $self-&gt;get_validated_ordering($project);

    print $fh "###############################################################################$crlf" .
              $crlf .
              "Project: \"$name\"=" . $self-&gt;slash_to_backslash($project) .
              " - Package Owner=&lt;4&gt;$crlf" .
              $crlf .
              "Package=&lt;5&gt;$crlf" .
              "{{{$crlf" .
              "}}}$crlf" .
              $crlf .
              "Package=&lt;4&gt;$crlf" .
              "{{{$crlf";

    if (defined $deps &amp;&amp; $deps ne '') {
      my($darr) = $self-&gt;create_array($deps);
      foreach my $dep (@$darr) {
        ## Avoid cirular dependencies
        if ($name ne $dep) {
          print $fh "    Begin Project Dependency$crlf" .
                    "    Project_Dep_Name $dep$crlf" .
                    "    End Project Dependency$crlf";
        }
      }
    }

    print $fh "}}}$crlf$crlf";
  }
}


sub post_workspace {
  my($self) = shift;
  my($fh)   = shift;
  my($crlf) = $self-&gt;crlf();

  print $fh "###############################################################################$crlf" .
            $crlf .
            "Global:$crlf" .
            $crlf .
            "Package=&lt;5&gt;$crlf" .
            "{{{$crlf" .
            "}}}$crlf" .
            $crlf .
            "Package=&lt;3&gt;$crlf" .
            "{{{$crlf" .
            "}}}$crlf" .
            $crlf .
            "###############################################################################$crlf" .
            $crlf;
}


1;
</pre></body></html>