Jump to content

Recommended Posts

Posted

As requested by Josh, I've posted my issue here so it doesn't get lost.

My project currently works just fine in-editor and when tested via the in-editor "test" button. However, when I publish the project, the .exe refuses to run, with no Windows dialogue box, or any other form of error prompt. (e.g., when double-clicking the .exe, the cursor gets a "loading" icon very briefly, then nothing happens.)

Notes:

  • I have attempted numerous options in the publish prompt; various levels of compression, 0 compression, include every fathomable file type, default settings, ticking/unticking the "only include used files" box, etc.
  • My project is a .Lua project.
  • I am using the Standard version of Leadwerks 5/Ultra Engine.
  • My project does include a start.map.
  • I have verified that "main.lua" is looking for "start.map" and not "start.ultra", just in case.
  • I have tried moving the exported project to other file locations and running as administrator, just to see if it was some kind of issue of attempting to write a file to an unwritable location.
  • I have checked the task manager to ensure no background Leadwerks/Ultra process of some kind may have been running, causing it to think it was already open/running.

    Included below is my exported project's "data.zip" as Josh requested to diagnose the issue.
    https://www.dropbox.com/scl/fi/jgdp7yhj9lv49r1p8r6fn/data.zip?rlkey=ldpzc727je9o83e1iefpjmjyp&st=dq5uk3hx&dl=0
  • Thanks 1
  • 3 weeks later...
Posted

Hi I'd like to expand on this bug report and offer a temporary solution.

solution for now: untick "exclude unused files" in the export dialog.

There are two problems with the publish function. excluding files removes most of the assets folder in the included fps example project. second the zip data file is not password protected, I can open and view files without being prompted for a password.

The photo attached, the left window is the assets folder of a "stripped" export, the right shows the assets folder of a full export.

Screenshot_20250630_105437.png

Posted
7 hours ago, wr3kage said:

Hi I'd like to expand on this bug report and offer a temporary solution.

solution for now: untick "exclude unused files" in the export dialog.

There are two problems with the publish function. excluding files removes most of the assets folder in the included fps example project. second the zip data file is not password protected, I can open and view files without being prompted for a password.

The photo attached, the left window is the assets folder of a "stripped" export, the right shows the assets folder of a full export.

Screenshot_20250630_105437.png

Unfortunately, as specified in the original report, I have already tried this to no avail. 

  • 4 weeks later...
Posted

The fix for the other reported issue is up on the beta branch now, although I have not yet tested it with your project.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted
On 6/30/2025 at 11:03 AM, wr3kage said:

There are two problems with the publish function. excluding files removes most of the assets folder in the included fps example project. second the zip data file is not password protected, I can open and view files without being prompted for a password.

Zip file file table of contents don't get encrypted, only the file contents themselves are encrypted. I don't think zip files support an encrypted table of contents.

On 6/13/2025 at 6:49 PM, fearlesswee said:

Included below is my exported project's "data.zip" as Josh requested to diagnose the issue.

This zip file is encrypted. I need the password to test the project.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

Since the other related issue was solved, I will assume this is working now unless someone tells me otherwise. Thank you.

My job is to make tools you love, with the features you want, and performance you can't live without.

  • 4 weeks later...
Posted

Sorry for super late reply, was busy with life and wasn't working on any Leadwerks projects for a while. After ensuring I had the latest version of Leadwerks 5 installed, I can confirm this issue still applies with a fresh export/publish. Double-click project .exe, brief loading icon, zero activity. No error prompt/dialogue box, no window, nada.

 

Quote

This zip file is encrypted. I need the password to test the project.

I... don't recall encrypting the file? There was no option in the publish prompt to choose whether or not it's encrypted, and I certainly didn't put any password on it. Might this be the issue? (i.e. Leadwerks is encrypting it when it's not supposed to, preventing the published .exe from reading the contents?)

Edit: When I go to publish my project, this is what the prompt looks like. I don't see any option for encryption or passwords, so it'd be Leadwerks' doing and not my own.

 image.png.ea0218562115c59f74de87ea2d27f185.png

Edit 2: Can confirm, the data.zip that Leadwerks gives me upon publishing is indeed encrypted and asking for a password. There's no option upon export for me to set a password, or choose whether or not it's encrypted. I'm going to presume that this is the cause of the issue, or at least related to it.

  • Thanks 1
  • 2 weeks later...
Posted

My mistake. When a Lua project is published a default password is used.

Here is the printed output when I run the game:

Loading package "data.zip"
Running script "Source/System/ErrorHandler.lua"
Running script "Source/System/ComponentSystem.lua"
Running script "Source/Components/AI/Monster.lua"
Running script "Source/Components/Appearance/ChangeEmission.lua"
Running script "Source/Components/Appearance/ChangeVisibility.lua"
Running script "Source/Components/Logic/Relay.lua"
Running script "Source/Components/Motion/Mover.lua"
Running script "Source/Components/Physics/Impulse.lua"
Running script "Source/Components/Physics/SlidingDoor.lua"
Running script "Source/Components/Physics/SwingingDoor.lua"
Running script "Source/Components/Player/CameraControls.lua"
Running script "Source/Components/Player/FPSPlayer.lua"
[sol2] An error occurred and has been passed to an error handler: sol: runtime error: [string "source\components\player\fpsplayer.lua"]:24: module 'Libraries/Spring' not found:
        no field package.preload['Libraries/Spring']
        no file 'Source/Libraries/Spring.lua'
        no file 'Modules/Libraries/Spring.dll'
stack traceback:
        [C]: in function 'base.require'
        [string "source\components\player\fpsplayer.lua"]:24: in main chunk
sol: runtime error: [string "source\components\player\fpsplayer.lua"]:24: module 'Libraries/Spring' not found:
        no field package.preload['Libraries/Spring']
        no file 'Source/Libraries/Spring.lua'
        no file 'Modules/Libraries/Spring.dll'
stack traceback:
        [C]: in function 'base.require'
        [string "source\components\player\fpsplayer.lua"]:24: in main chunk
[string "source\components\player\fpsplayer.lua"]:24: in main chunk

So clearly it is the require or import function not working as expected.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

Okay, the cause of this is use of the Lua require function, which does not work with our package system.

Instead of this:

require "Libraries/Spring"

You will want to use this:

import "Source/Libraries/Spring.lua"

If you do that, I believe it will work. It does work with my current build.

Please be warned that before the final 5.0 release I might change import and include to work with relative paths, in which case you will need to type this:

import  "../../Libraries/Spring.lua"

But I have not made this change yet.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted
On 9/2/2025 at 2:22 PM, Josh said:

Okay, the cause of this is use of the Lua require function, which does not work with our package system.

Instead of this:

require "Libraries/Spring"

You will want to use this:

import "Source/Libraries/Spring.lua"

If you do that, I believe it will work. It does work with my current build.

Please be warned that before the final 5.0 release I might change import and include to work with relative paths, in which case you will need to type this:

import  "../../Libraries/Spring.lua"

But I have not made this change yet.

Excellent, I'll make these changes when I get the time, and edit this message with the results :)

Thanks for the help (and amazing engine)!

UPDATE: It would unfortunately appear that this fix doesn't work?

The old code here:
image.png.c61c98f7f72022df66dbe1fbb6e2acae.png
Works as expected in testing, as prior. Upon exporting a project, it seems to fail.

This new "fixed" code, "import" doesn't seem to be recognized as valid by Ultra/Leadwerks engine, as using this code:
image.png.22f4a7eff72d1cdcef933ed750eb5009.png

Results in the following error upon test-game:
image.png.298f2a294ed22a715700f54c17ae6e91.png

It's possible I'm misunderstanding how to properly patch my code to use the "fixed" functionality, or perhaps I need to opt-in to a beta to get the latest fixes/features(?) (I am on the latest public version on Steam.)

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...