Old 12-13-2016, 06:54 PM   #1
Lawrence
Human being with feelings
 
Join Date: Mar 2007
Posts: 21,551
Default Stupid Is As Stupid Does...

Nothing to do with Reaper, but I know there are a lot of geeky developer types around here so I thought I'd share a recent stupid fuck-up just for fun. If we can't laugh at ourselves, we're taking ourselves too serious.

So...

When I develop Windows applications I typically put my dll dependencies if any in the resources bundle in the compiled application. I do that so that there's no chance anyone will ever run an exe I shared and it not launch because of missing dependency files, and the apps always check on launch to see if the dependencies exist and if they don't it copies them from resources before it loads, so it literally can't ever happen.

So I share an app with a few testers and it wouldn't launch for anyone even though it worked fine on my system, which drove me nuts... and it turned out that I'd put that code to check for and/or copy the dependencies in the Form_Load sub (duh!) , instead of in Application Events, which, obviously, happens before anything else loads or tries to load.

What a dummy I am. It took me two days to catch that.
Lawrence is offline   Reply With Quote
Old 12-13-2016, 06:58 PM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by Lawrence View Post
Application Events, which, obviously, happens before anything else loads or tries to load.
Well, be glad you are even able to do something like that. In a C or C++ application/plugin, ensuring dlls are found and loaded can end up into a huge headache. (I am trying to use static linking of all dependencies as much as possible these days so that I don't need to worry about deploying dlls...)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 12-13-2016, 07:16 PM   #3
Lawrence
Human being with feelings
 
Join Date: Mar 2007
Posts: 21,551
Default

Yeah, I initially tried to find a way for an app to use them directly from resources (or like you say, link them) without doing that, but if that's possible I couldn't figure it out ... so I just copy them to the same folder the app was launched from if they aren't already there.
Lawrence is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:31 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.