 |
|
 |
I've written my own version of the vsrename tool in C++ and provided it with a GUI. Its here if you want to try it:
http://adunk.ozehosting.com/software/RenameVSProject.html
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I downloaded the source and tried to compile your project; however, the source is missing UtilsLib.
http://www.JournalOfTheRandom.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Turns out that you can comment out that #include and the corresponding library and it compiles OK. Strange!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
The program works very fine with Visual C++ 6.0, but only "rebuild all" didn't make all the service as it didn't update correctly the source browser file (the program is perfect, the problem is with visual c++).
Just delete the .bsc files from the project also. Otherwise when you look for your defines it will not find.
br Marcel
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
Get's my 5. I named a project incorrectly and have been putting off fixing the name for a long time. This utility made short work of my name change.
Charlie Gilley Will program for food... Whoever said children were cheaper by the dozen... lied.
Overheard in a cubicle: "A project is just a bug under development." Seeking to rise above the intelligence of a one eared rabbit...
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
I definitely like this tool since I've renamed several projects and it was a bit of a pain in the butt.
I've thrown copies of about a dozen of my projects at it and it worked every time. The only problem is that it does not update system/hidden files.
-- Synetech
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Synetech wrote: The only problem is that it does not update system/hidden files.
VC++ 6.0 generates system/hidden files? 
|
| Sign In·View Thread·PermaLink | 2.00/5 (2 votes) |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
Just put your path inside double quotes 
Marco.
____________________ "Beware of the first programmer's enemy: the copy&paste! But don't forget its allied: the search&replace!" M.I.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
a must have tool.
PS: showing some mesaages in output - but it is ok. project renamed successfully
---------------------------- never stop coding.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Sir. i have a created project and i want to add it into my own proect to use its funtion,or some way to use its funtion please help me thank you in advance
dnqhung
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
example of use: proj_rename.pl -if project1.dsp -on project2 -iw project1.dsw -ow project2.dsw -up -uw
# # ProjRename v1.1.1 # # (C) 2003 Alexander Dovgaluk (sshd@mail.ru) # # utility for renaming visual studio projects # supported file-types: dsp, vcp, vcproj, vcw, dsw, sln # # Started: 07.11.2003 # Last Update: 10.11.2003 #
use strict;
my $me;
if ($0 =~ m;^(.*[/\\])?(.*)$ { $me = $2; } else { $me = $0; }
sub PrintUsage { print <<"_EOF_"; Visual Studio projects rename utility
Usage: $me options -up update project file -if <filename> input project file -of <filename> output project file -in <name> input project name -on <name> output project name -uw update workspace file -iw <filename> input workspace name -ow <filename> output workspace name _EOF_ };
if ($#ARGV < 0) { PrintUsage; exit 1; }
my @args;
my $input_fname; my $input_ext; my $in_pr; my $in_pr_guess; my $in_pr_file; my $output_fname; my $output_ext; my $out_pr; my $out_pr_file; my $pr_type; my $update_project;
my $input_workspace; my $output_workspace; my $update_workspace; my $input_ws_ext; my $ws_type;
$input_fname = ""; $input_ext = ""; $in_pr = ""; $in_pr_guess = 1; $in_pr_file = ""; $output_fname = ""; $output_ext = ""; $out_pr = ""; $out_pr_file = ""; $pr_type = ""; $update_project = 0;
$input_workspace = ""; $output_workspace = ""; $update_workspace = 0; $input_ws_ext = ""; $ws_type = "";
@args = @ARGV; while (@args) { my $cmd; $cmd = shift @args; if ($cmd eq '-if') { $input_fname = shift @args; } elsif ($cmd eq '-of') { $output_fname = shift @args; } elsif ($cmd eq '-in') { $in_pr = shift @args; $in_pr_guess = 0; } elsif ($cmd eq '-on') { $out_pr = shift @args; } elsif ($cmd eq '-pt') { $pr_type = shift @args; } elsif ($cmd eq '-iw') { $input_workspace = shift @args; } elsif ($cmd eq '-ow') { $output_workspace = shift @args; } elsif ($cmd eq '-wt') { $ws_type = shift @args; } elsif ($cmd eq '-up') { $update_project = 1; } elsif ($cmd eq '-uw') { $update_workspace = 1; } }
$input_ext = $pr_type if $pr_type; $input_fname = "$in_pr.$input_ext" if not $input_fname and $input_ext and $in_pr;
if ($input_fname =~ m!^(.*[/\\])?(.*)\.(.*)$!) { $in_pr_file = $2; $input_ext = $3; } $in_pr = $in_pr_file if not $in_pr; $in_pr_file = $in_pr if not $in_pr_file;
if ($input_workspace =~ m!^(.*[/\\])?(.*)\.(.*)$!) { $input_ws_ext = $3; }
if ($update_project and not $pr_type) { if ($input_ext =~ /^dsp$/) { $pr_type = "dsp"; } elsif ($input_ext =~ /^vcp$/) { $pr_type = "vcp"; } elsif ($input_ext =~ /^vcproj$/) { $pr_type = "vcproj"; } else { die "Unknown project file extension"; } }
if ($update_workspace and not $ws_type) { if ($input_ws_ext =~ /^dsw/) { $ws_type = "dsw"; } elsif ($input_ws_ext =~ /^vcw/) { $ws_type = "vcw"; } elsif ($input_ws_ext =~ /^sln$/) { $ws_type = "sln"; } else { die "Unknown workspace file extension"; } }
$output_fname = "$out_pr.$input_ext" if not $output_fname;
if ($output_fname =~ m!^(.*[/\\])?(.*)\.(.*)$!) { $out_pr_file = $2; $output_ext = $3; } $out_pr = $out_pr_file if not $out_pr;
$update_project = 0 if not $input_fname or not $output_fname; $update_workspace = 0 if not $input_workspace or not $output_workspace;
# warning if ($input_ext !~ /^\Q$output_ext\E$/); # warning if ($input_ws_ext !~ /^\Q$output_ws_ext\E$/);
my $s;
if ($update_project or $in_pr_guess) {
open(IN, "<$input_fname") or die "Can't open input project file"; if ($update_project) { open(OUT, ">$output_fname") or die "Can't open output project file"; }
if ($pr_type eq "dsp" or $pr_type eq "vcp") {
my $is_project; my $is_beginning; my $is_currcfg; my $is_target;
$is_beginning = 1; $is_currcfg = 1; $is_project = 0; $is_target = 0;
while ($s = <IN> { if ($s =~ /^# Begin Project$/) { $is_project++; $is_beginning = 0; $is_currcfg = 0; $is_target = 0; } elsif ($s =~ /^# End Project$/) { $is_project--; $is_target = 0; } if ($is_beginning) { if ($in_pr_guess) { if ($s =~ s/^(# Microsoft (Developer Studio|eMbedded Visual Tools) Project File - Name=")(.*)(" - Package Owner=<.*> $/$1$out_pr$4/) { $in_pr = $3; $in_pr_guess = 0; $is_beginning = 0; } } else { if ($s =~ s/^(# Microsoft (Developer Studio|eMbedded Visual Tools) Project File - Name=")\Q$in_pr\E(" - Package Owner=<.*> $/$1$out_pr$3/) { $is_beginning = 0; } } } elsif ($is_currcfg) { if ($s =~ s/^(CFG=)\Q$in_pr\E( - .*)$/$1$out_pr$2/) { $is_currcfg = 0; } } elsif ($is_project > 0) { if ($s =~ /^# Begin Target$/) { $is_target++; } elsif ($s =~ /^# End Target$/) { $is_target--; } if ($is_target > 0) { $s =~ s/^(# Name ")\Q$in_pr\E( - .*")$/$1$out_pr$2/; } $s =~ s/^(!(ELSE)?IF\s*"\$\(CFG\)"\s*==\s*")\Q$in_pr\E( - .*?")$/$1$out_pr$3/; } else { $s =~ s:^(!MESSAGE NMAKE /f ")\Q$in_pr_file\E(\.(mak|vcn)"\.)$:$1$out_pr_file$2:; $s =~ s:^(!MESSAGE NMAKE /f ")\Q$in_pr_file\E(\.(mak|vcn)" CFG=")\Q$in_pr\E(.*?")$:$1$out_pr_file$2$out_pr$4:; $s =~ s/^(!MESSAGE ")\Q$in_pr\E( - .*?".*)$/$1$out_pr$2/; } print OUT $s if $update_project; }
} elsif ($pr_type eq "vcproj") {
my $is_project; my $is_end;
$is_project = 0; $is_end = 0;
while ($s = <IN> { if (not $is_end) { if ($s =~ /^<VisualStudioProject$/) { $is_project = 1; } if ($is_project) { if ($in_pr_guess) { if ($s =~ s/^(\s*Name=")(.*)("\s*)/$1$out_pr$3/) { $in_pr = $2; $in_pr_guess = 0; $is_end = 1; } } else { if ($s =~ s/^(\s*Name=")\Q$in_pr\E("\s*)/$1$out_pr$2/) { $is_end = 1; } } } } print OUT $s if $update_project; }
}
if ($update_project) { close(OUT); } close(IN);
}
if ($update_workspace) {
open(IN, "<$input_workspace") or die "Can't open input workspace file"; open(OUT, ">$output_workspace") or die "Can't open output workspace file";
if ($ws_type eq "dsw" or $ws_type eq "vcw") {
my $is_project; my $is_package; my $is_dependency;
$is_project = 0; $is_package = 0; $is_dependency = 0;
while ($s = <IN> {
if ($is_project) {
if ($is_package) {
if ($s =~ /^\s*\}\}\}\s*$/) { $is_package = 0; $is_dependency = 0; }
if ($is_dependency) { if ($s =~ /^\s*End Project Dependency\s*$/) { $is_dependency = 0; } $s =~ s/^(\s*Project_Dep_Name )\Q$in_pr\E/$1$out_pr/; } else { if ($s =~ /^\s*Begin Project Dependency\s*$/) { $is_dependency = 1; } }
} else {
if ($s =~ /^\s*\{\{\{\s*$/) { $is_package = 1; $is_dependency = 0; }
}
}
if ($s =~ /^(Project:\s*"[^"]*"=.*|Global:\s*)$/) { $s =~ s/^(Project:\s*")\Q$in_pr\E("=.*)\Q$input_fname\E( - Package Owner=<.*> $/$1$out_pr$2$output_fname$3/; $is_project = 1; $is_package = 0; $is_dependency = 0; }
print OUT $s;
}
} elsif ($ws_type eq "sln") {
my $is_project; my $is_global;
$is_project = 0; $is_global = 0;
while ($s = <IN> {
if ($is_project) {
if ($s =~ /^\s*EndProject\s*$/) { $is_project = 0; }
} elsif ($is_global) {
if ($s =~ /^\s*EndGlobal\s*$/) { $is_global = 0; }
} else {
if ($s =~ s/^(\s*Project\("[^"]*"\)\s*=\s*")\Q$in_pr\E(",\s*".*)\Q$input_fname\E(",\s*"[^"]*"\s*)$/$1$out_pr$2$output_fname$3/) { $is_project = 1; $is_global = 0; }
if ($s =~ /^\s*Global\s*$/) { $is_global = 1; $is_project = 0; }
}
print OUT $s;
}
}
close(OUT); close(IN);
}
exit 0;
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |