From: Martin Mares Date: Thu, 27 Mar 2014 19:07:41 +0000 (+0100) Subject: Templater: Fix Pascal projects X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=1636b318830d64ec5c393d1a2d043f595f0342c4;p=moe.git Templater: Fix Pascal projects --- diff --git a/mop/project/templater.pl b/mop/project/templater.pl index bd48da1..c745cfd 100755 --- a/mop/project/templater.pl +++ b/mop/project/templater.pl @@ -25,7 +25,7 @@ sub create_template($$$$) { "$taskdir/$task/$task.cpp" => "$task.cpp", }, pas => { - "$where/template-pas.lpi" => "${task}_main.lpi", + "$where/template-pas.lpi" => "${task}.lpi", "$taskdir/$task/$task.pas" => "$task.pas", } ); @@ -60,8 +60,8 @@ sub open_project($) { sub existing_projects($) { my ($lopen_data,$lang)=@_; - foreach ((glob "$home/*/*.cbp"), (glob "$home/*/*.lpr")) { - my ($name, $task) = m#.*/(.*?)/(.*)(_main\.lpr|\.cbp)#; + foreach ((glob "$home/*/*.cbp"), (glob "$home/*/*.lpi")) { + my ($name, $task) = m#.*/(.*?)/(.*)(\.lpi|\.cbp)#; print "$name $task\n"; $lang=-f "$home/$name/$task.c" ? 'C' : -f "$home/$name/$task.cpp" ? 'C++' : -f "$home/$name/$task.pas" ? 'Pascal' : ''; $lopen_data->set($lopen_data->append, 0, "$1", 1, $lang); diff --git a/mop/project/templater/template-pas.lpi b/mop/project/templater/template-pas.lpi index 72168b3..51220d2 100644 --- a/mop/project/templater/template-pas.lpi +++ b/mop/project/templater/template-pas.lpi @@ -9,7 +9,7 @@ - + <Title Value="tASk"/> <ResourceType Value="res"/> <UseXPManifest Value="True"/> </General>