Changeset 211


Ignore:
Timestamp:
05/26/07 11:00:28 (13 years ago)
Author:
Eoin
Message:

Translation DLL Identification.

Files:
9 edited

Legend:

Unmodified
Added
Removed
  • Halite.pnproj

    r209 r211  
    1 <<<<<<< .mine 
    2 <Project name="Halite"><MagicFolder excludeFolders="CVS;.svn" filter="*.*" name="res" path="res\"><File path="1337.rc"></File><File path="afxres.h"></File><File path="CVTRES.EXE"></File><File path="GoLink.exe"></File><File path="GoRC.exe"></File><File path="Halite.dll"></File><File path="Halite.ico"></File><File path="Halite.rc"></File><File path="Halite.RES"></File><File path="LINK.EXE"></File><File path="Manifest.xml"></File><File path="MSPDB50.DLL"></File><File path="RC.EXE"></File><File path="RCDLL.DLL"></File><File path="RcTextExt.rb"></File><File path="resource.h"></File><File path="Template.rc"></File><File path="toolbar.bmp"></File></MagicFolder><MagicFolder excludeFolders="CVS;.svn" filter="*.*" name="src" path="src\"><MagicFolder excludeFolders="CVS;.svn" filter="*.*" name="advtabs" path="advtabs\"><File path="Debug.cpp"></File><File path="Debug.hpp"></File><File path="Peers.cpp"></File><File path="Peers.hpp"></File><File path="ThemeTestDialog.hpp"></File><File path="Torrent.cpp"></File><File path="Torrent.hpp"></File><File path="Tracker.cpp"></File><File path="Tracker.hpp"></File><File path="TrackerAddDialog.hpp"></File><File path="TrackerListView.cpp"></File><File path="TrackerListView.hpp"></File></MagicFolder><MagicFolder excludeFolders="CVS;.svn" filter="*.*" name="global" path="global\"><File path="ini.cpp"></File><File path="ini.hpp"></File><File path="ini_adapter.cpp"></File><File path="ini_adapter.hpp"></File><File path="logger.cpp"></File><File path="logger.hpp"></File><File path="string_conv.cpp"></File><File path="string_conv.hpp"></File><File path="tinyxml.cpp"></File><File path="tinyxml.hpp"></File><File path="tinyxmlerror.cpp"></File><File path="tinyxmlparser.cpp"></File><File path="unicode.hpp"></File><File path="utf8.hpp"></File><File path="wtl_app.cpp"></File><File path="wtl_app.hpp"></File></MagicFolder><File path="AdvHaliteDialog.cpp"></File><File path="AdvHaliteDialog.hpp"></File><File path="ConfigOptions.cpp"></File><File path="ConfigOptions.hpp"></File><File path="CSSFileDialog.hpp"></File><File path="DdxEx.hpp"></File><File path="DebugDialog.hpp"></File><File path="DropFileTarget.h"></File><File path="halConfig.cpp"></File><File path="halConfig.hpp"></File><File path="halEvent.cpp"></File><File path="halEvent.hpp"></File><File path="Halite.cpp"></File><File path="Halite.hpp"></File><File path="HaliteDialog.cpp"></File><File path="HaliteDialog.hpp"></File><File path="HaliteDialogBase.hpp"></File><File path="HaliteEditCtrl.hpp"></File><File path="HaliteIni.hpp"></File><File path="HaliteListManager.hpp"></File><File path="HaliteListView.cpp"></File><File path="HaliteListView.hpp"></File><File path="HaliteListViewCtrl.hpp"></File><File path="HaliteTabCtrl.hpp"></File><File path="HaliteTabPage.hpp"></File><File path="HaliteWindow.cpp"></File><File path="HaliteWindow.hpp"></File><File path="halTorrent.cpp"></File><File path="halTorrent.hpp"></File><File path="halXmlRpc.cpp"></File><File path="halXmlRpc.hpp"></File><File path="NTray.cpp"></File><File path="NTray.hpp"></File><File path="ProgressDialog.hpp"></File><File path="SimpleHtml.h"></File><File path="SplashDialog.hpp"></File><File path="SSFileDialog.hpp"></File><File path="stdAfx.cpp"></File><File path="stdAfx.hpp"></File><File path="TranslationDll.cpp"></File><File path="UxthemeWrapper.cpp"></File><File path="UxthemeWrapper.hpp"></File><File path="WinAPIMutex.hpp"></File></MagicFolder><MagicFolder excludeFolders="CVS;.svn" filter="*" name="Lang" path="lang\"><File path="1337.txt"></File><File path="Dutch.txt"></File><File path="French.txt"></File><File path="German.txt"></File><File path="NewLang.txt"></File><File path="Polish.txt"></File><File path="Slovenian.txt"></File><File path="Template.txt"></File><File path="Turkish.txt"></File></MagicFolder><File path="Jamfile"></File></Project>======= 
    3 <Project name="Halite"><MagicFolder excludeFolders="CVS;.svn" filter="*.*" name="res" path="res\"><File path="1337.rc"></File><File path="Halite.aps"></File><File path="Halite.ico"></File><File path="Halite.rc"></File><File path="Manifest.xml"></File><File path="RcTextExt.rb"></File><File path="resource.h"></File><File path="Template.rc"></File><File path="toolbar.bmp"></File></MagicFolder><MagicFolder excludeFolders="CVS;.svn" filter="*.*" name="src" path="src\"><MagicFolder excludeFolders="CVS;.svn" filter="*.*" name="advtabs" path="advtabs\"><File path="Debug.cpp"></File><File path="Debug.hpp"></File><File path="Peers.cpp"></File><File path="Peers.hpp"></File><File path="ThemeTestDialog.hpp"></File><File path="Torrent.cpp"></File><File path="Torrent.hpp"></File><File path="Tracker.cpp"></File><File path="Tracker.hpp"></File><File path="TrackerAddDialog.hpp"></File><File path="TrackerListView.cpp"></File><File path="TrackerListView.hpp"></File></MagicFolder><MagicFolder excludeFolders="CVS;.svn" filter="*.*" name="global" path="global\"><File path="ini.cpp"></File><File path="ini.hpp"></File><File path="ini_adapter.cpp"></File><File path="ini_adapter.hpp"></File><File path="logger.cpp"></File><File path="logger.hpp"></File><File path="string_conv.cpp"></File><File path="string_conv.hpp"></File><File path="tinyxml.cpp"></File><File path="tinyxml.hpp"></File><File path="tinyxmlerror.cpp"></File><File path="tinyxmlparser.cpp"></File><File path="unicode.hpp"></File><File path="utf8.hpp"></File><File path="wtl_app.cpp"></File><File path="wtl_app.hpp"></File></MagicFolder><File path="AdvHaliteDialog.cpp"></File><File path="AdvHaliteDialog.hpp"></File><File path="ConfigOptions.cpp"></File><File path="ConfigOptions.hpp"></File><File path="CSSFileDialog.hpp"></File><File path="DdxEx.hpp"></File><File path="DebugDialog.hpp"></File><File path="DropFileTarget.h"></File><File path="halConfig.cpp"></File><File path="halConfig.hpp"></File><File path="halEvent.cpp"></File><File path="halEvent.hpp"></File><File path="Halite.cpp"></File><File path="Halite.hpp"></File><File path="HaliteDialog.cpp"></File><File path="HaliteDialog.hpp"></File><File path="HaliteDialogBase.hpp"></File><File path="HaliteEditCtrl.hpp"></File><File path="HaliteIni.hpp"></File><File path="HaliteListManager.hpp"></File><File path="HaliteListView.cpp"></File><File path="HaliteListView.hpp"></File><File path="HaliteListViewCtrl.hpp"></File><File path="HaliteTabCtrl.hpp"></File><File path="HaliteTabPage.hpp"></File><File path="HaliteWindow.cpp"></File><File path="HaliteWindow.hpp"></File><File path="halTorrent.cpp"></File><File path="halTorrent.hpp"></File><File path="halXmlRpc.cpp"></File><File path="halXmlRpc.hpp"></File><File path="NTray.cpp"></File><File path="NTray.hpp"></File><File path="ProgressDialog.hpp"></File><File path="SimpleHtml.h"></File><File path="SplashDialog.hpp"></File><File path="SSFileDialog.hpp"></File><File path="stdAfx.cpp"></File><File path="stdAfx.hpp"></File><File path="UxthemeWrapper.cpp"></File><File path="UxthemeWrapper.hpp"></File><File path="WinAPIMutex.hpp"></File></MagicFolder><MagicFolder excludeFolders="CVS;.svn" filter="*" name="Lang" path="lang\"><File path="1337.txt"></File><File path="Dutch.txt"></File><File path="French.txt"></File><File path="German.txt"></File><File path="NewLang.txt"></File><File path="Polish.txt"></File><File path="Slovenian.txt"></File><File path="Template.txt"></File><File path="Turkish.txt"></File></MagicFolder><File path="Jamfile"></File></Project>>>>>>>> .r208 
     1<Project name="Halite"><MagicFolder excludeFolders="CVS;.svn" filter="*.*" name="res" path="res\"><File path="1337.rc"></File><File path="afxres.h"></File><File path="CVTRES.EXE"></File><File path="German.rc"></File><File path="GoLink.exe"></File><File path="GoRC.exe"></File><File path="Halite.dll"></File><File path="Halite.ico"></File><File path="Halite.rc"></File><File path="Halite.RES"></File><File path="LINK.EXE"></File><File path="Manifest.xml"></File><File path="MSPDB50.DLL"></File><File path="RC.EXE"></File><File path="RCDLL.DLL"></File><File path="RcTextExt.rb"></File><File path="resource.h"></File><File path="Template.rc"></File><File path="toolbar.bmp"></File><File path="Turkish.rc"></File></MagicFolder><MagicFolder excludeFolders="CVS;.svn" filter="*.*" name="src" path="src\"><MagicFolder excludeFolders="CVS;.svn" filter="*.*" name="advtabs" path="advtabs\"><File path="Debug.cpp"></File><File path="Debug.hpp"></File><File path="Peers.cpp"></File><File path="Peers.hpp"></File><File path="ThemeTestDialog.hpp"></File><File path="Torrent.cpp"></File><File path="Torrent.hpp"></File><File path="Tracker.cpp"></File><File path="Tracker.hpp"></File><File path="TrackerAddDialog.hpp"></File><File path="TrackerListView.cpp"></File><File path="TrackerListView.hpp"></File></MagicFolder><MagicFolder excludeFolders="CVS;.svn" filter="*.*" name="global" path="global\"><File path="ini.cpp"></File><File path="ini.hpp"></File><File path="ini_adapter.cpp"></File><File path="ini_adapter.hpp"></File><File path="logger.cpp"></File><File path="logger.hpp"></File><File path="string_conv.cpp"></File><File path="string_conv.hpp"></File><File path="tinyxml.cpp"></File><File path="tinyxml.hpp"></File><File path="tinyxmlerror.cpp"></File><File path="tinyxmlparser.cpp"></File><File path="unicode.hpp"></File><File path="utf8.hpp"></File><File path="wtl_app.cpp"></File><File path="wtl_app.hpp"></File></MagicFolder><File path="AdvHaliteDialog.cpp"></File><File path="AdvHaliteDialog.hpp"></File><File path="ConfigOptions.cpp"></File><File path="ConfigOptions.hpp"></File><File path="CSSFileDialog.hpp"></File><File path="DdxEx.hpp"></File><File path="DebugDialog.hpp"></File><File path="DropFileTarget.h"></File><File path="halConfig.cpp"></File><File path="halConfig.hpp"></File><File path="halEvent.cpp"></File><File path="halEvent.hpp"></File><File path="Halite.cpp"></File><File path="Halite.hpp"></File><File path="HaliteDialog.cpp"></File><File path="HaliteDialog.hpp"></File><File path="HaliteDialogBase.hpp"></File><File path="HaliteEditCtrl.hpp"></File><File path="HaliteIni.hpp"></File><File path="HaliteListManager.hpp"></File><File path="HaliteListView.cpp"></File><File path="HaliteListView.hpp"></File><File path="HaliteListViewCtrl.hpp"></File><File path="HaliteTabCtrl.hpp"></File><File path="HaliteTabPage.hpp"></File><File path="HaliteWindow.cpp"></File><File path="HaliteWindow.hpp"></File><File path="halTorrent.cpp"></File><File path="halTorrent.hpp"></File><File path="halXmlRpc.cpp"></File><File path="halXmlRpc.hpp"></File><File path="NTray.cpp"></File><File path="NTray.hpp"></File><File path="ProgressDialog.hpp"></File><File path="SimpleHtml.h"></File><File path="SplashDialog.hpp"></File><File path="SSFileDialog.hpp"></File><File path="stdAfx.cpp"></File><File path="stdAfx.hpp"></File><File path="TranslationDll.cpp"></File><File path="UxthemeWrapper.cpp"></File><File path="UxthemeWrapper.hpp"></File><File path="WinAPIMutex.hpp"></File></MagicFolder><MagicFolder excludeFolders="CVS;.svn" filter="*" name="Lang" path="lang\"><File path="1337.txt"></File><File path="Dutch.txt"></File><File path="French.txt"></File><File path="German.txt"></File><File path="NewLang.txt"></File><File path="Polish.txt"></File><File path="Template.txt"></File><File path="Turkish.txt"></File></MagicFolder><File path="Jamfile"></File></Project> 
  • Jamfile

    r209 r211  
    7777        <threading>multi 
    7878        <asynch-exceptions>on 
    79         <warnings>off 
     79#       <warnings>off 
    8080         
    8181        <variant>release:<define>NDEBUG 
     
    9292        ; 
    9393         
    94 exe TranslationDll 
    95         : 
    96         ./src/TranslationDll.cpp 
    97         ./src/global/string_conv.cpp 
    98         ./src/global/logger.cpp 
    99         :        
    100         <library>/boost/signals//boost_signals/<link>static 
    101         <library>/boost/filesystem//boost_filesystem/<link>static 
    102         <library>/boost/program_options//boost_program_options/<link>static 
    103         <library>/boost/regex//boost_regex/<link>static  
    104         <library>$(LIBS) 
     94project languagedll 
     95 
     96        : requirements 
    10597         
    106 #       <runtime-link>static 
    107         <threading>multi 
    108         <asynch-exceptions>on 
    109          
    110         <variant>release:<define>NDEBUG 
    111          
    112         <define>_UNICODE 
    113         <define>UNICODE 
    114         <define>WIN32 
    115         <define>_WINDOWS         
    116         <define>_CRT_SECURE_NO_DEPRECATE 
    117         <define>_SCL_SECURE_NO_DEPRECATE 
    118         <define>_CRT_SECURE_NO_WARNINGS 
    119          
    120         <linkflags>/SUBSYSTEM:CONSOLE 
    121         ; 
    122          
    123 lib Template 
    124         : 
    125         /res/Template.rc 
    126         :        
    12798        <link>shared 
    12899        <runtime-link>static 
     
    133104        <linkflags>/MACHINE:X86 
    134105        ; 
     106         
     107#lib Template 
     108#       : 
     109#       /res/Template.rc 
     110#       ; 
    135111 
     112#lib Turkish 
     113#       : 
     114#       /res/Turkish.rc 
     115#       ; 
     116 
  • res/Halite.rc

    r209 r211  
    207207    RTEXT           "Completed:",IDC_STATIC,84,39,39,8 
    208208    LTEXT           "N/A",IDC_COMPLETE,125,39,59,8,SS_WORDELLIPSIS 
    209     GROUPBOX        "",IDC_DETAILS_GROUP,1,-5,359,77,0,WS_EX_TRANSPARENT 
     209    GROUPBOX        "",IDC_DETAILS_GROUP,1,-4,359,77,0,WS_EX_TRANSPARENT 
    210210END 
    211211 
  • src/ConfigOptions.cpp

    r209 r211  
    2424        lang_list_.Attach(GetDlgItem(IDC_LANGLIST)); 
    2525        lang_list_.AddString(L"English"); 
     26        lang_list_.SetCurSel(0); 
    2627         
    2728        if (fs::is_directory(hal::app().exe_path().branch_path())) 
     
    4647                                         
    4748                                        wstring lang_name(buffer.elems); 
    48                                         lang_map_[lang_name] = dir_itr->path();  
     49                                        lang_map_[lang_name] = dir_itr->path().leaf(); 
    4950                                        int index = lang_list_.AddString(lang_name.c_str()); 
    50                                         lang_list_.SetCurSel(index); 
     51                                         
     52                                        if (dir_itr->path().leaf() == halite().dll_) lang_list_.SetCurSel(index); 
    5153                                         
    5254                                        ::FreeLibrary(hMod); 
  • src/ConfigOptions.hpp

    r209 r211  
    3838 
    3939    int OnApply() 
    40         { 
     40        {        
     41                const int buffer_size = 512; 
     42                boost::array<wchar_t, buffer_size> buffer; 
     43                 
     44                lang_list_.GetText(lang_list_.GetCurSel(), buffer.elems); 
     45                std::wstring language(buffer.elems); 
     46                 
     47                if (language == L"English") 
     48                { 
     49                        halite().dll_ = L""; 
     50                        hal::app().revert_res(); 
     51                } 
     52                else 
     53                { 
     54                        halite().dll_ = lang_map_[language].external_file_string(); 
     55                        hal::app().set_res_dll(lang_map_[language].external_file_string()); 
     56                } 
     57                 
    4158                return DoDataExchange(true); 
    4259        } 
  • src/Halite.cpp

    r209 r211  
    124124                _Module.AddMessageLoop(&theLoop); 
    125125                {        
     126                        hal::app().set_initial_hinstance(hInstance); 
    126127                        if (halite().dll() != L"") hal::app().set_res_dll(halite().dll()); 
    127128                         
  • src/global/ini.cpp

    r144 r211  
    11 
    22#include <boost/foreach.hpp> 
     3 
     4#define WINVER 0x0500 
     5#define _WIN32_WINNT 0x0500 
     6#define _WIN32_IE 0x0500 
     7#define _RICHEDIT_VER 0x0200 
     8#define VC_EXTRALEAN 
     9 
     10#include <atlbase.h> 
     11#include <atlapp.h> 
     12 
     13extern CAppModule _Module; 
    314 
    415#include "tinyxml.hpp" 
  • src/global/wtl_app.cpp

    r209 r211  
    3030{ 
    3131 
    32 app_module::app_module() 
     32app_module::app_module() : 
     33        hmod_(NULL) 
    3334{ 
    3435        LPWSTR *szArglist; int nArgs;            
     
    5354} 
    5455 
     56void app_module::revert_res() 
     57{ 
     58        if (hmod_) FreeLibrary(hmod_); 
     59        _Module.SetResourceInstance(instance_); 
     60} 
     61 
    5562void app_module::set_res_dll(std::wstring dll) 
    5663{ 
     64        if (hmod_) FreeLibrary(hmod_); 
    5765        res_dll_ = dll;  
    5866         
    59         HMODULE hMod = ::LoadLibraryEx(dll.c_str(), 0, LOAD_LIBRARY_AS_DATAFILE); 
    60         _Module.SetResourceInstance(reinterpret_cast<HINSTANCE>(hMod)); 
     67        HMODULE hmod_ = ::LoadLibraryEx(dll.c_str(), 0, LOAD_LIBRARY_AS_DATAFILE); 
     68        _Module.SetResourceInstance(reinterpret_cast<HINSTANCE>(hmod_)); 
    6169} 
    6270 
  • src/global/wtl_app.hpp

    r209 r211  
    2525        std::wstring res_wstr(unsigned uID); 
    2626        void set_res_dll(std::wstring dll); 
     27        void revert_res(); 
     28         
     29        void set_initial_hinstance(HINSTANCE instance) { instance_ = instance; } 
    2730         
    2831        friend app_module& app(); 
     
    3134        app_module(); 
    3235         
     36        HMODULE hmod_; 
     37        HINSTANCE instance_; 
    3338        std::wstring exe_string_; 
    3439        std::wstring res_dll_; 
Note: See TracChangeset for help on using the changeset viewer.