If I am to create application manifest and embed it as resource into my application, should my MyApplication.manifest file contain UTF-8 BOM or not (0xEF,0xBB,0xBF) before compiling it as an application resource?
The same question applies if I am to use manifest file separated from the main EXE (by adding it next to main EXE e.g. MyApp.exe and MyApp.manifest)?
If you have any references to this, it would be useful, I could not find any.
No, the manifest is an XML file. Which states the text encoding used in the rest of the file with the processing instruction:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
The resource compiler will embed the file as-is. It does come to a good end if the file starts with a BOM anyway, the operating system knows how to skip it. As long as it matches the processing instruction anyway.
Related
Whenever you refactor a TwinCAT project, it creates a .tmcRefac file. After building this file gets converted into a .tpr file. What are these files exactly and can I add them to my .gitignore file?
Short answer
The .tmcRefac can be ignored as also mentioned here and it was included in the official GitHub gitignore for TwinCAT. The .tpr file can't be ignored, because it contains important information about the rename history for the System Manager.
Long answer
The .tmcRefac file contains information about which variable got renamed to what:
<?xml version="1.0" encoding="utf-8"?>
<Refactors>
<Renames>
<RenamedSymbol>
<Type guid="904700f4-ab78-477a-973a-562c3c32f400">MAIN</Type>
<From>number1</From>
<To>number2</To>
</RenamedSymbol>
</Renames>
</Refactors>
After building the project with TwinCAT 4024.12 this files seems to get removed. However, if you have a stand alone plc project, it gets converted into a .tpr file. This .tpr file again contains information about the refactored variable:
<TcModuleRefactorInfos RefactorCnt="1">
<TcModuleRefactorInfo RefactorCnt="1" DateTime="2021-11-11T10:46:12">
<Renames>
<RenameSymbol>
<From>MAIN.number1</From>
<To>MAIN.number2</To>
</RenameSymbol>
</Renames>
</TcModuleRefactorInfo>
</TcModuleRefactorInfos>
Beckhoff support says about this file:
The .tpr file is required to save the rename history of I/O variables in a stand-alone PLC project, since the PLC project and the System Manager are not in the same project. I don't think you should ignore the file as it is relevant to the rename history.
Bug
If you're running TwinCAT 4024.10-4024.12 there can be a bug which crashes Visual Studio/XAE when a .tpr file is present. Solution is to upgrade to > 4024.15.
I need to generate many self-extracting EXE files, which all differ quite slightly (containing one static EXE file to be run, and a user-provided config file).
I want to avoid having a signing infrastructure on the server that generates these self-extracting EXE files. Is it possible to sign a container EXE in such a way that I can add the configuration file later?
I tried appending the configuration file to the signed EXE, but that caused the file to appear as unsigned; the signature clearly must be at the end of the file.
whene I extract a win32 application file.exe with (ressourcextract) I got .bin + .bmp and .txt files.
after some changes in one .bin file how to get my .exe application again , what must i do ? compile or assembly and how ?
thanks in advance
possible dupe of: Replacing Bitmap Resource in exe
You can undoubtedly find a tool to do so, but since this is a programming forum, these are the main APIs you would use:
BeginUpdateResource, UpdateResource, and EndUpdateResource.
Sample
For additional reference/information, here is the spec for the PE file format:
http://msdn.microsoft.com/en-us/library/windows/hardware/gg463119.aspx
I create one template for joomla 2.5. But when I installed it it show the error:
"Failed loading XML file
D:\wamp\www\demoproject\tmp\install_51a44308e27b9\templateDetails.xml
XML: XML declaration allowed only at the start of the document
JInstaller: :Install: Cannot find Joomla XML setup file"
How can I solve it please?
It means your XML file isn't properly written. The actual error is:
XML declaration allowed only at the start of the document
Check the file and make sure
<?xml version="1.0" encoding="utf-8"?>
is the first line in the file. No line breaks or anything else is allowed before this.
That means you try to install the wrong .zip file. It happens often if you try to install a Joomla 1.5 template to a Joomla 1.6 website or the other way around.
Another common reason is, that you try to install the templates download package (<- the ZIP Archive with all the template stuff inside, like the psd file, the docs AND the installation files) , instead of the included installation file.
<extension version="2.5" type="template" client="site"> Try extension tag instead install.
<!DOCTYPE install PUBLIC "-//Joomla! 1.6//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.6/template-install.dtd"> Include the correct doc type.
I deploy my VS2010 MVC3 project using "Build Deployment Package". The problem is that a couple of files have national (Swedish) characters ÅÄÖ in their filenames, and the deployment package gets these filenames wrong.
For example "Köpvillkor.pdf" becomes "K+Âpvillkor.pdf". The file has the right name in the unzipped "PackageTmp" folder, but inside the "<projname>-<version>.zip" file the filename is mangled, so it seems the problem lies in the way the package is zipped, i.e. it gets an UTF-8 encoded filename from the file system but stores it without conversion as ASCII or WIN1252 or some such inside the zip.
Is there any way to fix this?
If you use IIS to import the deployment package zip file, the filenames will be converted back to the proper encoding.
Unfortunately Winzip, 7-zip and even Windows Explorer Zip extension don't understand the filenames encoding, manual deployment is not possible.
I found today that you can uncheck "Create deployment package as a zip file" and then zip it manually. I use WinZip to zip it manually, and the non-ASCII characters are correctly preserved.