benjie-git / CardStock

CardStock is a cross-platform tool for quickly and easily building programs. It provides a drawing-program-like editor for visually laying out your programs' parts, and a code editor for adding event-driven python code.
Mozilla Public License 2.0
249 stars 9 forks source link

BUG: Won't Export App #17

Open everythingability opened 1 month ago

everythingability commented 1 month ago

Hi,

amazed that this exists. Great job! Loving it.

When I export my app on Sonoma 14.5, CardStock 099.6.2 , I get an app but when I launch it nothing happens. There's no clue in the System Preferences window.

Tom

benjie-git commented 1 month ago

Hmmm, this works fine for me on MacOS 14.7 on Arm. I'll test more with the downloaded versions. Are you running on an Intel or Arm machine? And are you running the Intel or Arm download?

everythingability commented 1 month ago

M2 Arm. And the ARM download (I hope/reckon)

image
benjie-git commented 1 month ago

This works fine if running from source, but PyInstaller fails to include the requests package inside the standalone app, for requests>=2.32.0. This works with requests<=2.31.0. Fixed in git, so the next builds will include this fix.

benjie-git commented 1 month ago

I posted a pre-release v0.99.7_pre1 version with pre-built arm mac app that should fix this issue. Please let me know if it works for you!

On Tue, Oct 15, 2024 at 2:28 AM everythingability @.***> wrote:

M2 Arm. And the ARM download (I hope/reckon) image.png (view on web) https://github.com/user-attachments/assets/67e5d8b0-0489-4fa6-a292-3d0c3cbab5e3

— Reply to this email directly, view it on GitHub https://github.com/benjie-git/CardStock/issues/17#issuecomment-2413371712, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYMOXFCSW36O5MSPFHOKUDZ3TN5FAVCNFSM6AAAAABP3J3W3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJTGM3TCNZRGI . You are receiving this because you commented.Message ID: @.***>

everythingability commented 1 month ago
image

It DOES successfully export now... Yay! There is a slight UI issue that, having exported an app, the window kinda just lurks there... looking as if it's still in progress, or failed... when it should close - make a ping or something ...or reveal it in the Finder...

Still. Great . Thanks.

benjie-git commented 1 month ago

The export window does automatically close for me when the export is complete. Are you able to run the app from the terminal and see if there are any error messages? You should be able to run in the terminal from the directory containing the CardStock.app as CardStock.app/Contents/MacOS/CardStock

everythingability commented 1 month ago

Ak. OK. I tried and the first time it complained about an image... not sure what to do about that. The image is where it says it is.

The 2nd time it complained because the file/Stack already exists.

tas509@UOY24M162 ~ % /Applications/CardStock.app/Contents/MacOS/CardStock Traceback (most recent call last): File "stackExporter.py", line 493, in OnExportApp File "stackExporter.py", line 170, in ExportApp File "stackExporter.py", line 313, in ExportFromBundle File "shutil.py", line 260, in copyfile FileNotFoundError: [Errno 2] No such file or directory: '/Users/tas509/Desktop/GZoZe6aWgAoAsM3.jpg' Traceback (most recent call last): File "stackExporter.py", line 493, in OnExportApp File "stackExporter.py", line 170, in ExportApp File "stackExporter.py", line 280, in ExportFromBundle File "shutil.py", line 600, in copytree File "shutil.py", line 498, in _copytree File "", line 225, in makedirs FileExistsError: [Errno 17] File exists: '/Users/tas509/Desktop/MyStack.app'

everythingability commented 1 month ago

Just tried Remove for the image - btw this dialog wasn't clear as to what it was telling me and what to do about it... and it fixed it.

Super!

benjie-git commented 4 weeks ago

The app will now show error messages during export, and close the export dialog cleanly after an error. I still need to determine why it couldn't find your image.

everythingability commented 3 weeks ago

The dialog wasn't clear as to what I should do with the image... SHOULD I add it or remove it? I think each time I tried to build I just ignored that message.

I can't remember, I might have removed the image from the stack so thought it should be ignored... Maybe I'd deleted/renamed the image.

On Fri, 18 Oct 2024 at 23:23, Ben Levitt @.***> wrote:

The app will now show error messages during export, and close the export dialog cleanly after an error. I still need to determine why it couldn't find your image.

— Reply to this email directly, view it on GitHub https://github.com/benjie-git/CardStock/issues/17#issuecomment-2423319950, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAXQFBWWRXI2U5FHV3RLOLZ4GC55AVCNFSM6AAAAABP3J3W3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRTGMYTSOJVGA . You are receiving this because you authored the thread.Message ID: @.***>

benjie-git commented 3 weeks ago

I'll try to make this dialog more clear. The idea is that it's packaging up all of your resources into the exported stack, and is confirming that it found everything your stack will need, in terms of sounds and images. If you delete them from this list, it will not include them in the packaged stack app. It may still find them at run time, if you run the exported stack from the same location as your original stack, since the relative paths to the images/sounds will still be in the same relative locations.

But it does sound like the export tool is having trouble finding your images that are in the Desktop folder. I'll see if I can figure out why that could be happening.

everythingability commented 3 weeks ago

Hi,

I think stating what the issue is (if there an is an issue). For example, if an image is missing, does Cardstock crash, or is the image just missing?

I honestly can't remember if I'd added an image that was lying around that I later tidied up.