Talk:UnTGZ plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
mNo edit summary
m (→‎Wrong example in doc: slightly better interwiki link)
 
(7 intermediate revisions by 2 users not shown)
Line 6: Line 6:
darklogic mirrors appear to be down `[[User:71.163.165.64|71.163.165.64]] 10:11, 12 May 2007 (PDT)
darklogic mirrors appear to be down `[[User:71.163.165.64|71.163.165.64]] 10:11, 12 May 2007 (PDT)
Domain name registration lapsed, now at fdos.org
Domain name registration lapsed, now at fdos.org
== Error after recompile ==
How do you compile it Unicode ?
If I try to recompile on MSVC9 (Visual 2008) without Unicode charset, it corrupts the command line (certainly bad character interpretation).
If I set the Unicode flag for compilation, I have errors like :
Error 1 error C2664: '_T2A' : cannot convert parameter 1 from 'TCHAR [1024]' to 'unsigned short *' c:\program files\unsis\plugins\untgz\untgz.cpp 288
I'll try some cast... But I think... is this plugin still supported ? The ID was good, although the source code is CPP only by the name...
EDIT : fixed with changing signature to 
char * _T2A(void *str);
and casting (because of unsupported TCHAR[] to unsigned short*  cast)
== Submit diff for progress bar ==
This is an HG (mercurial) diff :
http://pastebin.com/ZrSGG72D
== Wrong example in doc ==
The following check is wrong, it should be <code>$R0</code> instead of <code>$0</code>, I had to read the code on [https://github.com/ilanschnell/untgz/blob/339ed9567a1620cb57cc5f39f51b67f667ba1b13/untgz.cpp#L130 this Github mirror] to discover why my script always showed the failure [[Reference/MessageBox|MessageBox]], even on success.
; Unzip $TEMP\$FILENAME into installation directory
<highlight-nsis>; Unzip $TEMP\$FILENAME into installation directory
untgz::extract "-j" "-d" "$INSTDIR" "$TEMP\$FILENAME"
StrCmp $0 "success" +4
DetailPrint "  Failed to extract ${DICT_FILENAME}"
MessageBox MB_OK|MB_ICONEXCLAMATION|MB_DEFBUTTON1 "  Failed to extract $FILENAME"
Abort
; Delete temporary files
Delete "$TEMP\$FILENAME"
</highlight-nsis>
This is now corrected in [[UnTGZ plug-in#Example usage|the wiki page]] ([http://nsis.sourceforge.net/mediawiki/index.php?title=UnTGZ_plug-in&diff=prev&oldid=24707 diff]).<br>
-- [[User:Bugmenot|Bugmenot]] ([[User talk:Bugmenot|talk]]) 15:25, 26 January 2016 (UTC)

Latest revision as of 15:35, 26 January 2016

My antivirus, Kaspersky thinks this is a trojan. Anyone else getting issues like this?

It should be a false positive; I'm running Norton Antivirus and have a firewall + try to keep Windows patched, so my system is hopefully clean -- the full source is there if you want to compile yourself and verify [the free MS compiler toolkit should work to build it]. Which version? Jeremy


darklogic mirrors appear to be down `71.163.165.64 10:11, 12 May 2007 (PDT) Domain name registration lapsed, now at fdos.org

Error after recompile

How do you compile it Unicode ? If I try to recompile on MSVC9 (Visual 2008) without Unicode charset, it corrupts the command line (certainly bad character interpretation). If I set the Unicode flag for compilation, I have errors like :

Error 1 error C2664: '_T2A' : cannot convert parameter 1 from 'TCHAR [1024]' to 'unsigned short *' c:\program files\unsis\plugins\untgz\untgz.cpp 288

I'll try some cast... But I think... is this plugin still supported ? The ID was good, although the source code is CPP only by the name...

EDIT : fixed with changing signature to

char * _T2A(void *str);

and casting (because of unsupported TCHAR[] to unsigned short* cast)

Submit diff for progress bar

This is an HG (mercurial) diff :

http://pastebin.com/ZrSGG72D

Wrong example in doc

The following check is wrong, it should be $R0 instead of $0, I had to read the code on this Github mirror to discover why my script always showed the failure MessageBox, even on success.

Unzip $TEMP\$FILENAME into installation directory
; Unzip $TEMP\$FILENAME into installation directory
untgz::extract "-j" "-d" "$INSTDIR" "$TEMP\$FILENAME"
StrCmp $0 "success" +4
	DetailPrint "  Failed to extract ${DICT_FILENAME}"
	MessageBox MB_OK|MB_ICONEXCLAMATION|MB_DEFBUTTON1 "  Failed to extract $FILENAME"
	Abort
 
; Delete temporary files
Delete "$TEMP\$FILENAME"

This is now corrected in the wiki page (diff).
-- Bugmenot (talk) 15:25, 26 January 2016 (UTC)