Strange problem with tsNet external on Windows

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange problem with tsNet external on Windows

Mike Kerner via use-livecode
I have a LiveCode standalone running as PC app (a .exe file, plus some other files which are needed when it runs). If I simply run the original standalone on Windows 7 (OK, running under Parallels on a Mac), it all just works. If I create an installer for the program and its dependent files using Inno Setup, the whole thing appears to run smoothly, but when I run the installed version of the app (which is exactly the same size as the original standalone, as expected), I get an error from the LC engine “Initialization Error: Failed to load external: tsNet”. I suppose I have somehow failed to include tsNet, but it was specifically included in the standalone (as “internet”) and anyway the original standalone works.

Should I somehow be giving my installed app a path to the LC externals? I’m confused.

Graham
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: Strange problem with tsNet external on Windows

Mike Kerner via use-livecode
Graham,

Also check tsNet, it's way down at the bottom of the inclusions pane. Or you can disable tsNet and use only libURL.

Here are a couple of handlers to find out if is tsNet is enabled. Below that is how to explicitly enable/disable tsNet.


function GetNetworkType
   local tLibUrlDriver
   
   try
      put the behavior of stack"revLibUrl" into tLibUrlDriver
   end try
   if tLibUrlDriver is empty then
      return "Sockets"
   else
      return "tsNet"
   end if
   
end GetNetworkType

command NetworkType
   if GetNetworkType() = "Sockets" then
      answer"tsNet is disabled"
   else
      answer "tsNet in use"&cr&"Version==>"& tsNetVersion()
   end if
end NetworkType


To unload:

    dispatch "revUnloadLibrary" to stack "tsNetLibUrl"

To load again:

    dispatch "revLoadLibrary" to stack "tsNetLibUrl"


Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]

-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf Of Graham Samuel via use-livecode
Sent: Thursday, March 15, 2018 11:47 AM
To: How to use LiveCode
Cc: Graham Samuel
Subject: Strange problem with tsNet external on Windows

I have a LiveCode standalone running as PC app (a .exe file, plus some other files which are needed when it runs). If I simply run the original standalone on Windows 7 (OK, running under Parallels on a Mac), it all just works. If I create an installer for the program and its dependent files using Inno Setup, the whole thing appears to run smoothly, but when I run the installed version of the app (which is exactly the same size as the original standalone, as expected), I get an error from the LC engine “Initialization Error: Failed to load external: tsNet”. I suppose I have somehow failed to include tsNet, but it was specifically included in the standalone (as “internet”) and anyway the original standalone works.

Should I somehow be giving my installed app a path to the LC externals? I’m confused.

Graham
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem with tsNet external on Windows

Mike Kerner via use-livecode
In reply to this post by Mike Kerner via use-livecode
I finally answered my own question - it was simple and I was nearly right in my first guess. I forgot to include the ‘Externals’ folder in the files and folders encapsulated by the PC installer maker. I suppose I live too much in the Mac world. The live program looks for an ‘Externals’ folder in its immediate vicinity and if it doesn’t find one, or the contents are wrong, it very sensible reports an error. It would be better if the error was “can’t find Externals folder” rather than “can’t find tsNet”, but that’s a weak excuse on my part.

There you go - deployment stumbling block number 42, I suppose.

Graham

> On 15 Mar 2018, at 16:47, Graham Samuel via use-livecode <[hidden email]> wrote:
>
> I have a LiveCode standalone running as PC app (a .exe file, plus some other files which are needed when it runs). If I simply run the original standalone on Windows 7 (OK, running under Parallels on a Mac), it all just works. If I create an installer for the program and its dependent files using Inno Setup, the whole thing appears to run smoothly, but when I run the installed version of the app (which is exactly the same size as the original standalone, as expected), I get an error from the LC engine “Initialization Error: Failed to load external: tsNet”. I suppose I have somehow failed to include tsNet, but it was specifically included in the standalone (as “internet”) and anyway the original standalone works.
>
> Should I somehow be giving my installed app a path to the LC externals? I’m confused.
>
> Graham
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode