Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling #3

Closed
BeaconDev opened this issue Sep 18, 2014 · 129 comments
Closed

Compiling #3

BeaconDev opened this issue Sep 18, 2014 · 129 comments

Comments

@BeaconDev
Copy link

How do we go about creating a working executable or set of executables from the source? I'd be intrigued to try out the supposed new grass shadows, and then start looking at making changes of my own.

@nitrocaster
Copy link
Member

First of all, I would like to use my CS repository style here (docs, version plan, coding conventions).
Then apply changes I've already done (+ your changes, if there are ones).
Note that we should always have good master branch (though my repo wasn't actually good all the time). 'Good' means that:

  • it can be compiled without errors
  • it runs without critical errors (at least doesn't add new ones)
  • it is compliant with the coding conventions we use

To all contributors: Please, fill in your email addresses so we can contact each other personally.

@BeaconDev
Copy link
Author

Fine by me, go ahead and set that up if you like. If it looks good and works efficiently I don't see why we can't use your style.

Completely agree with a stable master branch.

You can contact me on CoPRedux@googlemail.com, or probably better, if you have Steam, at http://steamcommunity.com/id/beacon

@ghost
Copy link

ghost commented Sep 18, 2014

In terms of compiling, I have not tried compiling yet, I just wanted to port over my changes from CS first which I know will work fine with COP.

I completely agree. I think we need to agree on which COP repository to use first.
There are two that come to mind:

  1. The official 1.6.02 leak with fixes for VS2008 (that's the one uploaded here)
  2. https://bitbucket.org/redpython/xray-cop/branch/1.6.02

I also think we really should see if we can use VS2013 instead of 2008. Nitrocaster, I know you managed to do that with CS, and I have no idea how to do it at all. Would that be something you'd be interested in doing? You could pick what you want as the main branch then update it to 2013, then we can all work together on changes that follow the same style you use.

My email is matthew.w.swartz@gmail.com

I think what I'm going to do until we get all that done is port over all the changes I did for CS (such as the grass shadows by K.D.), into a separate branch and have only the files changed in there, which would allow for easy merging for features people want or don't want.

@BeaconDev
Copy link
Author

What are the differences on the two repos you listed?

@nitrocaster
Copy link
Member

For emails: I meant you profile settings

For compiling: It is bad idea to commit code that you didn't try to compile. Things are not supposed to work this way, we need 'good' master branch. When I found CS sources, I spent about two days to make sure it can be compiled.

For reference code: I suggest we use original sources for VS2008. Reason: no new bugs, only old well known ones.

For using VS2013: There's no troubles to use VS2013 - just convert solution and projest files. There may be some problems with virtual directories in projects - that have to be fixed manually (awful routine, but it happens).

@ghost
Copy link

ghost commented Sep 18, 2014

Works for me. Just filled in my email.
I agree, I shouldn't have suggested on making changes when I have yet to even compile it.

I may not have enough time today (have to work in a few hours), but I'll try to convert the project to VS2013 today then compile it. If it works I'll update things and post instructions the same way you did at your CS repo.

Also, for some reason I had two upload the code in two parts using the Github utility as it would crash after around 7,500 files. Is there an alternative way of committing to Github?

@nitrocaster
Copy link
Member

So, I'm going to dig into these sources, and once I get them all compiled I'll push them.
Meanwhile I suggest you to learn what's new in xray 1.6 comparing to 1.5 and schedule your tasks in the version plan.

@nitrocaster
Copy link
Member

@Swartz27, I understood from your previous post that you ask is I would get COP sources compiled under VS2013, so I'm ok with that. Are you going to do it by yourself?

@ghost
Copy link

ghost commented Sep 18, 2014

I was going to but if you're willing to do it I'll let you, then you can push it, and we can use what you've done as a base.

I realized I have very little time today, I'll probably jump back on in roughly 7 hours and see if anyone has had any luck. I'll go over the proposed features list again and tidy it up after I've compared COP to CS source and then put them in order.

@nitrocaster
Copy link
Member

Also, for some reason I had two upload the code in two parts using the Github utility as it would crash after around 7,500 files. Is there an alternative way of committing to Github?

Actually, I don't use Github utility for committing. I prefer git add + git commit + git push. If you're interested I use WinCmp (Compare it!) as diff/merge tool.
I have simple batch file that allows me to do these things:

  • gdiff : run difftool on unstaged changes
  • gdiff -c : run difftool on staged changes

@LoNer1
Copy link
Contributor

LoNer1 commented Sep 18, 2014

Good to be hearing ablout the structure and how things are going to unpack from here on.

For my email, its "loner_dude@hotmail.com" for anything modding related. Looking forward to our cooperation, gents!

Date: Thu, 18 Sep 2014 09:07:49 -0700
From: notifications@github.com
To: cop@noreply.github.com
Subject: [cop] Compiling (#3)

How do we go about creating a working executable or set of executables from the source? I'd be intrigued to try out the supposed new grass shadows, and then start looking at making changes of my own.


Reply to this email directly or view it on GitHub. =

@nitrocaster
Copy link
Member

To @Swartz27 : What are 'cs' and 'patch-1' branches for?

@ghost
Copy link

ghost commented Sep 19, 2014

I don't remember creating either branch, though it looks like someone removed "patch-1". The CS branch could have been where I had forked your CS repo but it can't be because there's no CS files there. I'll remove it.

@ghost
Copy link

ghost commented Sep 19, 2014

Bangalore, we're waiting on Nitrocaster to update the source here to Visual Studio 2013. I recommend using that once it's out rather than messing with these other revisions.

@ghost
Copy link

ghost commented Sep 19, 2014

I suggest to the feature list to implement luajit 2.0.3, for the replace of luajit 1.1.4.:
http://luajit.org/download.html

Luajit above version 2.0.0 compiles lua scripts much faster, it could remove microstutter, you can compare here the performance difference:
http://luajit.org/performance_x86.html

@BeaconDev
Copy link
Author

100% yes

also, nice to see you here Bangalore!

@ghost
Copy link

ghost commented Sep 20, 2014

I agree completely, I simply hadn't added the luajit version number in the proposed engine changes, but I had meant the version you speak of.

@nitrocaster
Copy link
Member

To @Bangalore1010 : r8384 is kinda experimental version.

@ghost
Copy link

ghost commented Sep 20, 2014

@Bangalore1010 : Did you use the vs2008 version from the Github here or did you download it from the post on gameru? Just wondering because I encountered a bug trying to compile the source here, but I'm pretty sure it's the same version. Either way, downloaded it again from gameru. I think the reason I couldn't get it to compile was I don't have SP1 installed for VS2008 :P

@tsf00181
Copy link

Do you have a link for the CS source code?

Google translate is playing hell with me on the gameru.net site so I'm
having trouble finding it.

On 9/20/14, Bangalore1010 notifications@github.com wrote:

I used this pack with Visual Studio 2008 professional + SP1 + both June 2010
DirectX SDK + include and lib folders from November 2007 SDK (but alone the
March 2009 SDK should work fine too) + dev SDK from the stasvn.7z pack:
http://s.gameru.net/stalker/STK-HLAM/engine.vc2008.fixed.rar

For clarity's sake, here is my complete engine+sdk folder upload:
http://www.mediafire.com/download/2hzqxc2ozvekdsk/COP_src_v1602.7z


Reply to this email directly or view it on GitHub:
#3 (comment)

@ghost
Copy link

ghost commented Sep 20, 2014

@tsf00181 : http://www.gameru.net/forum/index.php?s=297823ebaced19091f6c36b012189218&showtopic=55777&st=1700&p=1489128&#entry1489128

@Bangalore1010 : Did you encounter an error when compiling zlib that mentioned "_vsnprintf" being redefined? Just wondering, because I fixed it by going into zutil.h and commenting out lines 197 to 202.
I'm compiling xrgame (again) because I forgot to include the DirectX includes and libraries with it :p I'm expecting this will work fine though as it's the last file to compile and they've all compiled fine so far.

I'll post an update later as I have to go.

@andrew-boyarshin
Copy link
Contributor

andrew-boyarshin commented Sep 20, 2014

I'd like to work on LuaJIT and LuaBind, when CoP sources will become compilable.

@nitrocaster
Copy link
Member

I'd like to suggest to rename this repo to "xray-16", if you don't mind.

@ghost
Copy link

ghost commented Sep 20, 2014

I don't mind at all. In fact, nitrocaster, is it possible to transfer ownership of a repo? You have a good system with certain coding conventions, you're the top programmer here, etc. I think you should be in charge with us contributing.

Also, unless you've gotten any farther on compiling it in VS2013, I think maybe we're good with leaving it at VS2008. I downloaded and compiled what Bangalore posted to be extra careful, beside the one modification I had to make which I mentioned, it worked fine (well, the R4 renderer isn't working at the moment. It's telling me my video card doesn't support it. So I need to figure out what's causing that which is probably me using a newer DirectX sdk than the one we're supposed to use).

I'm actually going to delete the source code currently up and re-upload with the structure Bangalore is using once I can verify R4 works correctly. It's cleaner to post it that way.
Then I think I'm going to grab the coding convention and commit convention documents you have and post them here as well if you don't mind.

@STALKER2010 : Please do work on those, that would be great. With LUAJit are you going to be using the newest version, as that is what we would like to use.It means re-doing the vanilla LUA scripts too in order to work with the new version though.

@nitrocaster
Copy link
Member

is it possible to transfer ownership of a repo?

AFAIK, it's not necessary since I'm a contributor. Anyway, you can do it via support.

For migrating to VS2013 - work in progress, just wait a little.

For R4 renderer: do you have DX11-compatible GPU? If so, that is a problem in shader that I've already fixed (in my xray 1.5 repo).

For this:

I'm actually going to delete the source code currently up and re-upload with the structure Bangalore is using

You uploaded the same code Bangalore use (vs2008.fixed). The only difference is that you missed SDK stuff. I'll take care of it, keep calm and don't delete anything :)

@nitrocaster
Copy link
Member

Wow, it's not that I thought. Try to investigate.

@ghost
Copy link

ghost commented Sep 20, 2014

My guess is that the SDK isn't up to date for DX11. I'm going to try a later revision of the DirectX SDK and see if that solves it.
If that doesn't help I'll compile everything under debug.

Edit
The SDK is the last one before it becomes Windows SDK for Win8 which the GSC people obviously didn't use. Time to debug.

@ghost
Copy link

ghost commented Sep 20, 2014

Looks like it doesn't want to be debugged: http://pastebin.com/Pr83gBWe

Just noticed something else. Every time it crashes with that error it creates the precompiled shader for the r4 dumb.ps in your gamedata folder. WTF is that all about?

@nitrocaster
Copy link
Member

The xrGame.dll is a hell a lot of time to compile.

That's why we should split it to multiple modules (maybe DLL + static libraries).

@nitrocaster
Copy link
Member

dedicated\xrEngine.exe is a dedicated server executable. You have to build it separately (see ***_Dedicated build configurations).

Regarding Stalker-COP.exe - it's just a launcher that can be replaced with the following cmd script:

start bin/xrEngine.exe

It's intended that _bin_dbg contains new binaries that you build, while bin conserves original binaries.

@jakebriggs
Copy link

Okay, so the dedicated server is not needed to run the game single player. Excellent. Also, thanks for the advice on how to start the game - much appreciated!

On 5 May 2015 11:25:35 pm NZST, Pavel Kovalenko notifications@github.com wrote:

dedicated\xrEngine.exe is dedicated server executable. You have to
build it separately (see ***_Dedicated build configurations).

Regarding Stalker-COP.exe - it's just a launcher that can be replaced
with following cmd script:

start bin/xrEngine.exe

It's intended that _bin_dbg contains new binaries that you build,
while bin conserves original binaries.


Reply to this email directly or view it on GitHub:
#3 (comment)

@jakebriggs
Copy link

EDIT: setting $app_data_root$ = true | false | C:\Games\S.T.A.L.K.E.R. - Call of Pripyat
in fsgame.ltx solved the below problem

edit2: no it didn't....

I am using visual studio 2013 community edition to compile, and I am compiling successfully, but the game won't start using start _bin_dbg/xrEngine.exe - start bin/xrEngine.exe works fine (I didn't compile that one though).

Starting it from visual studio gives me:

Unhandled exception at 0x61331752 (msvcr120.dll) in xrEngine.exe: 0xC00000FD: Stack overflow (parameters: 0x00000000, 0x00092000). 

and this log

@nitrocaster
Copy link
Member

Do you really get stack overflow? Could you post stack trace?

FS: 5768 files cached 0 archives
No one archive found. Do you have original game resources?

@jakebriggs
Copy link

Run from _bin_dbg: http://pastebin.com/UTXdVEEq

@jakebriggs
Copy link

and running from visual studio: http://pastebin.com/F6xSaLbm

@nitrocaster
Copy link
Member

You should have got message box when the first failure happened. See src\xrCore\xrDebugNew.cpp:220
nodefault reached means that MessageBox returned some unexpected value.

@jakebriggs
Copy link

jakebriggs commented May 6, 2015

and running from visual studio:
http://pastebin.com/xcCGy1SM

@nitrocaster
Copy link
Member

Please use pastebin.com or another external storage for these huge logs.
What's about message box I asked above?

@jakebriggs
Copy link

Sorry about that. I've set the game to be windowed. Upon starting the game, I get the little splash screen, then the window pops up - all black, then I get "X-ray 1.6 has stopped working" message:

http://i.imgur.com/aLrTHiE.png

I don't think that is the pop up you were expecting....

@jakebriggs
Copy link

I solved it. I still had stalker complete mod installed. I was sure I removed it, bit obviously I was mistaken.

Sorry for wasting your time, I feel like an idiot!

On 6 May 2015 10:28:11 pm NZST, Pavel Kovalenko notifications@github.com wrote:

Please use pastebin.com or other external storage for these huge logs.
What's about message box I asked above?


Reply to this email directly or view it on GitHub:
#3 (comment)

@ViHtarb
Copy link

ViHtarb commented Jun 22, 2015

Plz help me

I build sources from this repo and noticed that building xrGame project is a very very slow compared with build a clear sources of xrGame in Visual Studio 2008.

Example, i comment two same lines in Actor.cpp in a both projects(from this repo and in clear project) As a result of building the project time was 4 minutes(VS2013) and 2 minutes(VS2008)

How to fix it?

@nitrocaster
Copy link
Member

Try to disable Multiprocessor compilation (/MP) and enable Minimal rebuild (/Gm).

@ViHtarb
Copy link

ViHtarb commented Jul 8, 2015

this not helped :(

@nitrocaster
Copy link
Member

No way. Commenting two lines in any single cpp file means that only one cpp file should be recompiled. Given that you have precompiled headers enabled, such compilation should be quite fast.

zcaliptium added a commit to zcaliptium/xray-16 that referenced this issue Sep 15, 2015
Removed some useless classes.

XEM OpenXRay#157 SimpleDetector(.h/.cpp) -> item/ItemDetectorSimple(.h/.cpp)
XEM OpenXRay#158 AdvancedDetector(.h/.cpp) -> item/ItemDetectorAdvanced(.h/.cpp)
XEM OpenXRay#159 EliteDetector(.h/.cpp) -> item/ItemDetectorElite(.h/.cpp)
XEM OpenXRay#162 PDA(.h/.cpp) -> item/ItemPDA(.h/.cpp)
XEM OpenXRay#171 Torch(.h/.cpp) -> item/ItemTorch(.h/.cpp)
XEM OpenXRay#172 CustomDetector(.h/.cpp) -> item/ItemDetectorCustom(.h/.cpp)
@andrew-boyarshin
Copy link
Contributor

@nitrocaster @Armada651 close this one?

@CrossVR
Copy link
Contributor

CrossVR commented Mar 10, 2017

@andrew-boyarshin If you think an issue can be closed, go ahead and close it. If it really still is an issue someone will reopen it.

Xottab-DUTY pushed a commit that referenced this issue Oct 10, 2018
Precompile stdafx/pch headers for faster compilation and fix a mistake
SkyLoaderr added a commit that referenced this issue Dec 4, 2018
- Removed glClipControl, shading language version can be downgraded
- Removed useless pCFB buffer
- Invert many screen quads
- Invert matrices of viewport for lighting
- Fixed flickering frames near light sources (shadowmaps are still incorrect)
- Corrected TexelAdjust matrices
- Invert scissor box
- Removed flip from .tga screenshots
- Some changes in shaders for ATI video cards #3
- Added key '-no_hom'
eagleivg added a commit to eagleivg/xray-16 that referenced this issue Jul 2, 2020
Fix format OpenXRay#3

Co-authored-by: Xottab_DUTY <Xottab-DUTY@users.noreply.github.com>
ChugunovRoman added a commit that referenced this issue Nov 22, 2023
feat: Add lua file system library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests