|
|
|
|
@ -105,8 +105,8 @@ class ResourceFileGenerator |
|
|
|
|
public function generate(): string |
|
|
|
|
{ |
|
|
|
|
$content = ''; |
|
|
|
|
$content .= '// Generated by TypePHP - Windows Resource File' . PHP_EOL; |
|
|
|
|
$content .= '// DO NOT EDIT - This file is auto-generated' . PHP_EOL; |
|
|
|
|
$content .= '; Generated by TypePHP - Windows Resource File' . PHP_EOL; |
|
|
|
|
$content .= '; DO NOT EDIT - This file is auto-generated' . PHP_EOL; |
|
|
|
|
$content .= PHP_EOL; |
|
|
|
|
|
|
|
|
|
// 告诉 rc.exe 此文件使用 UTF-8 编码,避免中文乱码 |
|
|
|
|
@ -121,7 +121,7 @@ class ResourceFileGenerator |
|
|
|
|
$manifestPath = $this->getManifestPath(); |
|
|
|
|
if ($manifestPath) { |
|
|
|
|
$manifestPathRc = str_replace('\\', '/', $manifestPath); |
|
|
|
|
$content .= '// Manifest Resource' . PHP_EOL; |
|
|
|
|
$content .= '; Manifest Resource' . PHP_EOL; |
|
|
|
|
$content .= 'CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "' . addslashes($manifestPathRc) . '"' . PHP_EOL; |
|
|
|
|
$content .= PHP_EOL; |
|
|
|
|
} |
|
|
|
|
@ -131,7 +131,7 @@ class ResourceFileGenerator |
|
|
|
|
if ($iconPath) { |
|
|
|
|
// 使用正斜杠,Windows RC 编译器更兼容 |
|
|
|
|
$iconPathRc = str_replace('\\', '/', $iconPath); |
|
|
|
|
$content .= '// Icon Resource' . PHP_EOL; |
|
|
|
|
$content .= '; Icon Resource' . PHP_EOL; |
|
|
|
|
$content .= 'MAINICON ICON "' . addslashes($iconPathRc) . '"' . PHP_EOL; |
|
|
|
|
$content .= PHP_EOL; |
|
|
|
|
} |
|
|
|
|
@ -154,7 +154,7 @@ class ResourceFileGenerator |
|
|
|
|
$productVersion = $info['product-version'] ?? $fileVersion; |
|
|
|
|
|
|
|
|
|
$content = ''; |
|
|
|
|
$content .= '// Version Information' . PHP_EOL; |
|
|
|
|
$content .= '; Version Information' . PHP_EOL; |
|
|
|
|
$content .= '1 VERSIONINFO' . PHP_EOL; |
|
|
|
|
$content .= 'FILEVERSION ' . $this->formatVersionDots($fileVersion) . PHP_EOL; |
|
|
|
|
$content .= 'PRODUCTVERSION ' . $this->formatVersionDots($productVersion) . PHP_EOL; |
|
|
|
|
|