MizunagiKB / gd_cubism

Unofficial Live2D Player for Godot Engine

Home Page:https://mizunagikb.github.io/gd_cubism/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building windows dll under linux

m00nk opened this issue · comments

Hi.

I'm working under linux. I have installed the extension, build it for linux and run test project. It works fine in editor. But I want to export the application to several platforms: linux, windows and android. The exporting for linux works fine, but it fails when I try to export for windows - the necessary library not found.

I have tried to build the extension for windows under linux using command

scons platform=windows arch=x86_64 target=template_release

but I have got the error:

$ scons platform=windows arch=x86_64 target=template_release
scons: Reading SConscript files ...
Auto-detected 4 CPU cores available for build parallelism. Using 4 cores by default. You can override it with the -j argument.
Building for architecture x86_64 on platform windows
KeyError: 'MSVC_VERSION':
  File "/home/m00nk/develop/games/godot/[gd_cubism]/SConstruct", line 14:
    env["arch"], env["MSVC_VERSION"].replace(".", "")
  File "/usr/lib/python3/dist-packages/SCons/Environment.py", line 405:
    return self._dict[key]

As I understand, it fails because I have no installed VisualStudio (and I'm not sure is there a way to install it under linux).

So my questions are:

  1. How can I build the extension for windows and android under linux?

  2. could you please add the compiled files of the extension for all platforms (*.so, *.dll, etc) right into the release zip, like it is done, for example, in CubismSDK? It will be much comfortable for the users - they will not have to build it by themselves.

Cross-compilation is uncharted territory for me. So it may not be the correct answer.
The answer will be based on that.

Answer for 1

Sorry, I don't have any knowledge about Android development environment. So I can't answer questions about Android.

Does the cross-compilation environment you are working in meet the following conditions?

  1. You have prepared a cross-compilation environment such as mingw on Linux.
  2. You can build the Windows version of Godot Engine on Linux.

If you are not in this situation, first check if you can build Godot Engine itself.

If you are unable to build only GDCubism after meeting these conditions, please change the path of CubismSDK specified in SConstruct according to your environment.

In your case, Visual Studio is not installed, so the environment variable called MSVC_VERSIONS is not set.

Please rewrite LIBPATH according to your environment.

What we are doing here is setting the path to the Windows version library of GDCubismNativeSdk installed in your environment.

    TARGET_ARCH = "x86_64" # your target architecture.
    TARGET_MSVC_VERSION = "140" # your build environment.
    env.Append(
        LIBPATH=[
            os.path.join(
                CUBISM_NATIVE_CORE_DIR,
                "lib",
                "windows/{:s}/{:s}".format(
                    TARGET_ARCH, TARGET_MSVC_VERSION)
                ),
            )
        ]
    )

Answer for 2

If you are trying GDCubism, you must have also obtained CubismSdkForNative from Live2D's website.

Maybe they took the time to build and didn't check the terms and conditions, but the terms and conditions contain important information.

Live2D Open Software License Agreement
https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html

In my documentation it is mentioned in the following location:
https://github.com/MizunagiKB/gd_cubism/blob/main/LICENSE.en.adoc

In summary,

  • MIT License applies only to the part I created.
  • Live2D license will be applied when linked with CubismSdkForNative and CubismNativeFramework.

I would be happy if you could download it from Godot AssetLib as you think. I think so too.

Since I am not familiar with the law, I inquired on the Live2D forum and determined that the current distribution format is the best.

If you publish or sell something you have created, please be aware that the following licenses will also apply.

Live2D Proprietary Software License Agreement
https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html

As a week has elapsed, we will now proceed to close this issue.