Baseline for creating Angelica2 programs

Results 1 to 2 of 2
  1. #1
    Valued Member Mistigri is offline
    MemberRank
    Oct 2020 Join Date
    Forsaken WorldLocation
    120Posts

    Cool Baseline for creating Angelica2 programs

    ---Basics:
    This discovery opens the path of creating tools similar to Wanmei's native tools!



    This is a Wanmei Screenshot from a Documentation publicly shared by Fyyre.
    Project templates(.awx) are used to facilitate our work and help us avoid writing projects from scratch each time.

    *We mainly care about 3 project templates:
    1)"3ds max plugins wizard R5.0" that can be found in 3ds max 5 SDK.
    2)"Directx AppWizard" that can create Directx8 template in ..\DX8SDK\bin\DXUtils\AppWizard
    3)"Angelica3D AppWizard" that can be used to create Angelica Projects.

    ---How to use App Wizard for Visual Studio 6:
    Templates files have to be moved here:
    Code:
    C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\IDE
    Basically this Angelica App Wizard enable us to do 2 types of programs:
    1)Win32 program
    2)MFC SDI Program(Angelica2 Editor)

    ---Angelica3D AppWizard:
    *AngelicaAppWiz.awx (Angelica App Wizard) is created by the following VS6 project:
    Code:
    ..\Angelica2\Samples\AngelicaAppWiz
    We will follow these specific steps to compile this project:
    I-We will adjust the path for afxhelp.hm in ..\Angelica2\Samples\AngelicaAppWiz\hlpAngelicaAppWiz.hpj
    Code:
    #include <F:\Microsoft Visual Studio\VC98\MFC\include\afxhelp.hm>
    In my case it should be modified like this:
    Code:
    #include <C:\Program Files\Microsoft Visual Studio\VC98\MFC\Include\afxhelp.hm>
    II-We may be able to compile the different builds but trying to use this template to create projects will generate some errors that we will be fixing through adding some libraries in the linking process:
    ->Release build gives us the following errors:
    Code:
    AngelicaMedia.lib(AMOggFile.obj) : error LNK2001: unresolved external symbol _ov_pcm_total
    AngelicaMedia.lib(AMOggFile.obj) : error LNK2001: unresolved external symbol _ov_open_callbacks
    AngelicaMedia.lib(AMOggFile.obj) : error LNK2001: unresolved external symbol _ov_clear
    AngelicaMedia.lib(AMOggFile.obj) : error LNK2001: unresolved external symbol _ov_pcm_seek
    AngelicaMedia.lib(AMOggFile.obj) : error LNK2001: unresolved external symbol _ov_read
    AngelicaMedia.lib(AMOggFile.obj) : error LNK2001: unresolved external symbol _ov_info
    This requires to add the following libraries for release build in the linking process:
    vorbisfile_static.lib ogg_static.lib


    ->Debug build has 2 different errors:
    1)Linking error type 1:
    Code:
    AngelicaCommon_d.lib(AMemoryDbg.obj) : error LNK2001: unresolved external symbol __imp__SymInitialize@12
    AngelicaCommon_d.lib(AMemoryDbg.obj) : error LNK2001: unresolved external symbol __imp__SymSetOptions@4
    AngelicaCommon_d.lib(AMemoryDbg.obj) : error LNK2001: unresolved external symbol __imp__SymGetLineFromAddr@16
    AngelicaCommon_d.lib(AMemoryDbg.obj) : error LNK2001: unresolved external symbol __imp__SymFromAddr@20
    This requires to add the following libraries for debug build in the linking process:
    DbgHelp.lib


    2)Linking error type 2:
    Code:
    AngelicaMedia_d.lib(AMOggFile.obj) : error LNK2001: unresolved external symbol _ov_pcm_total
    AngelicaMedia_d.lib(AMOggFile.obj) : error LNK2001: unresolved external symbol _ov_open_callbacks
    AngelicaMedia_d.lib(AMOggFile.obj) : error LNK2001: unresolved external symbol _ov_clear
    AngelicaMedia_d.lib(AMOggFile.obj) : error LNK2001: unresolved external symbol _ov_pcm_seek
    AngelicaMedia_d.lib(AMOggFile.obj) : error LNK2001: unresolved external symbol _ov_read
    AngelicaMedia_d.lib(AMOggFile.obj) : error LNK2001: unresolved external symbol _ov_info
    This requires to add the following libraries for debug build in the linking process:
    vorbisfile_static_d.lib ogg_static_d.lib



    III-We will need to modify ..\Angelica2\Samples\AngelicaAppWiz\AngelicaAppWizAw.cpp:

    We assume that custom code will be in bold and colored Blue.
    Code:
            //    Add our own libs
            if (bDebug)
            {
                pConfig->AddToolSettings(L"link.exe", L"zliblib.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"mpg123lib.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"Immwrapper.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"AngelicaCommon_d.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"Angelica3D_d.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"AngelicaFile_d.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"AngelicaMedia_d.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"dxguid.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"d3d8.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"d3dx8.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"dsound.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"shlwapi.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"vorbisfile_static_d.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"ogg_static_d.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"DbgHelp.lib", dummy);
    
                //    Set code generation type to 'Debug Multithread DLL'
                pConfig->RemoveToolSettings(L"cl.exe", L"/MTd", dummy);
                pConfig->RemoveToolSettings(L"cl.exe", L"/MLd", dummy);
                pConfig->AddToolSettings(L"cl.exe", L"/MDd", dummy);
            }
            else    //    Release version
            {
                pConfig->AddToolSettings(L"link.exe", L"zliblib.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"mpg123lib.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"Immwrapper.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"AngelicaCommon.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"Angelica3D.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"AngelicaFile.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"AngelicaMedia.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"dxguid.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"d3d8.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"d3dx8.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"dsound.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"shlwapi.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"vorbisfile_static.lib", dummy);
                pConfig->AddToolSettings(L"link.exe", L"ogg_static.lib", dummy);
    
                //    Set code generation type to 'Debug Multithread DLL'
                pConfig->RemoveToolSettings(L"cl.exe", L"/MT", dummy);
                pConfig->RemoveToolSettings(L"cl.exe", L"/ML", dummy);
                pConfig->AddToolSettings(L"cl.exe", L"/MD", dummy);
            }
    Further localization to dialogs can be done by editing resource script or rc files in ..\Angelica2\Samples\AngelicaAppWiz
    In this way created projects based on template will be in english or whatever language you want.





    I'm grateful for the people who have supported me in my FW work.
    Special thanks to @W33d who helped me figure out how to fix linking errors for projects.

    By the way,it's possible to compile tools at times just by commenting code but this is a very bad practice that has to be avoided in most of the cases since it will result in broken or half-finished shit.

    Last edited by Mistigri; 4 Weeks Ago at 11:19 AM.


  2. #2
    Member Rokky is offline
    MemberRank
    Jul 2020 Join Date
    95Posts
    You devoted all your free time to studying the code, many people could not stand it and gave up, but not you...



Advertisement