Windows Exe (made by link.lsp) could not read self exe-file.

Q&A's, tips, howto's
Locked
unya
Posts: 27
Joined: Fri Feb 26, 2010 8:30 am
Contact:

Windows Exe (made by link.lsp) could not read self exe-file.

Post by unya »

Hello,

Japanese (or CJK) may be environmental issues, UT8 version had problems with the execution.

1. executable (module link.lsp made from) will not run correctly from the Japanese path. Failure to read encrypted lisp code from self-execution file.
--> patch - self exeutable-filepath-name UTF-8 on startup.

2. Command Parameters (argv) is still MBCS. problem with main-args function as reference. Or some code to create and process, UTF8 must convert.
(main-args returns Character is MBCS)
--> changed main-args returns UTF8 string list on startup.

attached diff-file and the chaned file (protos.h, newlisp.c, win32-path.c).
base file is newlisp-10.3.0.

thanks,
Attachments
utf8-exe-patch.zip
(43.71 KiB) Downloaded 169 times

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: Windows Exe (made by link.lsp) could not read self exe-f

Post by Lutz »

Thanks Unya, well done.

The merge is accessible here:

http://www.newlisp.org/downloads/develo ... nprogress/

unya
Posts: 27
Joined: Fri Feb 26, 2010 8:30 am
Contact:

Re: Windows Exe (made by link.lsp) could not read self exe-f

Post by unya »

Thank you, Lutz.

"MBSC" is typo in CHANGES-10.3.1.txt, it's "MBCS".

Regards,

kosh
Posts: 72
Joined: Sun Sep 13, 2009 5:38 am
Location: Japan
Contact:

Re: Windows Exe (made by link.lsp) could not read self exe-f

Post by kosh »

Hi Lutz.

A ifdef macro syntax errors found. [CentOS 5.5 x86_64]
(It is necessary to be likely to contact Ted Walther, because configure-alt is used..)

Code: Select all

$ ./configure-alt && make
...
make -f makefile_build
make[1]: Entering directory `/home/kosh/src/newlisp-10.3.1'
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c  -DNEWCONFIG newlisp.c
newlisp.c:629:27: error: operator '&&' has no right operand
make[1]: *** [newlisp.o] Error 1
make[1]: Leaving directory `/home/kosh/src/newlisp-10.3.1'
make: *** [default] Error 2
a patch file here:

Code: Select all

--- newlisp.orig.c 2011-04-02 23:32:01.000000000 +0900
+++ newlisp.c   2011-04-06 00:06:12.000000000 +0900
@@ -626,7 +626,9 @@
 initStacks();
 initDefaultInAddr(); 
 
-#if WIN_32 && SUPPORT_UTF8
+/* #if defined(WIN_32) && defined(SUPPORT_UTF8) */
+#ifdef WIN_32
+#ifdef SUPPORT_UTF8
  {
    /*
      command line parameter is MBCS.
@@ -644,7 +646,8 @@
      argv = argv_utf8 ;
    }
  }
-#endif
+#endif  /* SUPPORT_UTF8 */
+#endif  /* WIN_32 */
 mainArgsSymbol->contents = (UINT)getMainArgs(argv);
 
 if((errorReg = setjmp(errorJump)) != 0) 

Locked