openitg / openitg

The OpenITG Project Code - an open-source rhythm dancing game based on StepMania 3.95
http://openitg.gr-p.com/
156 stars 77 forks source link

Can't build latest source #66

Closed Wanny closed 7 years ago

Wanny commented 8 years ago

First of all, I'm using VS 2010 and the Summer 2004 DirectX SDK.

I merged my branch (that compiles nicely) with the main tree, and after fixing a couple of conflicts I get this:

1>ClCompile:
1>  All outputs are up-to-date.
1>  ProductInfo.cpp
1>  MovieTexture_FFMpeg.cpp
1>  RageDisplay_D3D.cpp
1>e:\source openitg github\beta3\src\arch\movietexture\FFMpeg_Helper_Common.h(40): error C2039: 'AVPixelFormat' : is not a member of 'avcodec'
1>e:\source openitg github\beta3\src\arch\movietexture\FFMpeg_Helper_Common.h(40): error C2146: syntax error : missing ';' before identifier 'pf'
1>e:\source openitg github\beta3\src\arch\movietexture\FFMpeg_Helper_Common.h(40): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\source openitg github\beta3\src\arch\movietexture\FFMpeg_Helper_Common.h(40): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\source openitg github\beta3\src\arch\movietexture\FFMpeg_Helper.h(51): error C2039: 'AVIOContext' : is not a member of 'avcodec'
1>e:\source openitg github\beta3\src\arch\movietexture\FFMpeg_Helper.h(51): error C2143: syntax error : missing ';' before '*'
1>e:\source openitg github\beta3\src\arch\movietexture\FFMpeg_Helper.h(51): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\source openitg github\beta3\src\arch\movietexture\FFMpeg_Helper.h(51): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>  RageUtil.cpp
1>RageUtil.cpp(12): warning C4244: 'initializing' : conversion from 'time_t' to 'int', possible loss of data
1>RageUtil.cpp(42): warning C4244: '=' : conversion from 'time_t' to 'int', possible loss of data
1>RageUtil.cpp(231): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>RageUtil.cpp(236): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>RageUtil.cpp(241): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>RageUtil.cpp(246): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>RageUtil.cpp(349): fatal error C1083: Cannot open include file: 'DxErr.h': No such file or directory
1>RageDisplay_D3D.cpp(22): fatal error C1083: Cannot open include file: 'DxErr.h': No such file or directory
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:04.35
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
RageUtil.cpp
1>RageUtil.cpp(12): warning C4244: 'initializing' : conversion from 'time_t' to 'int', possible loss of data
1>RageUtil.cpp(42): warning C4244: '=' : conversion from 'time_t' to 'int', possible loss of data
1>RageUtil.cpp(231): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>RageUtil.cpp(236): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>RageUtil.cpp(241): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>RageUtil.cpp(246): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>RageUtil.cpp(366): error C3861: 'DXGetErrorString': identifier not found
1>RageDisplay_D3D.cpp(47): error C3861: 'DXGetErrorString': identifier not found

Again, DXGetErrorString is the new name of the function. If I change it to point to DXGetErrorString9 I'm left only with the FFMpeg errors, that I can't figure out how to solve.

terabyte commented 8 years ago

@spigwitmer recently redid the windows build files, I think... he probably knows what's up

spigwitmer commented 8 years ago
Wanny commented 8 years ago

Oh I see, I'll try adding HAVE_LEGACY_FFMPEG But, what can I do to use the new version of the library without failing in the attempt?

Also: what version of the DirectX SDK do you guys use, considering the DX changes call the new filenames?

spigwitmer commented 8 years ago

I went with the June 2010 version of the SDK in visual studio 2015.

To use a not-prehistoric version of ffmpeg, you'd have to build the .lib files from source. The ones checked in are A. not API compatible and B. not VS2015 compatible apparently. There's no vcproj file to work off of in the ffmpeg source so I'm looking to build these out of mingw64/msys and call it a day.

Wanny commented 8 years ago

That would be lovely.

And thanks for the tip of the SDK version. I've always used the Summer 2004 one (and currently using VS 2010) and never ran into trouble until now.

spigwitmer commented 8 years ago

https://github.com/openitg/openitg/releases/tag/stupid-placeholder-tag-goddammit-github

Wanny commented 8 years ago

...whoa, beta 5? when did that happen?

spigwitmer commented 8 years ago

It didn't yet. Github forces you to create a tag and declare a bunch of related files as a pre-release. Beta 5 won't happen until the milestone issues are resolved.

When you get a chance, try OpenITG-debug.exe and friends from the link above as a drop-in replacement for the stuff you have under Program/. I'm on Windows 10 and the game works for me but I wanna make sure that whatever has to get compiled on the side here fits your environment before I merge all this stuff to master. There's a ton of crap that has to be done up front with msys/mingw64 that makes scripting/automating the building of the ffmpeg libs annoying.

Wanny commented 8 years ago

Installing VC2015 redist...

Will update after tests.

EDIT: I'm sure I installed both x86 and x64 Visual C++ 2015 redistributables, and the game still complains for msvcp140d.dll, ucrtbased.dll and vcruntime140d.dll

spigwitmer commented 8 years ago

that's a debug executable. you might have to download visual studio 2015 proper to get debug versions of the runtime

spigwitmer commented 8 years ago

the hell with it. check the release page for not-so-redist.zip, that has all the dlls you mentioned

Wanny commented 8 years ago

Hmmm...trying with HAVE_LEGACY_FFMPEG I get the following:

LINK : fatal error LNK1104: cannot open file 'dxguid.lib'

If I point specifically to the lib\x86 (and/or lib\x64) directory of the DirectX SDK I get this:

1>DSoundHelpers.obj : error LNK2001: unresolved external symbol _DirectSoundEnumerateA@8
1>DSoundHelpers.obj : error LNK2001: unresolved external symbol _DirectSoundCreate@12
1>InputHandler_DirectInput.obj : error LNK2001: unresolved external symbol _DirectInput8Create@20
1>InputHandler_DirectInput.obj : error LNK2001: unresolved external symbol _IID_IDirectInput8A
1>InputHandler_DirectInputHelper.obj : error LNK2001: unresolved external symbol _c_dfDIKeyboard
1>InputHandler_DirectInputHelper.obj : error LNK2001: unresolved external symbol _c_dfDIJoystick
1>InputHandler_DirectInputHelper.obj : error LNK2001: unresolved external symbol _IID_IDirectInputDevice8A
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "struct AVPixelFormat_t * AVPixelFormats" (?AVPixelFormats@@3PAUAVPixelFormat_t@@A)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: __thiscall FFMpeg_Helper::~FFMpeg_Helper(void)" (??1FFMpeg_Helper@@QAE@XZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: void __thiscall FFMpeg_Helper::Close(void)" (?Close@FFMpeg_Helper@@QAEXXZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: void __thiscall FFMpeg_Helper::RenderFrame(struct RageSurface *,int)" (?RenderFrame@FFMpeg_Helper@@QAEXPAURageSurface@@H@Z)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: int __thiscall FFMpeg_Helper::GetRawFrameNumber(void)" (?GetRawFrameNumber@FFMpeg_Helper@@QAEHXZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: float __thiscall FFMpeg_Helper::GetTimestamp(void)const " (?GetTimestamp@FFMpeg_Helper@@QBEMXZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: class StdString::CStdStr<char> __thiscall FFMpeg_Helper::Open(class StdString::CStdStr<char>)" (?Open@FFMpeg_Helper@@QAE?AV?$CStdStr@D@StdString@@V23@@Z)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: void __thiscall FFMpeg_Helper::RegisterProtocols(void)" (?RegisterProtocols@FFMpeg_Helper@@QAEXXZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: void __thiscall FFMpeg_Helper::Init(void)" (?Init@FFMpeg_Helper@@QAEXXZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: int __thiscall FFMpeg_Helper::GetFrame(void)" (?GetFrame@FFMpeg_Helper@@QAEHXZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: __thiscall FFMpeg_Helper::FFMpeg_Helper(void)" (??0FFMpeg_Helper@@QAE@XZ)
1>RageDisplay_D3D.obj : error LNK2001: unresolved external symbol _D3DXLoadSurfaceFromSurface@32
1>RageDisplay_D3D.obj : error LNK2001: unresolved external symbol _DXGetErrorStringA@4
1>RageUtil.obj : error LNK2001: unresolved external symbol _DXGetErrorStringA@4
1>D:\Source OpenITG\openitg\src\/../Program//OpenITG-SSE2.exe : fatal error LNK1120: 20 unresolved externals
DSoundHelpers.obj : error LNK2001: unresolved external symbol _DirectSoundEnumerateA@8
1>DSoundHelpers.obj : error LNK2001: unresolved external symbol _DirectSoundCreate@12
1>InputHandler_DirectInput.obj : error LNK2001: unresolved external symbol _DirectInput8Create@20
1>InputHandler_DirectInput.obj : error LNK2001: unresolved external symbol _IID_IDirectInput8A
1>InputHandler_DirectInputHelper.obj : error LNK2001: unresolved external symbol _c_dfDIKeyboard
1>InputHandler_DirectInputHelper.obj : error LNK2001: unresolved external symbol _c_dfDIJoystick
1>InputHandler_DirectInputHelper.obj : error LNK2001: unresolved external symbol _IID_IDirectInputDevice8A
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "struct AVPixelFormat_t * AVPixelFormats" (?AVPixelFormats@@3PAUAVPixelFormat_t@@A)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: __thiscall FFMpeg_Helper::~FFMpeg_Helper(void)" (??1FFMpeg_Helper@@QAE@XZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: void __thiscall FFMpeg_Helper::Close(void)" (?Close@FFMpeg_Helper@@QAEXXZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: void __thiscall FFMpeg_Helper::RenderFrame(struct RageSurface *,int)" (?RenderFrame@FFMpeg_Helper@@QAEXPAURageSurface@@H@Z)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: int __thiscall FFMpeg_Helper::GetRawFrameNumber(void)" (?GetRawFrameNumber@FFMpeg_Helper@@QAEHXZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: float __thiscall FFMpeg_Helper::GetTimestamp(void)const " (?GetTimestamp@FFMpeg_Helper@@QBEMXZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: class StdString::CStdStr<char> __thiscall FFMpeg_Helper::Open(class StdString::CStdStr<char>)" (?Open@FFMpeg_Helper@@QAE?AV?$CStdStr@D@StdString@@V23@@Z)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: void __thiscall FFMpeg_Helper::RegisterProtocols(void)" (?RegisterProtocols@FFMpeg_Helper@@QAEXXZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: void __thiscall FFMpeg_Helper::Init(void)" (?Init@FFMpeg_Helper@@QAEXXZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: int __thiscall FFMpeg_Helper::GetFrame(void)" (?GetFrame@FFMpeg_Helper@@QAEHXZ)
1>MovieTexture_FFMpeg.obj : error LNK2001: unresolved external symbol "public: __thiscall FFMpeg_Helper::FFMpeg_Helper(void)" (??0FFMpeg_Helper@@QAE@XZ)
1>RageDisplay_D3D.obj : error LNK2001: unresolved external symbol _D3DXLoadSurfaceFromSurface@32
1>RageDisplay_D3D.obj : error LNK2001: unresolved external symbol _DXGetErrorStringA@4
1>RageUtil.obj : error LNK2001: unresolved external symbol _DXGetErrorStringA@4
1>D:\Source OpenITG\openitg\src\/../Program//OpenITG-SSE2.exe : fatal error LNK1120: 20 unresolved externals

EDIT: with the extra DLLs I get the generic message: "The application was unable to start correctly (0xc000007b). Click Okay to close the application"

spigwitmer commented 8 years ago

oh, you're using stepmania-net2010.sln. Few things:

Wanny commented 8 years ago
spigwitmer commented 8 years ago

git pull please (and you're def on the features/vs2015 branch right?)

Basically I just threw the static libs for LibLua LibPng in as well as fixed the #pragma lines in FFMpeg_Helper_Common.cpp

spigwitmer commented 8 years ago

There's supposed to be 6 projects in total: libtomcrypt, libtommath, LibLua, LibLuaLib, LibPng and OpenITG.

... for the hell of it, try opening openitg-vs2015.sln

Wanny commented 8 years ago

A bit of history:

I have my own branch with my changes. The last commit on I made on it was "VERYVERY minor fix" I tried to merge it with the main tree and got confused with the conflicts that there were in 2 files, I deleted all changes so the merge actually changed nothing. Then all of this happened.


I now force-pushed to my last proper commit (undoing the failed merge and reverting everything)... and now I don't see the other branches in SourceTree =(. Previously I could see all branches directly from mine =C

spigwitmer commented 8 years ago

IMO the score needs to be settled with this before releasing a 0.9 release candidate.

Have you been able to fix the compile issues? If not, would it be easier or harder for you to fully migrate over to VS2015 and the new build process, seeing as @augustg and I can get a running build though it?

augustg commented 7 years ago

Given that nobody seems to be working on this maybe we should drop support for VS 2010? There have been 3 major releases of VS since 2010 and VS 2015 is free.

chrispable commented 7 years ago

I've gotten oitg to compile with vs2010 but libpng isn't working yet and ffmpeg doesn't seem to be linked. I'm new to msvc. But maintaining msvc2010 is IMPORTANT, xp embedded is based on xp sp2, which wont install the new CRTs, even after getting updated root certs installed. Unless you can somehow statically bundle the 2015 CRT for XP, it's pretty important to keep 2010 around. And yes there is a good reason to support xp embedded. Patch coming soon...

In the mean time, is it possible for someone familiar with msvc to help get 2010 in a fully workable state?

Side note, compiling tomcrypt from this repo has a 2 minute lag of entropy when using 2010 to init the prng. This isn't present in 2015. I pulled tomcrypt from an old SM5 and bastardized it in and the lag went away.

chrispable commented 7 years ago

Some additional info, I got libpng finally working to link with the SSE2 optimizations. You need to use the vcawin32 makefile, not the vcwin32. With that, for some reason FFMPEG now compiles in properly (add the preprocessor direct HAVE_FFMPEG - note you need to edit FFMPEG config.h after its generated to turn FAST_CLZ to 0 or it will not compile with the version mentioned here).

Finally, there is an issue with videos in an mp4 container not working (Dshow is disabled FYI). I know FFMPEG can read the file fine because I can convert the file in the mp4 container to an avi and it will play fine using the FFMPEG binary I just compiled. It also doesn't work with a random m2v I threw in. Same error of: bool BackgroundImpl::Layer::CreateBackground(class Song const *,struct BackgroundDef const &)

I am aware this issue is now somewhat out of scope of not being able to compile the program but it may be related and causing instability. I can open a separate issue if you want. Below is a random file that demonstrates the crash, if someone using msvc 2015 or higher could test to make sure it is not related.

https://zenius-i-vanisher.com//simfiles/Ben%20Speirs'%20SPEIRMIX%202016/(Hashtag)%20SELFIE_custom.zip

augustg commented 7 years ago

VS 2010 "And yes there is a good reason to support xp embedded." Fair enough. What is it?

"Patch coming soon..." That would be amazing! I've fixed a lot of stuff in openitg over the last year, but VS 2010 is not something I'm going to touch :).

SELFIE The SELFIE crash had nothing to do with the build environment. It'll always crash with an .mp4 background. Take a look at PR #90. It'll crash anytime ActorUtil::GetFileType returns FT_Invalid for a background file.

If you have more problems with the above, I suggest you open a new issue or submit a PR.

chrispable commented 7 years ago

2010, I really borked my project file atm, It doesn't compile debug executables right now, but the biggest issue is the static libs and libtomcrypt. Basically, on anything other than 2015, the prng in the version of tomcrypt you are using, there is an unavoidable 2 minute delay every time you start the game. I brought in the version from sm5, not sure WHAT changed but it loads instantly. Static libs are obviously things you need to recompile for your toolchain. Other than that, it seems to work quite well. I'll post up my full directory somewhere if you want but I have no idea how we can have separate repositories of libraries with msvc (I am very new to windows constructs and msvc). Then working with SSE2 (which is actually also important for the older systems) needs it's own libraries like with libpng as well. Right now, I basically just do everything as an sse2 build with full optimization all over the place.

The patch wasn't referring to msvc support but I will more than happily share the shitshow I have working somehow. I just don't want to break other toolchains in doing so.

As for reason, I'd rather not show my hand publicly until all features are finished, and I can't find a way to private message a link on github, but I'll gladly shove a video your way if you want to see :).

chrispable commented 7 years ago

Some good news, I may have, through voodoo, gotten 2013 compiles working on xp sp2. The big problem here is the runtimes cannot be installed normally because they fail authenticode verification during install even with updated root certificates. But 2015 runtimes are crazy and there's absolutely no hope there. I have no idea how mozilla packaged it with firefox portable to work the way it does. That said, 2010 runtimes perform about 7% faster it seems than 2013. Will keep tinkering.

RodentVienna commented 7 years ago

chrispable. I still did not get, why for eternity you are demanding to stick with VS2010? "And yes there is a good reason to support xp embedded." care to explain?

As a founding member of OpenGroove and Boxorroxors i can tell you one thing: OpenITG in first place was designed to be a drop-in-replacement for the executable on an MK6-boxor.

All those windows builds are more like a mutation, and far too much time and effort went into the subject of "playable on windows". If it wasn't for the life-love of certain stepmania developers literally dedicating their lives to stepmania.we would have nothing.

I am cynically stating that 7% performance improvement on runtimes, compared to the original project scope is bollocks. (compared to using e.g. WIndows 7,SSD/DDR3 Ram)

You have a strong opinion there, and I would like to encourage you to refrain from demanding VS2010 support for the (again bollocks) sake of windows XP compatibility.

Instead I'd like to encourage you to a) share your code in case it is improvement outside VS2010 support, as well as b) to neglect VS2010 support for the time being, and let the team release a 1.0 version, that finally fixes so many bugs from the past 5 years. This is actually much more important and relevant.

At any stage you are welcome to fork for / fix the situation with VS2010, but please let this not hinder the the so long anticipated release of a 1.0 that so many actually running OITG in its intended place - a boxor - are waiting for so long.

chrispable commented 7 years ago

RodentVienna, As I stated before vs2010 actually needs practically no changes but my target is getting everything to work on a potato of a computer. The extent of the work was basically recompiling the static libs and linking the latest dxsdk. Everything else worked out of the box.

I offered to share the project file and libs but the utility of such is debatable as it may break the other more meaningful targets. I am still not very used to git or msvc and the last thing I want to do is break something for others.

If you bothered to look you can see that I indeed did fork the project and listed the intent. The target I am aiming for is drop in replacement or using along side official DDR setups. These machines run windows xp embedded which cannot install vs2013+ because of authenticode, even with certificate updates. You can statically link 2013 if you recompile the shared libs though. I spent a significant amount of time trying to get newer redists to work and benchmarking what I could make happen on the very limited spec machine that's used in DDR.

Since I lack the experience to do this PROPERLY, I've documented everything I had to do and all my discoveries so that someone who CAN do it right is able to and people are able to see what needed to be done. I've made no demands and am not a project admin. I don't decide the release schedule but development takes time. I get 2-3 hour sessions every 2-3 weeks at a machine in a public location for tests and research and even then I have to be respectful of customers that's want to play. As such my testing setup is inefficient and fragmented. I have just a few bugs left to iron out on my fork (which is not fully pushed because my setup includes all my 2010 changes and I want to keep those clean from the main branch until it's properly done). My personal timeline is a hope to finish and test my branch after an overnight session of development with the machine at the Midwest gaming classic since I'll have exclusive access to it for an extended amount of time.

Might I suggest rather than make demands for a faster release, which again, I have no input over, you compile and distribute your own build and you can target whatever you want. I am merely contributing my changes to give back to the community and being attacked for attempting to share is discouraging and makes me question contributing in general if your opinion is representative of others.

RodentVienna commented 7 years ago

Please do not let me, the community nor anybody else ever discourage you from contributing. My opinion is representative of others, but this shall not contradict your goals majorily. What you try to achieve is simply something completely different, that the original scope of OITG wanted to deliver. It is nice and supercool and such if you try to run this in special setups. And please let me appreciate the time and effort put in by so many, and you. It is more than I contributed the past years altogether, yet I stay strong on my opinion which represents the opinion of many waiting for a final release, that something that can be called a final release can be released at all. The prime target remains of being a drop-in replacement executable on a boxor, and I do not see it very realistic to compile and distribute my own build as you outline, as, OITG in the current state of the git repo is considerably broken. broken in terms of bugs that actually exist in reality on boxors for real players in real productive environment. This, in my opinion, is much more important to fix, althugh I understand much better on the whereabouts of your work and effort. That so many simply want to actually use a bugfree version on their cabs/boxors should really not make you questioning yourself on contribution, and not at all discourage you. I am just asking kindly to let the release of a bugfree version that builds on the prime target platform - an mk6 boxor - have priority over simply everything else. OITG is far too long broken to think elsewise.

spigwitmer commented 7 years ago

Ok, so...