Jump to content
×
×
  • Create New...
  • 0

Rename lib folder & compile python library


Omaman

Question

  • Premium

Hello guys!
I wanna rename lib folder, but I know that this folder is loaded by system.py and binary.


In binary I've found only one record which containt "lib" so I replaced it.

bool CheckPythonLibraryFilenames()
{
	for (int i = 0; *sc_apszPythonLibraryFilenames[i] != '\n'; ++i)
	{
		std::string stFilename = "NameOfTheFolder\\";
		stFilename += sc_apszPythonLibraryFilenames[i];

		if (_access(stFilename.c_str(), 0) != 0)
		{
			return false;
		}

		MoveFile(stFilename.c_str(), stFilename.c_str());
	}

	return true;
}

Then in system.py:

sys.path.append("NameOfTheFolder")

 

But client crashes immediately after launch.

Does anybody know where to edit next?

 

 

Link to comment

3 answers to this question

Recommended Posts

  • 0
  • Premium

Here are my steps what I've done:

Client/UserInterface.cpp:

bool CheckPythonLibraryFilenames()
{
	for (int i = 0; *sc_apszPythonLibraryFilenames[i] != '\n'; ++i)
	{
		std::string stFilename = "NameOfTheFolder\\";
		stFilename += sc_apszPythonLibraryFilenames[i];

		if (_access(stFilename.c_str(), 0) != 0)
		{
			return false;
		}

		MoveFile(stFilename.c_str(), stFilename.c_str());
	}

	return true;
}

Root/System.py:

sys.path.append("NameOfTheFolder")

Extern/include/Python-2.7/pyconfig.h:

#ifndef PYTHONPATH
#	define PYTHONPATH ".\\DLLs;.\\NameOfTheFolder;.\\NameOfTheFolder\\plat-win;.\\NameOfTheFolder\\lib-tk"
#endif

Python-2.7.13/PC/pyconfig.h:

#ifndef PYTHONPATH
#	define PYTHONPATH ".\\DLLs;.\\NameOfTheFolder;.\\NameOfTheFolder\\plat-win;.\\NameOfTheFolder\\lib-tk"
#endif


I withdraw compiled python27_d.dll and python27_d.lib from Python-2.7.13\PCbuild\amd64 and I do those things:
python27_d.dll ranem to python27.dll and input to client folder
python27_d.lib input to extern\lib

When I try to start client, it gives me this error:
eda1e50d0bede0a1cad474dca8a68e22.png


What am I doing wrong?

 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Read our Rules
  • Activity

    1. 2

      Fix CursorImage 'NoneType' object is not callable.

    2. 0

      [Land of Heroes] We are looking for Game / Game Economy Designers

    3. 177

      Render Target Remastered

    4. 1

      MySQL stop when start server

    5. 0

    6. 59

      Emoji in TextLine

  • Recently Browsing

    No registered users viewing this page.

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.