Deac2 / Portable-VirtualBox

Portable-VirtualBox is a free and open source software tool that lets you run any operating system from a usb stick without separate installation.
Other
4 stars 0 forks source link

"Error: Unknown function name." when manually building the code #1

Closed d4k0 closed 1 month ago

d4k0 commented 4 months ago

Hi,

I tried to manually build the latest version and the compilation works without a problem using the latest version of AutoIt (3.3.16.1). However, when I start the created executable, the following error message is shown:

2024-07-01_13-48-06

With other forks and with the official repository I don't have this problem. Strangely enough, your executables work. Can you tell me how you create them or where the problem might lie?

Deac2 commented 4 months ago

Have you downloaded it recently? Today I checked, I didn’t find any problems, I almost stopped changing the code so as not to break something, if you change you need to download the archive and check it, I update the links to the new version, although it would be possible to unzip the language folder itself if it is deleted, I don’t know if there is that's the point

Deac2 commented 4 months ago

Under Windows 10 pe there are also no problems as of 17.07.2024, there is only one: if you delete the language folder in the data folder, or delete the data folder, you can add the language folder during compilation so that it can self-extract from it, but it will increase the size of the exe file a little

d4k0 commented 2 months ago

@Deac2 Sorry for the late reply, there was always something going on in the last few weeks.

I did a few more tests some time ago. When I use your buildfast.bat, the executable it creates works. But if I try the manual way, I get the error message from my first post when I start the created executable. All other forks I have used so far have not had this problem.

Can you reproduce this?

Deac2 commented 2 months ago

Manually, it's just through the Aut2exe_x64.exe file? I have no problems, files are created and it works, the error is at line 3830, yours is slightly higher than mine, this is most likely related to the VirtualBox.xml file, it can't find some item in it, most likely, it overwrites some items at each launch so that the paths are correct. If you change the folder or path .VirtualBox\Machines to any other without "Machines" another, for example .VirtualBox\WMDIR, there will be an error when you restart. The source code is of course so-so and much is not thought out, as if it was done quickly. It is somehow easier to find an error in autohotkey than in autoit. I don't know, I would like to make a change to the machine's file folder, but whether this will work normally is unknown. Try downloading and compiling the new version to see if there is an error. Is there a tools folder in the data folder?

d4k0 commented 1 month ago

I tried it again today with the latest version (commit 5561ce0). Now, strangely enough, it seems to work with the manual method. A few weeks ago it only worked when I opened Aut2Exe from the \source\Aut2Exe folder. When I used Aut2Exe from another folder (outside the project folder), the exe file created always gave the error (maybe problems with hardcoded paths?). I think the problem should be solved now.

Your batch file, on the other hand, always worked.

Deac2 commented 1 month ago

The Aut2Exe path is not particularly important, the main thing is that all the necessary files and folders are in the "source" folder