Quantcast

Single File Deploy on Windows?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Single File Deploy on Windows?

prothero--- via use-livecode
So, I deliver a single file for my LC standalones on Windows.  Any required DLLs or other needed files are downloaded at runtime and put in place on launch.  However, in LC 9.0.0 it seems there is a dll, “tsNet.dll” that must be in place to even launch!  UG!!  Is there a way to deploy a Windows EXE that is a single file?   For god’s sake, please don’t make be use an installer!!

-Dan

_______________________________________________
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
|  
Report Content as Inappropriate

Re: Single File Deploy on Windows?

prothero--- via use-livecode
Dan Friedman wrote:

 > So, I deliver a single file for my LC standalones on Windows.  Any
 > required DLLs or other needed files are downloaded at runtime and put
 > in place on launch.  However, in LC 9.0.0 it seems there is a dll,
 > “tsNet.dll” that must be in place to even launch!  UG!!  Is there a
 > way to deploy a Windows EXE that is a single file?   For god’s sake,
 > please don’t make be use an installer!!

Long-term dream:  I would LOVE to see some way to embed externals within
the executable file the way SuperCard does (no, SC doesn't use the
resource fork; never did, everything is mapped in its data fork).  I'm
not sure why we can't, since AFAIK the code within a DLL is what's
important to LC, not necessarily that it exists in a physically separate
file, no?  I long to be able to return to truly stand-alone standalones.

Short-term reality: You can download via HTTP/HTTPS using only libURL,
no externals needed.  HTTPS will require the revSecurity DLL, but
conceivably (as I've done on one project) you could download that via
HTTP and then use it for anything needing HTTPS.

All that said, I think I've given up on the dream of stand-alone
standalones, and have gotten back to finishing my installer. Drag.  I
used to love sending people a single file they could just unzip-and-go.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
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
|  
Report Content as Inappropriate

Re: Single File Deploy on Windows?

prothero--- via use-livecode
In reply to this post by prothero--- via use-livecode
Can an empty file placeholder be created within preOpenStack, then extract
the real DLL when it is really needed?

On Apr 3, 2017 6:34 PM, "Dan Friedman via use-livecode" <
[hidden email]> wrote:

> So, I deliver a single file for my LC standalones on Windows.  Any
> required DLLs or other needed files are downloaded at runtime and put in
> place on launch.  However, in LC 9.0.0 it seems there is a dll, “tsNet.dll”
> that must be in place to even launch!  UG!!  Is there a way to deploy a
> Windows EXE that is a single file?   For god’s sake, please don’t make be
> use an installer!!
>
> -Dan
>
> _______________________________________________
> 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
|  
Report Content as Inappropriate

Re: Single File Deploy on Windows?

prothero--- via use-livecode
In reply to this post by prothero--- via use-livecode
Thank you everyone for your suggestions.  I’ve been doing it that way for years (save the dll’s as needed at runtime).  The problem is that it seems that an EXE made from LC 9.0 won’t even launch if you include any items related to the internet (Broswer, Internet, SSL, etc) unless the tsNet.dll is present and in the same directory as the exe.  Now, I can fool LC by unchecking these items in the Inclusions panel.  Now the exe launches.  In my “startup” script, I save the dll’s to disk (from custom props) which works fine.   However, the exe errors when you try to access the internet.  Then I thought that it doesn’t know they are there unless you set the externals of the mainStack.  So, when the app launches, in the startup script, I set the externals of the mainStack to the path to the DLLs, but it still fails.  Now I am sad.

Any thoughts?

Also, what’s with this ginormous DLL “libcef.dll”?  It’s 47.5MB.  Anyone know what that’s related to?

-Dan

_______________________________________________
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
|  
Report Content as Inappropriate

Re: Single File Deploy on Windows?

prothero--- via use-livecode
Dan Friedman wrote:
 > Also, what’s with this ginormous DLL “libcef.dll”?  It’s 47.5MB.
 > Anyone know what that’s related to?

It's the CEF browser engine used by the browser widget.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
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
|  
Report Content as Inappropriate

Re: Single File Deploy on Windows?

prothero--- via use-livecode
In reply to this post by prothero--- via use-livecode
Ok, when we last left our hero….  I was able to save all the dlls and whatnot into custom properties and save them at app launch (exact same structure as when LC made them).  The problem is, the EXE doesn’t recognize that the dlls are in place.  How do you tell the exe that they are there and to use them?  I tried setting the externals of my mainStack to the paths of the new dlls, but that didn’t work.

Interestingly, I created a standalone of the app with all the inclusions and it runs fine.  But, when I check the externals of the mainStack (or any other stack) they are all empty.  ??    How does a dll get referenced (and therefore used) in a Windows standalone made from LC 9?

Anyone have any insight?

-Dan


_______________________________________________
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
|  
Report Content as Inappropriate

Re: Single File Deploy on Windows?

prothero--- via use-livecode
On 4/4/2017 3:57 PM, Dan Friedman via use-livecode wrote:
> Anyone have any insight?

Externals (.dll files that an a LC external) can be added to a created
substack on startup by setting the externals of that new sustack to the
approriate names and paths and then the substack started as a Library
stack via 'start using' which will load the externals.



_______________________________________________
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
|  
Report Content as Inappropriate

Re: Single File Deploy on Windows?

prothero--- via use-livecode
In reply to this post by prothero--- via use-livecode
Hi Dan,

there is a way to use the old libURL instead of the new tsNet external. If that is sufficient for you then you just have to unload the tsNet library before building the standalone.
To do this just execute this from within the message box:  

dispatch "revUnloadLibrary" to stack “tsNetLibURL”

If you have set the standalone settings  to automatically search for inclusion, then you´re done.
If you have set the inclusions manually you have to make sure that tsNet is not checked.

If you now create a standalone the standard libURL library is used instead of tsNet.


Regards,
Matthias


> Am 04.04.2017 um 19:29 schrieb Dan Friedman via use-livecode <[hidden email] <mailto:[hidden email]>>:
>
> Thank you everyone for your suggestions.  I’ve been doing it that way for years (save the dll’s as needed at runtime).  The problem is that it seems that an EXE made from LC 9.0 won’t even launch if you include any items related to the internet (Broswer, Internet, SSL, etc) unless the tsNet.dll is present and in the same directory as the exe.  Now, I can fool LC by unchecking these items in the Inclusions panel.  Now the exe launches.  In my “startup” script, I save the dll’s to disk (from custom props) which works fine.   However, the exe errors when you try to access the internet.  Then I thought that it doesn’t know they are there unless you set the externals of the mainStack.  So, when the app launches, in the startup script, I set the externals of the mainStack to the path to the DLLs, but it still fails.  Now I am sad.
>
> Any thoughts?
>
> Also, what’s with this ginormous DLL “libcef.dll”?  It’s 47.5MB.  Anyone know what that’s related to?
>
> -Dan
>
> _______________________________________________
> use-livecode mailing list
> [hidden email] <mailto:[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
|  
Report Content as Inappropriate

Re: Single File Deploy on Windows?

prothero--- via use-livecode
In reply to this post by prothero--- via use-livecode
Hi Dan,

That look to me like it should work. Here is my code below which does
work. That said, it works under 6.7.x and earlier. I have not tested my
code under LC7+. In my case I have only 1 external but I want to load
the correct one for OSX or Window.

The whole "put (there is a folder tExtFile) into tExtExists" is just a
safety check on someone removing the external or a failure of my
installer to install it.

on preOpenStack
   -- so substacks do not execute the code after this when opened
   if the owner of the target is not me then
      exit preOpenStack
   end if
   -- Load the XPDF Externals by loading an external stack, updating its
externals list, saving that stack and loading the stack
   put AppPath() into tExtPath
   switch the platform
      case "MacOS"
         put tExtPath & "XPDF.bundle" into tExtFile
         put (there is a folder tExtFile) into tExtExists
         break
      case "Win32"
         put tExtPath & "XPDF.dll" into tExtFile
         put (there is a file tExtFile) into tExtExists
         break
   end switch
   if (tExtExists is true)  then
      set the externals of the templateStack to tExtFile
      create invisible stack "XPDFViewer External Library"
      start using "XPDFViewer External Library"
   end if
 end preOpenStack

function AppPath
  put the fileName of me into tPath -- on OSX, file is report inside the
bundle <path>/MyApp.app/Contents/MacOS/MyApp
  set the itemDel to slash
  if (the platform is "MacOS") AND ("dev" is not in the environment) then
    get offset(".app/Contents/MacOS/",tPath)
    if it > 0 then -- 'filename' returned path to executable in package
      delete char it to len(tPath) of tPath
    end if
  end if
  delete last item of tPath
  if last char of tPath is not slash then put slash after tPath
  return tPath
end AppPath


On 4/4/2017 5:54 PM, Dan Friedman via use-livecode wrote:

> Paul,
>
> Thank you for the advice.  But, either it didn’t work, or I’m doing it wrong.  Here’s what I did:
>
> on startUp
> new inv stack "myExternals"
> set the mainStack of stack "myExternals" to "myGreatApp"
> set the externals of stack "myExternals" to pExternals
>
> -- pExternals is a list of all the dll’s that LC created when the app was built with all extensions selected:
> -- C:/Users/MyPC/aFolder/revpdfprinter.dll
> -- C:/Users/MyPC/aFolder/revsecurity.dll
> -- C:/Users/MyPC/aFolder/Externals/revbrowser.dll
> -- C:/Users/MyPC/aFolder/Externals/revzip.dll
> -- C:/Users/MyPC/aFolder/Externals/tsNet.dll
> -- C:/Users/MyPC/aFolder/Externals/CEF/dedcompiler_43.dll
> -- C:/Users/MyPC/aFolder/Externals/CEF/dedcompiler_47.dll
> -- C:/Users/MyPC/aFolder/Externals/CEF/libcef.dll
> -- C:/Users/MyPC/aFolder/Externals/CEF/libEGL.dll
> -- C:/Users/MyPC/aFolder/Externals/CEF/libEGLSv2.dll
>
> start using stack "myExternals"
> end startUp
>
> I checked the externals of stack “myExternals” and they are set correctly.
> I checked that “myExternals” is in the stacksInUse
>
> However, a simple “put url” doesn’t work.
>
> Sorry if I’m being stupid.
>
> -Dan
>
>
> Externals (.dll files that an a LC external) can be added to a created
> substack on startup by setting the externals of that new sustack to the
> approriate names and paths and then the substack started as a Library
> stack via 'start using' which will load the externals.
>
> _______________________________________________
> 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
Loading...