GameAnalytics / GA-SDK-GODOT

Official GameAnalytics Godot SDK repository
MIT License
42 stars 7 forks source link

KeyError: Bits #26

Open wadlo opened 10 months ago

wadlo commented 10 months ago

When running the recommended steps in the Godot documentation,

scons p=windows target=editor module_mono_enabled=yes,

I get the following error:

File "E:\Documents\Godot\godot-source\godot\SConstruct", line 842:                                                        
   config.configure(env)                                                                                                 
File "E:\Documents\Godot\godot-source\godot\modules/gameanalytics\config.py", line 30:                                    
   if env["bits"] == "32":    

Device: Windows 11

AllDayJon commented 8 months ago

I get a similar error. Not sure why the env is missing

scons.exe platform=windows target=template_debug
scons: Reading SConscript files ...
Auto-detected 32 CPU cores available for build parallelism. Using 31 cores by default. You can override it with the -j argument.
Found MSVC version 14.3, arch x86_64
Building for platform "windows", architecture "x86_64", target "template_debug".
KeyError: 'bits':
  File "F:\Godot\Godot_Self_Build\godot\SConstruct", line 847:
    config.configure(env)
  File "F:\Godot\Godot_Self_Build\godot\modules/gameanalytics\config.py", line 30:
    if env["bits"] == "32":
  File "C:\Users\RWIN\AppData\Roaming\Python\Python312\site-packages\SCons\Environment.py", line 588:
    return self._dict[key]

In the interim, I'm forcing the build versions I want with;

    elif env["platform"] == "windows":
            env.Append(LIBPATH=["#modules/gameanalytics/cpp/lib/win64"])
            if env["use_mingw"]:
                env.Append(LIBS=["GameAnalytics"])
            else:
                env.Append(LINKFLAGS=["GameAnalytics.lib"])