Bearsampp / .teams

Private documentation repo for the Organization
https://bearsampp.com
GNU General Public License v3.0
0 stars 0 forks source link

Possible winbinder replacement? #74

Closed N6REJ closed 2 months ago

N6REJ commented 6 months ago

I might have found an upgrade for winbinder. https://github.com/wagy/WinBinder This is a fork from the original dev and appears to be current. I'm not sure what winbinder does for us so unsure how we could test it other then does upgrading it break things. in /core/classes/class.winbinder.php on line 215 we see the function

    public function setImage($wbobject, $path)
    {
        return $this->callWinBinder('wb_set_image', array($wbobject, $path));
    }
Which is called from 
        public function messageBox($message, $type, $title = null)
    {
        global $bearsamppCore;

        $message = str_replace(self::NEW_LINE, PHP_EOL, $message);
        $messageBox = $this->callWinBinder('wb_message_box', array(
            null, strlen($message) < 64 ? str_pad($message, 64) : $message, // Pad message to display entire title
            $title == null ? $this->defaultTitle : $this->defaultTitle . ' - ' . $title, $type
        ));

        // Set window icon
        $this->setImage($messageBox, $bearsamppCore->getResourcesPath() . '/bearsampp.ico');

        return $messageBox;
    }

if we use the

$this->setImage($messageBox, $bearsamppCore->getResourcesPath() . '/bearsampp.ico');

it throws data into the bearsampp.log file. Commenting it out removes all errors. Looking at neard https://github.com/neard/neard/blob/9f100313686c2f039e595b9d23a0ad98b64f1b27/core/classes/class.winbinder.php#L406 I see that it is commented out also. commenting it out doesn't seem to break anything nor cause any visual changes.

N6REJ commented 6 months ago

This relates to I'm following the directions here https://github.com/wagy/WinBinder?tab=readme-ov-file but don't know that I know wth I'm doing. Looks like we might need the x86 and x64 vcredists from https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2012-vc-110-update-4--no-longer-supported to create the new dll. I don't know wether to include those in the release here ( https://github.com/Bearsampp/.teams/releases/tag/2024.4.1 ) or not. I'm going to try just this line configure.bat --enable-snapshot-build --enable-debug-pack --with-winbinder=shared and pray thats enough.

N6REJ commented 6 months ago

This is where we stand at this moment. image

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 14days. Thank you for your contributions.

N6REJ commented 4 months ago

@mfleeson is working on this issue. By fixing the win32 service module

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 14days. Thank you for your contributions.

stale[bot] commented 2 months ago

This issue closed by stalebot.