DXperience: The Chinese method for re-compiling; dxperience: The Chinese method for compiling

Source: Internet
Author: User

DXperience: The Chinese method for re-compiling; dxperience: The Chinese method for compiling

1. You must have all source code SourceCode of the corresponding DXperience version. Copy all source code to the \ Program Files \ Developer Express. NET vX. X \ Sources directory. The default location of the target directory is C: \ Program Files \ Developer Express. NET vX. X \ Sources \ (where X. X should replace the corresponding version number, which is not repeated below ).
2. A file with a strong name must be created. To create this file, you must run the following command to create your own key: sn-k StrongKey. snk and copy the newly generated strong naming key StrongKey. snk file to \ Devexpress under the Sources directory. key \ directory. The sn.exe tool is located in the \ Program Files \ MicrosoftVisual Studio 8 \ SDK \ v2.0 \ Bin directory.
The command for extracting and exporting the Public Key is sn-p StrongKey. snk key.txt, and the command for displaying the Public Key is sn-tp key.txt or sn-Tp StrongKey. snk.
3. decompress the compilation script. Decompress the compiled script package of the downloaded version, and then extract all files (excluding subdirectories)
Copy to the Sources subdirectory of the DXperience installation directory.
4. If you want to restore the original official assembly after re-compilation, run clear. bat and reinstall DXperience in repair mode.
5. Open defines. bat in notepad. In Visual Studio 2005, change vsver = vs2008 to vsver = vs2005.
6. Run clear. bat to delete the trial version Assembly DLL in the global cache. If assembly is locked, close all running applications, restart the IIS Admin Service, and run clear. bat again.
7. Run buildall. cmd to regenerate the Assembly DLL of the official version. Some yellow warnings may be displayed during compilation. Don't worry, there will be no errors.
8. regenerate the Toolbox tab. Choose Start> All Programs> Developer Express. NET vX. x-> Tools-> ToolboxCreator, delete the VS2005/VS2008 toolkit tabs of the trial version, and regenerate the VS2005/VS2008 toolkit tabs of the official version.
9. The publickeytoken.txt(publickeytoken.txt text file is automatically generated when the previous step is compiled. It records the Public Key tag and recompiles the assembly of DevExpress. * with the new Public Key in the source code directory Sources. See:
10. There are three ways to upgrade the original application by using the project converter ProjectConverter provided by DXperience:
1) if you have been using the official version, use ProjectConverter, specify the application directory, and then upgrade it. The specific method is: start execution-> All Programs-> Developer Express. NET vX. x-> Tools-> ProjectConverter in the pop-up dialog box, select the path of the VS project file, remove the create backup file check box, and press Upgrade. ProjectConverter will show all convert the reference of the DXperience assembly to the new version.
2) if you are using a re-compiled version, find the public key of the compiled version and use the following command to upgrade it:
RUN Command:
"C: \ Program Files \ Developer Express. NET vX. X \ Tools \ DXperience \ ProjectConverter.exe"/s/k: Public Key "your_project_directory"
"C: \ Program Files \ Developer Express. NET vX. X \ Tools \ DXperience \ ProjectConverter.exe"/s/k:
49d90c14d24271b5 "<your_project_directory>"
3) the most primitive method is to remove the reference of all DEV controls in the project, and then add them again.
11. In the source code of DXperience, you will find that Dev has put various resources in a resource file named LocalizationRes. resx. The resource is located in the corresponding directory under the C: \ Program Files \ Developer Express. NET vX. XSources path.
1. set LocalizationRes. copy the resx file to a directory of your own and rename it as the culture you need. For example, if you want to localize it to German, change it to "LocalizationRes.de. resx ", of course we need Chinese, so we renamed it LocalizationRes. zh-CHS.resx. The form or user control also uses a resx file, which can also be customized.
2. Now we can use the VS development environment to compile this file, as shown in:
3. Now, Alibaba wants to use the resource file generator resgen.exe to convert this file into a resources file. The file is located in the E: \ Program Files \ Microsoft Visual Studio 8 \ SDK \ v2.0 \ Bin directory.
Resgen LocalizationRes. zh-CHS.resx LocalizationRes. zh-CHS.resources.
4. Package the resource file to the satellite accessories, and still use a small tool set chain adapter --al.exe in vscompute. The following command line is to package the LocalizationRes. zh-CHS.resources file into satellite accessories. Al/out: DevExpress. xtraEditors. resources. dll/v: 0.0.0.0/culture: zh-CHS/embed: LocalizationRes. zh-CHS.resources, DevExpress. xtraEditors. localizationRes. zh-CHS.resources/keyfile: strongkey. snk. The preceding parameters are not described in detail. Note that the strongkey corresponding to the keyfile must be consistent with the strongkey specified by the DevExpress component. The al command can also Package Multiple resources files into a single accessory. For example, the following command packages multiple resources into accessories.
% Al %/out :.. \ zh-CHS \ DevExpress. xtraPrinting. % VER_DLL %. resources. dll/v: % VER_PSYS %/culture: zh-CHS/embed: ComponentEditorForm. zh-CHS.resources, DevExpress. xtraPrinting. componentEditorForm. zh-CHS.resources
/Embed: LocalizationRes. zh-CHS.resources, LocalizationRes. zh-CHS.resources/embed: HeaderFooterForm. zh-CHS.resources, DevExpress. xtraPrinting. native. winControls. headerFooterForm. zh-CHS.resources/embed: WatermarkEditorForm. zh-CHS.resources, DevExpress. xtraPrinting. native. winControls. watermarkEditorForm. zh-CHS.resources/keyfile: % KEYFILE %
You can see that several forms of resources have been added, but note that the second parameter in/embed must be added with the namespace of the form or control.
Now that the satellite accessory has been made, you need to configure it in one place so that the Framework can find it. There are usually two methods. One is to put it directly into GAC (Global Assembly Cache can store some public assemblies that many programs need to use), which is convenient and easy to worry about; put them in a specific program directory.
To put it in GAC, the simple method is to drag and drop the satellite accessories directly to the "Windows \ assembly" directory. You can also use the tool gacutil provided by Microsoft and use the following command:
Gacutil/I: LocalizerRes. zh-CHS.resources.dll
If it is not in GAC, put it in the directory where your program is located (see the method of using official Chinese resources ).
Using Official Chinese resources:
1. static void Main ()
{
Application. EnableVisualStyles ();
Application. SetCompatibleTextRenderingDefault (false );
System. Threading. Thread. CurrentThread. CurrentUICulture = new System. Globalization. CultureInfo ("zh-CHS"); // Add this line of code
Application. Run (new Form1 ());
}
2. Copy the zh-CN and zh-CNS directories in the Chinese official Chinese resource package to your program directory (SEE ):
Assessment http://www.devexpress.com/Downloads/NET/
Compile script http://www.devexpress.com/Support/Center/KB/p/A609.aspx
Official satellite resource http://www.devexpress.com/Support/Center/KB/p/A609.aspx
Official Chinese Resources Co., http://www.devexpress.com/Support/Center/KB/p/A421.aspx.
The default path is D: \ Program Files \ Developer Express. NET v8.3 \ Tools \ DXperience>
Source: http://blog.csdn.net/sqyfzx/archive/2009/04/17/4086232.aspx

Static void Main ()
{
Application. EnableVisualStyles ();
Application. SetCompatibleTextRenderingDefault (false );
System. Threading. Thread. CurrentThread. CurrentUICulture = new System. Globalization. CultureInfo ("zh-CHS"); // Add this line of code
Application. Run (new Form1 ());
}
In fact, this section does not need to be added. NET will automatically identify it based on the region options of the operating system, unless it is necessary to manually switch to another language or make a multi-language version;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.