Introduction to the introduction of lae interface development tools 14--"Introduction to how to package and compile lae on the windows platform"

Video explanation: http://www.tudou.com/programs/view/pKDsOX5BNF8/

Hello everyone! Now I will introduce how to compile, package and release lae on the windows platform

Compilation refers to the process in which the user integrates his own code with the link library of lae to generate an application program; packaging is to store the necessary module dll that the application program developed by the user depends on in the application program directory; after compiling and packaging, the user can generate their own application, and allow the application to run normally in the environment of different computers and different platforms.

1> Development environment: Visual Studio 2010 ( Visual Studio is a development environment launched by Microsoft and is currently the most popular Windows platform application development environment)

2>lae tool download address:

https://github.com/ouloba/laetool.git     

https://pan.baidu.com/s/1ckMy0Q            

                  

1. New project

   1> Open visual studio 2010.

    2> Create a new project, in the menu [File] à [New] -> [Project].

In the pop-up new project window, select [visual c++]->[Win32]->[Win32 project], then enter the project name in the "Name" window below, select the project save location in the "Location" window, and click [OK] .

In the pop-up window, click [Finish] to complete the new project.

The following figure [Solution Explorer] window shows the project file automatically generated by the system, and the [demo6.cpp] window on the right is the template code generated by the system.

(If you cannot see the [Solution Explorer] window, please click the menu [Window] -> [Reset Window Layout])

 

2. Modify to a multi-byte character set

  Click the demo6 project in the [Solution Explorer] window, right-click, and click [Properties] in the pop-up menu.

 

The [demo6 Property Page] window pops up, select [All Configurations] in the [Configuration] window, select [Character Set] on the property page on the right of [Configuration Properties → General], and select [Use Multibyte Character Set] in the drop-down list, Finally, click [Apply] to save.

 

  3. Modify the template code generated by the system.

First, click demo6.cpp to open the [Solution Explorer] window, and delete all the code generated by the system in the [demo6.cpp] window on the right.

Then, open the main.cpp file in librarys/windows/example/win32 in the laetool directory, copy the code in it, right-click in the [demo6.cpp] window, and select [Paste] in the pop-up menu.

          

Before replacement:

After replacement:

4. Set the project

Click the demo6 project in the [Solution Explorer] window, then right-click, click [Properties] in the pop-up menu, and the [demo6 Properties Page] window will pop up, in which the following properties need to be set.

 

  1> Set the dependency header file directory, librarys/windows/include in the laetool directory

Operation method: Click [Configuration Properties] -> [c/c++], click the blank space on the right side of [Additional Include Directories] in the properties window on the right, a drop-down button appears, click this button, and select [Edit] in the drop-down menu, The [Additional Include Directory] dialog box will pop up, click , the editable input box and button will appear below , select the button, the directory selection dialog box will pop up, and then select librarys/windows/include under the lae tool directory

 

  2> Set the dependency link library file directory, librarys/windows/lib in the laetool directory

Operation method: Click [Configuration Properties] -> [Linker] -> [General], click the blank space on the right side of [Additional Library Directory] in the properties window on the right, a drop-down button appears, click this button, and select from the drop-down menu. [Edit], the [Additional Include Directory] dialog box will pop up, click , the editable input box and button , select the button, the directory selection dialog box will pop up, and then select librarys/windows/lib under the lae tool directory

 

  3>Add link library file, LXZCore_share.lib

Operation method: Click [Configuration Properties]->[Linker]->[Input], click [Additional Dependencies] in the right middle of the property window on the right, the [Additional Dependencies] dialog box will appear, and input in the input box "LXZCore_share.lib", click [OK], and click [Apply] in the lower right corner of the [demo6 property page] to save.

 

5. Compile and generate

    Right-click the [demo6 project] in the [Solution Explorer] window, and click [Generate] to compile the pop-up menu. The compilation result is displayed in [Show Output Source].

 

6. Copy the relevant dll files

    First, determine the build output directory of your project. The easiest way is to search from the compile output window. The output directory in the following figure is: "H:\demo\demo6\Release"

  1>LXZCore_share.dll is located in the librarys/windows/bin folder under the laetool directory

  2>lua51.dll is located in the distribute folder in the laetool directory

  3>libeay32.dll is located in the distribute folder under the laetool directory

           

7. Copy resource packs and configuration files

    First, determine the build output directory of your project . You can refer to the method of copying the dll above to determine the compilation output directory .

      For the resource packaging process, please refer to: http://my.oschina.net/u/1030910/blog/713718

    If you already have your own lae project:

        1> The resources are not packaged, you can copy all the files in the project directory created by your lae tool to the compilation output directory

        2> The resources have been packaged, and the configuration file is the default.cfg file that is automatically created when lae creates a new project; the resource package is the lae development tool after creating a new project, editing the interface, writing logic, and completing the test, the related resource files are packaged to generate LXZ is a file with the extension. Both of these files are in the package folder of your lae project directory.

    If you don't have your own lae project:

        You can copy the 2048 game configuration file default.cfg and resource package file Game2048.LXZ from the librarys/windows/resource directory in the laetool directory to the Visual studio 2010 project compilation output directory. For example, the output directory of the example being demonstrated is: /demo/ demo6/Release.

Also need to copy the font file MicrosoftYaHei.ttf in the laetool directory to the above directory (H:/demo/demo6/Release).

 

6. Double-click demo6.exe to run

   

8. Publish the application

The release version of the application program needs to be attached with the relevant dll files, so that the application program can run normally in the environment of different computers and different platforms.

. The currently dependent dlls are stored in distribute in the laetool tool directory.

    1> dll required for platforms above win7

        msvcr100.dll

        msvcp100.dll

        LXZCore_share.dll

        lua51.dll

        libeay32.dll

        

 

    2> dll required by xp platform

        msvcr100.dll

        msvcp100.dll

        normaliz.dll

        opengl32.dll

        LXZCore_share.dll

        lua51.dll

        libeay32.dll

        

 

This class mainly talks about the specific operations of lae in the Visual studio 2010 development environment to build projects, set projects, compile and generate, package dll, package resources and publish applications.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325477236&siteId=291194637