Replaced use of T4 templates with PS-based templates.
TextTransform.exe is not available with Express versions of Visual Studio.
This commit is contained in:
@@ -159,8 +159,10 @@
|
||||
<Command>
|
||||
<![CDATA[
|
||||
SET SOLUTIONDIR=$(SolutionDir)..\
|
||||
$(TextTransformPath) -out "%SOLUTIONDIR%config-win32.h" "%SOLUTIONDIR%config-win32.h.tt"
|
||||
$(TextTransformPath) -out "%SOLUTIONDIR%win32\version.txt" "%SOLUTIONDIR%win32\version.txt.tt"
|
||||
powershell "$(SolutionDir)..\version-template.ps1" "$(SolutionDir)..\config-win32.h.tt" "$(SolutionDir)..\config-win32.h"
|
||||
powershell "$(SolutionDir)..\version-template.ps1" "$(SolutionDir)..\win32\version.txt.tt" "$(SolutionDir)..\win32\version.txt.tmp"
|
||||
REM version.txt must be in UTF-8 without trailing newline
|
||||
powershell "[string] $content = Get-Content '$(SolutionDir)..\win32\version.txt.tmp' -Encoding UTF8; [System.IO.File]::WriteAllText('$(SolutionDir)..\win32\version.txt', $content); Remove-Item '$(SolutionDir)..\win32\version.txt.tmp';"
|
||||
]]>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
|
||||
@@ -100,7 +100,9 @@
|
||||
<Command>
|
||||
<![CDATA[
|
||||
SET SOLUTIONDIR=$(SolutionDir)..\
|
||||
$(TextTransformPath) -out hexchat.rc hexchat.rc.tt
|
||||
powershell "$(SolutionDir)..\version-template.ps1" "$(SolutionDir)..\src\fe-gtk\hexchat.rc.tt" "$(SolutionDir)..\src\fe-gtk\hexchat.rc.utf8"
|
||||
REM hexchat.rc needs to be in UCS-2 or Resource Compiler will complain
|
||||
powershell "Get-Content -Encoding UTF8 '$(SolutionDir)..\src\fe-gtk\hexchat.rc.utf8' | Out-File '$(SolutionDir)..\src\fe-gtk\hexchat.rc'; Remove-Item '$(SolutionDir)..\src\fe-gtk\hexchat.rc.utf8'"
|
||||
"$(DepsRoot)\bin\glib-compile-resources.exe" --generate-source --sourcedir $(DataDir) --target "$(ProjectDir)resources.c" "$(DataDir)hexchat.gresource.xml"
|
||||
]]>
|
||||
</Command>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<#@ include file="..\..\version.include.tt" #>#include <winver.h>
|
||||
#include <winver.h>
|
||||
#include "../../config-win32.h"
|
||||
|
||||
#define COMMA_VERSION <#= string.Join(",", versionParts) #>,0
|
||||
#define COMMA_VERSION <#= [string]::Join(',', $versionParts) #>,0
|
||||
|
||||
XC_ICON ICON "../../data/icons/hexchat.ico"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user