Skip to content

Commit

Permalink
Updated build script to work better with VS2015
Browse files Browse the repository at this point in the history
  • Loading branch information
bcarrier committed Jan 18, 2017
1 parent fe4f9ab commit 5c56674
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Doxyfile text
*.vcproj text eol=crlf
*.vcxproj* text eol=crlf
*.sln text eol=crlf
*.bat text eol=crlf

.gitignore text

10 changes: 10 additions & 0 deletions release/VS2010_cygwin.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off

REM Launch a Cygwin shell with the needed Visual Studio 2010 environment variables set.
REM Used to run the automated build / release scripts that are written in Perl/Python.

CALL "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"

C:
chdir C:\cygwin\bin
bash --login -i
9 changes: 9 additions & 0 deletions release/VS2015_cygwin.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@echo off
REM Launch a Cygwin shell with the needed Visual Studio 2015 environment variables set
REM Used to run the automated build / release scripts that are written in Perl/Python

CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"

C:
chdir C:\cygwin\bin
bash --login -i
40 changes: 23 additions & 17 deletions release/release-win.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@

# Release script for Windows Executables. Note that this is run
# after release-unix.pl, which will create the needed tag directories
# and update the version variables accordingly.
# and update the version variables accordingly.
#
# Assumes:
#- LIBEWF_HOME environment variable is set and LIBEWF is compiled in there
#- msbuild is in PATH (currently, this requires that I have c:\wndows\microsoft.NET\Framework\v4XXX in the path)
# This only builds the 32-bit, release target
#
# Assumes:
#- libewf, libvmdk, and libvhdi are configured and built
#- The correct msbuild is in the PATH
#-- VS2015 and VS2008 put this in different places. If VS2008 is found first, you'll get errors
# about not finding the 140_xp platform.
#-- The easiest way to do this is to launch Cygwin using the appropriate batch file, which sets
# the correct environment variables.
#
# This requires Cygwin with:
# - git
# - zip
#
# It will only work with Visual Studio 2010 express.
#

use strict;

my $TESTING = 0;
print "TESTING MODE (no commits)\n" if ($TESTING);



unless (@ARGV == 1) {
print stderr "Missing arguments: version\n";
print stderr " for example: release-win.pl 3.1.0\n";
Expand All @@ -31,12 +32,9 @@

}



my $RELDIR = `pwd`; # The release directory
chomp $RELDIR;
my $SVNDIR = "$RELDIR/../";
my $TSKDIR = "${SVNDIR}";
my $TSKDIR = "$RELDIR/../";

my $TAGNAME = $ARGV[0];
unless ($TAGNAME eq "no-tag") {
Expand All @@ -55,12 +53,18 @@
#die "Missing redist dir $REDIST_LOC" unless (-d "$REDIST_LOC");


# Verify LIBEWF is built
# Verify LIBX libraries exist / built
die "LIBEWF missing" unless (-d "$ENV{'LIBEWF_HOME'}");
die "libewf dll missing"
unless (-e "$ENV{'LIBEWF_HOME'}/msvscpp/Release/libewf.dll" );

die "libvhdi dll missing"
unless (-e "$ENV{'LIBVHDI_HOME'}/msvscpp/Release/libvhdi.dll" );

die "libvhdi dll missing"
unless (-e "$ENV{'LIBVMDK_HOME'}/msvscpp/Release/libvmdk.dll" );


#######################

# Function to execute a command and send output to pipe
Expand Down Expand Up @@ -109,7 +113,7 @@ sub update_code {


if ($no_tag == 0) {
`git submodule update`;
#`git submodule update`;
# Make sure we have no changes in the current tree
exec_pipe(*OUT, "git status -s | grep \"^ M\"");
my $foo = read_pipe_line(*OUT);
Expand All @@ -121,9 +125,9 @@ sub update_code {
# Make sure src dir is up to date
print "Updating source directory\n";
`git pull`;
`git submodule init`;
`git submodule update`;
`git submodule foreach git checkout master`;
#`git submodule init`;
#`git submodule update`;
#`git submodule foreach git checkout master`;

# Verify the tag exists
exec_pipe(*OUT, "git tag | grep \"^${TAGNAME}\"");
Expand Down Expand Up @@ -241,6 +245,8 @@ sub package_core {

# 2010 version
# copy_runtime_2010("${rdir}/bin");

# 2015 - nothing is needed anymore because they were all setup in the Release folder

# Zip up the files - move there to make the path in the zip short
chdir ("$RELDIR") or die "Error changing directories to $RELDIR";
Expand Down

0 comments on commit 5c56674

Please sign in to comment.