Директива {$Description 'FileDescription'}
This commit is contained in:
parent
e414042e8d
commit
953a2e70a0
|
|
@ -1923,13 +1923,18 @@ namespace PascalABCCompiler
|
|||
{
|
||||
cdo.Title = cds[0].directive;
|
||||
}
|
||||
if (compilerDirectives.TryGetValue(TreeConverter.compiler_string_consts.description_string, out cds))
|
||||
{
|
||||
cdo.Description = cds[0].directive;
|
||||
}
|
||||
if (compilerDirectives.TryGetValue(TreeConverter.compiler_string_consts.main_resource_string, out cds))
|
||||
{
|
||||
if (compilerDirectives.ContainsKey(TreeConverter.compiler_string_consts.product_string) ||
|
||||
compilerDirectives.ContainsKey(TreeConverter.compiler_string_consts.version_string) ||
|
||||
compilerDirectives.ContainsKey(TreeConverter.compiler_string_consts.company_string) ||
|
||||
compilerDirectives.ContainsKey(TreeConverter.compiler_string_consts.trademark_string) ||
|
||||
compilerDirectives.ContainsKey(TreeConverter.compiler_string_consts.title_string))
|
||||
compilerDirectives.ContainsKey(TreeConverter.compiler_string_consts.title_string) ||
|
||||
compilerDirectives.ContainsKey(TreeConverter.compiler_string_consts.description_string))
|
||||
{
|
||||
ErrorsList.Add(new MainResourceNotAllowed(cds[0].location));
|
||||
}
|
||||
|
|
@ -1985,6 +1990,8 @@ namespace PascalABCCompiler
|
|||
cdo.Copyright = project.copyright;
|
||||
if (!string.IsNullOrEmpty(project.title))
|
||||
cdo.Title = project.title;
|
||||
if (!string.IsNullOrEmpty(project.description))
|
||||
cdo.Description = project.description;
|
||||
if (!string.IsNullOrEmpty(project.app_icon) && false)
|
||||
{
|
||||
//cdo.MainResourceFileName = project.app_icon;
|
||||
|
|
@ -2009,7 +2016,7 @@ namespace PascalABCCompiler
|
|||
sw.WriteLine("VALUE \"ProductName\"," + "\"" + cdo.Product + "\"");
|
||||
sw.WriteLine("VALUE \"FileVersion\"," + "\"" + ver + "\"");
|
||||
sw.WriteLine("VALUE \"ProductVersion\"," + "\"" + ver + "\"");
|
||||
sw.WriteLine("VALUE \"FileDescription\"," + "\"" + "" + "\"");
|
||||
sw.WriteLine("VALUE \"FileDescription\"," + "\"" + cdo.Description + "\"");
|
||||
sw.WriteLine("VALUE \"OriginalFileName\"," + "\"" + Path.GetFileName(CompilerOptions.OutputFileName) + "\"");
|
||||
sw.WriteLine("VALUE \"InternalName\"," + "\"" + Path.GetFileNameWithoutExtension(CompilerOptions.OutputFileName) + "\"");
|
||||
sw.WriteLine("VALUE \"CompanyName\"," + "\"" + cdo.Company + "\"");
|
||||
|
|
|
|||
|
|
@ -107,6 +107,12 @@ namespace PascalABCCompiler
|
|||
set;
|
||||
}
|
||||
|
||||
string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
string CommandLineArguments
|
||||
{
|
||||
get;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@ namespace PascalABCCompiler
|
|||
private string _trademark;
|
||||
private string _copyright;
|
||||
private string _title;
|
||||
private PascalABCCompiler.ProjectType _project_type;
|
||||
private string _description;
|
||||
private PascalABCCompiler.ProjectType _project_type;
|
||||
private List<SourceCodeFileInfo> _source_files = new List<SourceCodeFileInfo>();
|
||||
private List<ReferenceInfo> _references = new List<ReferenceInfo>();
|
||||
private List<ResourceInfo> _resources = new List<ResourceInfo>();
|
||||
|
|
@ -203,6 +204,18 @@ namespace PascalABCCompiler
|
|||
}
|
||||
}
|
||||
|
||||
public string description
|
||||
{
|
||||
get
|
||||
{
|
||||
return _description;
|
||||
}
|
||||
set
|
||||
{
|
||||
_description = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string path
|
||||
{
|
||||
get
|
||||
|
|
@ -481,6 +494,7 @@ namespace PascalABCCompiler
|
|||
writer.WriteAttributeString("Trademark", trademark);
|
||||
writer.WriteAttributeString("Copyright", copyright);
|
||||
writer.WriteAttributeString("Title", title);
|
||||
writer.WriteAttributeString("Description", description);
|
||||
writer.WriteAttributeString("MajorVersion", Convert.ToString(major_version));
|
||||
writer.WriteAttributeString("MinorVersion", Convert.ToString(minor_version));
|
||||
writer.WriteAttributeString("BuildVersion", Convert.ToString(build_version));
|
||||
|
|
@ -547,7 +561,7 @@ namespace PascalABCCompiler
|
|||
trademark = reader.GetAttribute("Trademark");
|
||||
copyright = reader.GetAttribute("Copyright");
|
||||
title = reader.GetAttribute("Title");
|
||||
if (title == null) title = ""; //Проверка на null, так как раньше этого атрибута не было
|
||||
description = reader.GetAttribute("Description");
|
||||
major_version = Convert.ToInt32(reader.GetAttribute("MajorVersion"));
|
||||
minor_version = Convert.ToInt32(reader.GetAttribute("MinorVersion"));
|
||||
build_version = Convert.ToInt32(reader.GetAttribute("BuildVersion"));
|
||||
|
|
@ -759,6 +773,18 @@ namespace PascalABCCompiler
|
|||
_title = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return _description;
|
||||
}
|
||||
set
|
||||
{
|
||||
_description = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class SourceCodeFileInfo : PascalABCCompiler.IFileInfo
|
||||
|
|
|
|||
|
|
@ -93,6 +93,13 @@ namespace PascalABCCompiler.NETGenerator
|
|||
get { return _Title; }
|
||||
set { _Title = value; NeedDefineVersionInfo = true; }
|
||||
}
|
||||
private string _Description = "";
|
||||
|
||||
public string Description
|
||||
{
|
||||
get { return _Description; }
|
||||
set { _Description = value; NeedDefineVersionInfo = true; }
|
||||
}
|
||||
|
||||
public string MainResourceFileName = null;
|
||||
|
||||
|
|
@ -905,6 +912,8 @@ namespace PascalABCCompiler.NETGenerator
|
|||
|
||||
ab.SetCustomAttribute(new CustomAttributeBuilder(typeof(System.Reflection.AssemblyTitleAttribute).GetConstructor(new Type[] { typeof(string) }), new object[] { options.Title }));
|
||||
|
||||
ab.SetCustomAttribute(new CustomAttributeBuilder(typeof(System.Reflection.AssemblyDescriptionAttribute).GetConstructor(new Type[] { typeof(string) }), new object[] { options.Description }));
|
||||
|
||||
if (RunOnly)
|
||||
{
|
||||
object main_class = ab.CreateInstance(cur_unit + ".Program");
|
||||
|
|
|
|||
|
|
@ -339,6 +339,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
public static string trademark_string = "trademark";
|
||||
public static string main_resource_string = "mainresource";
|
||||
public static string title_string = "title";
|
||||
public static string description_string = "description";
|
||||
|
||||
public static string system_unit_marker = "__IS_SYSTEM_MODULE";
|
||||
public static string system_unit_file_name = "PABCSystem";
|
||||
|
|
|
|||
|
|
@ -470,6 +470,7 @@ namespace VisualPascalABC
|
|||
private System.Windows.Forms.TextBox tbTradeMark;
|
||||
private System.Windows.Forms.TextBox tbCopyright;
|
||||
//private System.Windows.Forms.TextBox tbTitle;
|
||||
//private System.Windows.Forms.TextBox tbDescription;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.OpenFileDialog openFileDialog1;
|
||||
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ namespace VisualPascalABC
|
|||
prj.Company = this.tbCompany.Text;
|
||||
prj.Trademark = this.tbTradeMark.Text;
|
||||
prj.Copyright = this.tbCopyright.Text;
|
||||
//prj.Title = this.tbTitle.Text;
|
||||
//if (!string.IsNullOrEmpty(prj.Title)) prj.Title = this.tbTitle.Text;
|
||||
//if (!string.IsNullOrEmpty(prj.Description)) prj.Description = this.tbDescription.Text;
|
||||
}
|
||||
|
||||
private void ProjectProperties_FormClosing(object sender, FormClosingEventArgs e)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ CYCLIC_UNIT_REFERENCE_WITH_UNIT_{0}=Cyclic unit reference with unit '{0}'
|
|||
UNDEFINED_SEMANTIC_ERROR{0}=Undefined semantic error : {0}
|
||||
RESOURCEFILE_{0}_NOT_FOUND=Resource file '{0}' not found
|
||||
DUPLICATE_USES_UNIT{0}=Duplicate identifier '{0}' in uses section
|
||||
MAINRESOURCE_NOT_ALLOWED=mainresource can not be used with the directives: product, version, company, trademark, title
|
||||
MAINRESOURCE_NOT_ALLOWED=mainresource can not be used with the directives: product, version, company, trademark, title, description
|
||||
DUPLICATE_DIRECTIVE{0}=Duplicate directive {0}
|
||||
FILE_{0}_NOT_FOUND=File '{0}' not found
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ CYCLIC_UNIT_REFERENCE_WITH_UNIT_{0}=Циклическая связь с мод
|
|||
UNDEFINED_SEMANTIC_ERROR{0}=Неопределенная семантическая ошибка : {0}
|
||||
RESOURCEFILE_{0}_NOT_FOUND=Файл '{0}' не найден
|
||||
DUPLICATE_USES_UNIT{0}=Повторное подключение модуля {0} в секции uses
|
||||
MAINRESOURCE_NOT_ALLOWED=Недопустимо совместное использование директивы mainresource и директив product, version, company, trademark, title
|
||||
MAINRESOURCE_NOT_ALLOWED=Недопустимо совместное использование директивы mainresource и директив product, version, company, trademark, title, description
|
||||
DUPLICATE_DIRECTIVE{0}=Повторное объявление директивы {0}
|
||||
FILE_{0}_NOT_FOUND=Файл '{0}' не найден
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ CYCLIC_UNIT_REFERENCE_WITH_UNIT_{0}=Циклічний зв'язок з моду
|
|||
UNDEFINED_SEMANTIC_ERROR{0}=Невизначена семантична помилка : {0}
|
||||
RESOURCEFILE_{0}_NOT_FOUND=Файл '{0}' не знайдено
|
||||
DUPLICATE_USES_UNIT{0}=Повторне підключення модуля {0} в секції uses
|
||||
MAINRESOURCE_NOT_ALLOWED=Неприпустимо сумісне використання директиви mainresource і директив product, version, company, trademark, title
|
||||
MAINRESOURCE_NOT_ALLOWED=Неприпустимо сумісне використання директиви mainresource і директив product, version, company, trademark, title, description
|
||||
DUPLICATE_DIRECTIVE{0}=Повторное объявление директивы {0}
|
||||
FILE_{0}_NOT_FOUND=Файл '{0}' не знайдено
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue