Add copyrightYears to MetaData.
This commit is contained in:
@@ -10,6 +10,7 @@ abstract MetaData({
|
|||||||
@:optional var packageName:String;
|
@:optional var packageName:String;
|
||||||
@:optional var title:String;
|
@:optional var title:String;
|
||||||
@:optional var version:String;
|
@:optional var version:String;
|
||||||
|
@:optional var copyrightYears:String;
|
||||||
}) from Dynamic
|
}) from Dynamic
|
||||||
{
|
{
|
||||||
@:noCompletion
|
@:noCompletion
|
||||||
@@ -21,6 +22,7 @@ abstract MetaData({
|
|||||||
description: "",
|
description: "",
|
||||||
packageName: "",
|
packageName: "",
|
||||||
title: "",
|
title: "",
|
||||||
version: ""
|
version: "",
|
||||||
|
copyrightYears: ""
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -683,7 +683,7 @@ class ProjectXMLParser extends HXProject
|
|||||||
{
|
{
|
||||||
switch (attribute)
|
switch (attribute)
|
||||||
{
|
{
|
||||||
case "title", "description", "package", "version", "company", "company-id", "build-number", "company-url":
|
case "title", "description", "package", "version", "company", "company-id", "build-number", "company-url", "copyright-years":
|
||||||
var value = substitute(element.att.resolve(attribute));
|
var value = substitute(element.att.resolve(attribute));
|
||||||
|
|
||||||
defines.set("APP_" + StringTools.replace(attribute, "-", "_").toUpperCase(), value);
|
defines.set("APP_" + StringTools.replace(attribute, "-", "_").toUpperCase(), value);
|
||||||
@@ -1738,7 +1738,7 @@ class ProjectXMLParser extends HXProject
|
|||||||
|
|
||||||
case "gradle-version":
|
case "gradle-version":
|
||||||
config.set("android.gradle-version", value);
|
config.set("android.gradle-version", value);
|
||||||
|
|
||||||
case "gradle-plugin":
|
case "gradle-plugin":
|
||||||
config.set("android.gradle-plugin", value);
|
config.set("android.gradle-plugin", value);
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ BEGIN
|
|||||||
VALUE "FileDescription", "::APP_DESCRIPTION::"
|
VALUE "FileDescription", "::APP_DESCRIPTION::"
|
||||||
VALUE "FileVersion", "::FILE_VERSION::"
|
VALUE "FileVersion", "::FILE_VERSION::"
|
||||||
VALUE "InternalName", "::APP_FILE::"
|
VALUE "InternalName", "::APP_FILE::"
|
||||||
VALUE "LegalCopyright", "Copyright (C) ::COPYRIGHT_YEARS:: ::APP_COMPANY::"
|
VALUE "LegalCopyright", "Copyright (C) ::APP_COPYRIGHT_YEARS:: ::APP_COMPANY::"
|
||||||
VALUE "OriginalFilename", "::APP_FILE::"
|
VALUE "OriginalFilename", "::APP_FILE::"
|
||||||
VALUE "ProductName", "::APP_PACKAGE::"
|
VALUE "ProductName", "::APP_PACKAGE::"
|
||||||
VALUE "ProductVersion", "::FILE_VERSION::"
|
VALUE "ProductVersion", "::FILE_VERSION::"
|
||||||
|
|||||||
@@ -686,6 +686,11 @@ class WindowsPlatform extends PlatformTarget
|
|||||||
context.APP_DESCRIPTION = project.meta.title;
|
context.APP_DESCRIPTION = project.meta.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (context.APP_COPYRIGHT_YEARS == null || context.APP_COPYRIGHT_YEARS == "")
|
||||||
|
{
|
||||||
|
context.APP_COPYRIGHT_YEARS = Std.string(Date.now().getFullYear());
|
||||||
|
}
|
||||||
|
|
||||||
var versionParts = project.meta.version.split(".");
|
var versionParts = project.meta.version.split(".");
|
||||||
|
|
||||||
if (versionParts.length == 3)
|
if (versionParts.length == 3)
|
||||||
@@ -695,9 +700,6 @@ class WindowsPlatform extends PlatformTarget
|
|||||||
|
|
||||||
context.FILE_VERSION = versionParts.join(".");
|
context.FILE_VERSION = versionParts.join(".");
|
||||||
context.VERSION_NUMBER = versionParts.join(",");
|
context.VERSION_NUMBER = versionParts.join(",");
|
||||||
|
|
||||||
// TODO: Implement this properly.
|
|
||||||
context.COPYRIGHT_YEARS = Std.string(Date.now().getFullYear());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
context.NEKO_FILE = targetDirectory + "/obj/ApplicationMain.n";
|
context.NEKO_FILE = targetDirectory + "/obj/ApplicationMain.n";
|
||||||
|
|||||||
Reference in New Issue
Block a user