Embedded files - help !

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Locked
dglojnar
Posts: 130
Joined: Sun Apr 03, 2005 10:52 pm

Embedded files - help !

Post by dglojnar »

Well , I try to solve problem with embedded files, but, for now, with no success:-(

I have file named Tos2Win - it's a Atari ST emulator in one file, and for running need Atari program , usually with extension PRG or APP.
So, syntax is: Tos2Win.exe designer.app - where designer.app is name of Atari application file.
I made BAT procedure and want to to make an EXE file named Designer.exe - something like binder - include Tos2Win, designer.app and several INF files in one EXE.

But, now I have a problem:-(

When I compile my publication, an error appear: Could not identify application's main window.

I have only one command - RunInRectangle "Rectangle2" "[embedded]designer,bat" "" "" "" ""

Also, I embedded files I needed from Neobook menu.

So, question is - what I'm doing wrong ?
I'm aware that Tos2Win maybe not working with RunInRectangle command, but, I actually start publication like I want, but, after few seconds I receive error - Could not identify application's main window.

Any idea or help are more then welcome !
User avatar
Gaev
Posts: 3782
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada
Contact:

Re: Embedded files - help !

Post by Gaev »

dglojnar:

1) Please post the content of your designer.bat file here.

2) Try and take things in baby steps e.g. replace the contents of your designer.bat with a simple command (like dir *.*) ... tell us if that works.
dglojnar
Posts: 130
Joined: Sun Apr 03, 2005 10:52 pm

Re: Embedded files - help !

Post by dglojnar »

@gaev:

Here's the 2 code's of the batch file:

1. This is original code and works without problems

Code: Select all

@ echo off
tos2win.exe c:\0\designer.app
where C:\0\is a path of a designer.app

2. This is modified code I use on publication:

Code: Select all

@ echo off
[embedded]tos2win.exe [embedded]designer.app
As You see, my idea was, if all files are embedded, then I need to specify each file with [embedded] variable.
I'm not sure if is OK, probably not...
All needed files are embedded from Neobook menu.

About baby steps - whan I worked with original code out of Neobook, everythings working OK, from Neobook I receive error "Could not identify application's main window"
If I change contents of batch code like TREE, DIR etc...there's no problem..

So, IMHO, problem is with file tos2win.exe and Neobook...maybe...

But, I hope that is clear what I want to make - merge all files in one EXE with Neobook, something like file binder...
mishem
Posts: 581
Joined: Mon Oct 08, 2012 1:51 pm

Re: Embedded files - help !

Post by mishem »

Try this:

Code: Select all

ExtractFile "[embedded]designer.bat" "[TempDir]designer.bat"
RunInRectangle "Rectangle2" "[TempDir]designer.bat" "" "" "" ""
@ echo off
[embedded]tos2win.exe [embedded]designer.app
These, too, must first extract.
User avatar
Gaev
Posts: 3782
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada
Contact:

Re: Embedded files - help !

Post by Gaev »

dglojnar:

Do what mishem said.

Explanation: When you run a .bat file, it is interpreted/serviced by DOS ... which has no idea what [embedded] means ... so you have to extract the required files (embedded within your NeoBook .exe file, which only NeoBook knows how) to some temporary folder/file ... and then tell the DOS/bat file where to find the extracted files.
mishem
Posts: 581
Joined: Mon Oct 08, 2012 1:51 pm

Re: Embedded files - help !

Post by mishem »

Do what mishem said.
@ echo off
[embedded]tos2win.exe [embedded]designer.app
[embedded] It should be replaced with the path where the files are extracted.

In general it is better to put these files in a folder with the project and use variable [PubDir]
dglojnar
Posts: 130
Joined: Sun Apr 03, 2005 10:52 pm

Re: Embedded files - help !

Post by dglojnar »

@mishem :D
@gaev :D

You guys rocks :-))

Thank You very much for help and support, now everything works like a charm :D :D :D :D :D
Locked