AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Converting a windows plugin to linux? (https://forums.alliedmods.net/showthread.php?t=331728)

nG_getwreck 04-04-2021 15:19

Converting a windows plugin to linux?
 
As the title says

fysiks 04-04-2021 19:27

Re: Converting a windows plugin to linux?
 
It is rare to have to do anything.

HamletEagle 04-05-2021 05:17

Re: Converting a windows plugin to linux?
 
Quote:

Originally Posted by fysiks (Post 2743032)
You don't need to do anything.

Unless the plugin uses orpheu/okapi/rage and doesn't have signatures for both linux and windows or deals with one of the few tricky functions which are removed in one binary but not the other.

OP, that's why you should mention what plugin you are talking about.

JocAnis 04-05-2021 19:49

Re: Converting a windows plugin to linux?
 
or maybe something with offsets for linux, with using get_pdata_cbase for example? im not experienced in that field but i think i saw something about it

nG_getwreck 04-05-2021 21:09

Re: Converting a windows plugin to linux?
 
Quote:

Originally Posted by JocAnis (Post 2743160)
or maybe something with offsets for linux, with using get_pdata_cbase for example? im not experienced in that field but i think i saw something about it

yeah, that's what i mean.

I've heard about this, and did try doing it but sword animations gone horribly wrong. Also other modes doesn't work.

nG_getwreck 04-05-2021 21:15

Re: Converting a windows plugin to linux?
 
Quote:

Originally Posted by HamletEagle (Post 2743082)
Unless the plugin uses orpheu/okapi/rage and doesn't have signatures for both linux and windows or deals with one of the few tricky functions which are removed in one binary but not the other.

OP, that's why you should mention what plugin you are talking about.

I have a knife sword plugin that I downloaded somewhere, it works in windows but when I try using it on my online server, it crash for some sort of reason. Did try checking the logs but it doesn't show the reason why it crash. No errors are shown.

DarthMan 04-07-2021 02:42

Re: Converting a windows plugin to linux?
 
Quote:

Originally Posted by HamletEagle (Post 2743082)
Unless the plugin uses orpheu/okapi/rage and doesn't have signatures for both linux and windows or deals with one of the few tricky functions which are removed in one binary but not the other.

OP, that's why you should mention what plugin you are talking about.

Speaking of Rage, I tested it recently and it seems to crash whenever I hook / call a function. About Okapi, it causes segfaults even with non-virtual functions. The only one that seems to work perfect is Orpheu, but it lacks proper vector support. Now, I'm not sure what's wrong with Rage. Either some offsets are wrong in the default files that it comes with or some are hardcoded into it and have wrong values, as the last major update was before the steampipe update if I'm not mistaken, or maybe it was only properly tested on CS and works fine there, but not on other mods ... Who knows?

HamletEagle 04-07-2021 05:05

Re: Converting a windows plugin to linux?
 
Quote:

Originally Posted by nG_getwreck (Post 2743165)
I have a knife sword plugin that I downloaded somewhere, it works in windows but when I try using it on my online server, it crash for some sort of reason. Did try checking the logs but it doesn't show the reason why it crash. No errors are shown.

You should post the source code. How else are we supposed to know what is wrong?
Speaking of offsets, it is possible the plugin has the wrong extra offset for linux but I can't say more without looking at the code.

DarthMan, can you reproduce okapi crashes under windows too? I only managed to get a crash under linux with virtual functions.

DarthMan 04-07-2021 07:04

Re: Converting a windows plugin to linux?
 
Quote:

Originally Posted by HamletEagle (Post 2743286)
You should post the source code. How else are we supposed to know what is wrong?
Speaking of offsets, it is possible the plugin has the wrong extra offset for linux but I can't say more without looking at the code.

DarthMan, can you reproduce okapi crashes under windows too? I only managed to get a crash under linux with virtual functions.

Sadly not, not using it anymore tho. But I know that the tfc bugfixes plugin that hlstriker made caused segfaults, and I was told a possible issue could be the Okapi module, as I inspected the code and nothing looked bad.
About Rage, u can just try to hook or call any function on TFC, hlds/rehlds will instantly crash. I have a handler for CBasePlayer::Observer_SetMode.

klippy 04-07-2021 07:06

Re: Converting a windows plugin to linux?
 
When does the server crash? Is it just at random or is it on certain events/actions, like you stabbing with a knife, round start, on server launch, etc... It's a really important piece of information for reproducing, understanding and fixing a bug.


All times are GMT -4. The time now is 14:58.

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