Jump to content

YumeYao

Member
  • Posts

    73
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    China

Everything posted by YumeYao

  1. I just built a self-made version for my need yesterday and I encountered this bug so I just fixed it. It's really dangerous because people who want to turn it off will and doesn't test it will have the wrong sfx then wrong exe. BTW, I have several suggestions( some already done by me locally) to you: Dialog Version I see you're actually telling dialog version apart from non-dialog version by looking for the dialog resources, in other words, the code is same. I think you may want to let user manually add dialogs to versions other than LZMA, but this is not documented. Anyway, in my self-made version, I modified the code to fully disable dialogs, reducing the sfx by 1.5KB. Russian Not to be offensive, but I don't think it's good to add them in the code, or we may need a macro to turn it off. The strings takes too much spaces. Also, you may think save langstrs.cpp as UTF-8, so that users using other languages can compile it without modifications. RTF support on non-dialog versions Well, I tried adding it but failed. But I have some solutions that may work: Getting the Width: 1. Set RTF Control to max width(as the window allows) 2. Get line count. (EM_GETLINECOUNT) 3. Set RTF Control to (it's previous width)/2 4. Get line count, if equals to previous, goto 3, otherwise goto 5 5. Set RTF Control to (it's previous width)-10 6. Get line count, if equals to previous, goto 5, otherwise goto 7 7. Set RTF Control to (it's previous width)-1 8. Get line count, if equals to previous, goto 7, otherwise goto 9 9. Done. Previous width(=current width + 1) is what we need. Getting the height: 1. Get the text 2. Add "\par " to the end. (There must be 2 spaces, first space is omitted because it follows a \par.) 3. Set the text. 4. Get line count. (EM_GETLINECOUNT) 5. Get line index of last line(last return value -1). (EM_LINEINDEX) This index is the white space we just added. 6. Get the position of the white space (EM_POSFROMCHAR), the y-offset is the height. 7. Restore the text to before to not make user confusing(using arrow keys can move the cursor to the invisible white space).
  2. Get WinDDK 2003 SP1 and use the CRT headers from it and lib (msvcrt.lib) from it. Additionally, if you have VC6, you can use the lib from it. (But the CRT header should be from DDK 2003 SP1 or Win7 DDK for bug-free).
  3. BUG on macro _SFX_USE_LANG. (Version 141_2100) main.cpp AString strSignatureBegin; AString strSignatureEnd; #ifdef _SFX_USE_LANG CreateLanguageSignature( idSfxLang, strSignatureBegin, strSignatureEnd ); #endif // _SFX_USE_LANG if( ReadConfig( inStream, strSignatureBegin, strSignatureEnd, config ) == false ) /* DANGER!!!! arg2 and arg3 not inited!!!! */ { /* BUG!!!!! NEVER REACH HERE!!! Because ReadConfig Easily Find the Signature of NULL and consider it have found the signature. */ if( ReadConfig( inStream, kSignatureConfigStart, kSignatureConfigEnd, config ) == false ) { SfxErrorDialog( FALSE, ERR_READ_CONFIG ); return ERRC_READ_CONFIG; } } This code will leave strSignatureBegin and strSignatureEnd not initialized and therefore the sfx doesn't work. The fix I'm using: #ifdef _SFX_USE_LANG AString strSignatureBegin; AString strSignatureEnd; CreateLanguageSignature( idSfxLang, strSignatureBegin, strSignatureEnd ); if( ReadConfig( inStream, strSignatureBegin, strSignatureEnd, config ) == false ) // if fall through #endif // _SFX_USE_LANG if( ReadConfig( inStream, kSignatureConfigStart, kSignatureConfigEnd, config ) == false ) { SfxErrorDialog( FALSE, ERR_READ_CONFIG ); return ERRC_READ_CONFIG; }
  4. Making the script is another thing, for example, I have to make seperate .mst's for each language pack, rather than a generic tutorial(same steps). Maybe I could give it a simple edit to support slipstreaming latest updates. Also there are many limits with the cmd command. I have added a lot of features in my pack, as you can see: 1. updates are listed out in ARP. This requires: the msp, the vbscript, then the mst. msp can't be made by cmd easily(or accurately the pcp, patch creation property), neither can the mst. 2. updated files. Should I include the updated files in the pack(if I could ever update SNMsynth with full functionality), or should I suggest downloading them? The original packages are probablly up to 1GB. 3. use external tree instead of admin external The other features may be added by the means of cmd and mst, i guess. In total, I find that a tutorial is much easier(for me to write) and help experienced and knowledged people understand the msi package and the .NET package narrowly.
  5. Yes that's correct. But the blocking of KB974417 is still essential. Don't worry it's done by SNMsynth
  6. Removing __CxxFrameHandler3(MSVCRT.DLL) dependency on x64: This entry point is available in MSVCRT.DLL of Windows7 x64/Windows Srv 2008 R2, but unfortunately, it's missing in MSVCRT.DLL of Windows XP/2003 x64. After searching, I found this post: http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesnative/thread/7099bc65-6d13-4651-aef2-cdb1d8bc78d7 One reply suggests: extern "C" void *__CxxFrameHandler; extern "C" void __declspec(naked) __CxxFrameHandler3(void) { // Jump indirect: Jumps to __CxxFrameHandler _asm jmp __CxxFrameHandler ; Trampoline bounce }It's good enough on x86, I suppose you may consider using that in your Exceptions.cpp, replacing your extern "C" void __CxxFrameHandler3. Yet x64 compiler doesn't support _asm and the keyword "naked". So you have to use the bloated C code on x64: extern "C" void *__CxxFrameHandler( PEXCEPTION_RECORD rec, void * frame, PCONTEXT context, void ** dispatch ); extern "C" void __CxxFrameHandler3( PEXCEPTION_RECORD rec, void * frame, PCONTEXT context, void ** dispatch ) { __CxxFrameHandler( rec, frame, context, dispatch ); } I have tested it and it passed the linking with an old MSVCRT.LIB. You could look at this and try making some exceptions while executing/debugging, to see whether this works, and consider using it in your next version. -EDIT- Added a screenshot:
×
×
  • Create New...