From df258453badd8e37b520cdd5d8daacb2d311f3e3 Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Wed, 8 Mar 2017 00:25:23 +0100 Subject: [PATCH] msvc sorting hack --- helper.pl | 15 ++- libtomcrypt_VS2005.vcproj | 208 ++++++++++++++++++------------------- libtomcrypt_VS2008.vcproj | 212 +++++++++++++++++++------------------- 3 files changed, 224 insertions(+), 211 deletions(-) diff --git a/helper.pl b/helper.pl index 58cd71e..c3ecfcb 100755 --- a/helper.pl +++ b/helper.pl @@ -74,8 +74,21 @@ sub prepare_msvc_files_xml { my ($all, $exclude_re, $targets) = @_; my $last = []; my $depth = 2; + + # sort files in the same order as visual studio (ugly, I know) + my @parts = (); + for my $orig (@$all) { + my $p = $orig; + $p =~ s|/|/~|g; + $p =~ s|/~([^/]+)$|/$1|g; + # now we have: 'src/pk/rsa/rsa_verify_hash.c' > 'src/~pk/~rsa/rsa_verify_hash.c' + my @l = map { sprintf "% -99s", $_ } split /\//, $p; + push @parts, [ $orig, join(':', @l) ]; + } + my @sorted = map { $_->[0] } sort { $a->[1] cmp $b->[1] } @parts; + my $files = "\r\n"; - for my $full (sort @$all) { + for my $full (@sorted) { my @items = split /\//, $full; # split by '/' $full =~ s|/|\\|g; # replace '/' bt '\' shift @items; # drop first one (src) diff --git a/libtomcrypt_VS2005.vcproj b/libtomcrypt_VS2005.vcproj index b4e3805..05649eb 100644 --- a/libtomcrypt_VS2005.vcproj +++ b/libtomcrypt_VS2005.vcproj @@ -170,38 +170,6 @@ - - - - - - - - - - - - @@ -254,6 +222,46 @@ RelativePath="src\ciphers\rc6.c" > + + + + + + + + + + + + + + + + @@ -290,10 +298,6 @@ > - - @@ -326,10 +330,6 @@ - - - - - - - - - - - - - - - - @@ -626,6 +598,38 @@ RelativePath="src\hashes\sha1.c" > + + + + + + + + + + + + + + + + @@ -654,10 +658,6 @@ > - - @@ -938,14 +938,6 @@ - - - - @@ -970,6 +962,14 @@ RelativePath="src\math\tfm_desc.c" > + + + + + + + + + + + + + + + + @@ -990,14 +1014,6 @@ > - - - - @@ -1110,10 +1126,6 @@ > - - @@ -1126,14 +1138,6 @@ > - - - - @@ -1150,10 +1154,6 @@ > - - - - - - - - - - - - - - @@ -256,6 +224,46 @@ RelativePath="src\ciphers\rc6.c" > + + + + + + + + + + + + + + + + @@ -292,10 +300,6 @@ > - - @@ -328,10 +332,6 @@ - - - - - - - - - - - - - - - - @@ -628,6 +600,38 @@ RelativePath="src\hashes\sha1.c" > + + + + + + + + + + + + + + + + @@ -656,10 +660,6 @@ > - - @@ -940,14 +940,6 @@ - - - - @@ -972,6 +964,14 @@ RelativePath="src\math\tfm_desc.c" > + + + + + + + + + + + + + + + + @@ -992,14 +1016,6 @@ > - - - - @@ -1112,10 +1128,6 @@ > - - @@ -1128,14 +1140,6 @@ > - - - - @@ -1152,10 +1156,6 @@ > - -