Comments (12)
I merged in the updated build instructions into the readme. So if you still have an issue please open a new one.
from civctp2.
I think it should be not be a big problem to build the repo on linux.
- The only building system problem that I ran into (and rather obvious) is that compiling & .cdb generator does not sync.
So it is often necessary to build twice if .cdb is modified - 1st pass fails due to stale .cdb gen; 2nd pass succeeds because .cdb generator does not regen and thus free of race condition. - The source code quality is another story, and may leads to other building problems.
This is the flags I used to compile the repo on my local machine: Ubuntu 20.04 / gcc 9.4
Please notes:
- Most ccflags are to suppress less significant and noisy warnings.
- Some ccflags are necessary because of my local changes.
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
if [[ "$1" == "--d" ]] || [[ "$1" == "--debug" ]]; then
export CFLAGS="$CFLAGS -Og"
export CXXFLAGS="$CXXFLAGS -Og"
else
export CFLAGS="$CFLAGS -O2"
export CXXFLAGS="$CXXFLAGS -O2"
fi
export CFLAGS="$CFLAGS -g -fuse-ld=gold -Wno-unused-function"
export CXXFLAGS="$CXXFLAGS -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -fuse-ld=gold -std=gnu++17" # -fno-exceptions # FIXME: enable -fno-exceptions
# Fatal
# gcc 9.4 may generate broken code if return statement is missing.
export CXXFLAGS="$CXXFLAGS -Werror=return-type"
# Pointless / Too noisy
export CXXFLAGS="$CXXFLAGS -Wno-maybe-uninitialized"
# Probably safe
export CXXFLAGS="$CXXFLAGS -Wno-write-strings -Wno-reorder -Wno-unused-function -Wno-endif-labels -Wno-multichar -Wno-char-subscripts -Wno-conversion-null -Wno-register"
# Probably safe, but may miss true errors
export CXXFLAGS="$CXXFLAGS -Wno-unused-but-set-variable -Wno-unused-value -Wno-switch -Wno-misleading-indentation -Wno-parentheses -Wno-vla -Wno-unknown-pragmas"
# Unsafe, but probably insignificant
export CXXFLAGS="$CXXFLAGS -Wno-format -Wno-format-overflow"
export CXXFLAGS="$CXXFLAGS -Wno-strict-aliasing"
# Unsafe
export CXXFLAGS="$CXXFLAGS -Wno-class-memaccess -Wno-sign-compare"
# Error
export CXXFLAGS="$CXXFLAGS -fpermissive -Wno-address-of-packed-member -Wno-deprecated-declarations"
# Critical Error
export CXXFLAGS="$CXXFLAGS -Wno-restrict"
export LIBS="-lunwind"
$SCRIPT_DIR/configure --enable-silent-rules
from civctp2.
I feel that this repo is dead.
If you could find a group of people contributing to it, IMHO you had better fork it.
esp. because GitHub PR workflow is horrible that it can easily cost more effort to submit patches than writing patches.
Contributing non-trivial patches could be nightmare for non-commiters.
from civctp2.
I feel that this repo is dead. If you could find a group of people contributing to it, IMHO you had better fork it. esp. because GitHub PR workflow is horrible that it can easily cost more effort to submit patches than writing patches. Contributing non-trivial patches could be nightmare for non-commiters.
Thank you for the detailed instructions! I will add a link to this on the Discord for people trying to build it.
Also, I have been trying to get this running from VS 2022 the past two days and have gotten fairly far. Build was successful, but went to run it and got this popup. I'll update this if I find anything to fix it.
from civctp2.
Also, I have been trying to get this running from VS 2022 the past two days and have gotten fairly far. Build was successful, but went to run it and got this popup. I'll update this if I find anything to fix it.
No, you did not run, at least that what I guess, since the message box is covering the interesting information about ctp2.exe. I guess the creation is is 12/26/2022 9:09 PM and its size is about 6 MB, which is the release version. The version you compiled this year should be well from this year and its size should be around 4 MB.
I guess you did not copy it over.
The released version of the executable is in ctp2_program/ctp, while the freshly compiled version is in ctp2_code/ctp. Depending on the configuration you chose, the file will be named differently. Configuration Debug generates CivCTP_dbg.exe, the heavy debug version with logging, assertions, and memory leaks checking. The last thing makes it slow.
Then the configuration Release generates ctp2r.exe, so obviously not the version that was actually released. I think it contains some minor stuff for debugging than the final version.
And that what you get with the configuration Final, that it's then ctp2.exe.
Of course, Visual Studio is an integrated development environment. That means you start the game within Visual Studio. You can just press F5, that should start also the debugger or CTRL+F5 that should start it without the debugger. You can check that in the Debug menu, right now I am on a Linux so I can't check it and that is already quite some unconscious routine for me.
If you want to use your save games, then copy the folder ctp2_program/ctp/save/ including its subfolders to ctp2_code/ctp/save/.
from civctp2.
Also, I have been trying to get this running from VS 2022 the past two days and have gotten fairly far. Build was successful, but went to run it and got this popup. I'll update this if I find anything to fix it.
No, you did not run, at least that what I guess, since the message box is covering the interesting information about ctp2.exe. I guess the creation is is 12/26/2022 9:09 PM and its size is about 6 MB, which is the release version. The version you compiled this year should be well from this year and its size should be around 4 MB.
I guess you did not copy it over.
The released version of the executable is in ctp2_program/ctp, while the freshly compiled version is in ctp2_code/ctp. Depending on the configuration you chose, the file will be named differently. Configuration Debug generates CivCTP_dbg.exe, the heavy debug version with logging, assertions, and memory leaks checking. The last thing makes it slow.
Then the configuration Release generates ctp2r.exe, so obviously not the version that was actually released. I think it contains some minor stuff for debugging than the final version.
And that what you get with the configuration Final, that it's then ctp2.exe.
Of course, Visual Studio is an integrated development environment. That means you start the game within Visual Studio. You can just press F5, that should start also the debugger or CTRL+F5 that should start it without the debugger. You can check that in the Debug menu, right now I am on a Linux so I can't check it and that is already quite some unconscious routine for me.
If you want to use your save games, then copy the folder ctp2_program/ctp/save/ including its subfolders to ctp2_code/ctp/save/.
This makes more sense (I already know how to run the IDE of course, but had no idea the outfile was CivCTP_dbg.exe
). I have been experimenting around with it and I believe I'm close to building it once more. I do have a few questions though:
- When I build any of the startup items, I notice they tend to go into a dot directory (notice the /./ in the path). Is this intended? I seem to be able to build just fine with them, it's just curious (my first inclination is that it's a cygwin thing).
For example, building underDebug Browse | Win32
,
dbgen.vcxproj -> C:\Users\justin.farrell\Documents\ctp2-apolyton\civctp2-try-2\ctp2_code\gs\dbgen\.\Debug\dbgen.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Also, another line gotten while building the sln:
6> civctp.vcxproj -> C:\Users\justin.farrell\Documents\ctp2-apolyton\civctp2-try-2\ctp2_code\ctp\.\Debug\ctp2.exe
- I have gotten the build to succeed:
========== Build: 6 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
Build succeeded
When I do press F5 however, nothing happens. If I run CivCTP_dbg.exe
manually, however, I end up running into this DLL error:
I am assuming this is due to me using VS 2022 to build it, since this seems to be a DLL generated with VC++ 6.0. I've been looking into getting this fixed a bit, just curious if you happen to know the correct settings to get this DLL out? I'm currently running under x86_Debug
configuration, VS 2022 17.5.
Edit: I'm now installing VC++ 6.0 to see if it'll fix this.
Edit 2: Installing VC++ 6.0 didn't fix it, but I changed my config to x64-Debug
and Debug|Win64
and managed to get no missing DLL popup and a loading spinner (but sadly it didn't actually run the game visually). Also no error as you can see.
Edit 3: Checked with Powershell and yeah, the program appears to have completed successfully but the game never opened ($?
was True and after $Error.Clear()
and re-running $Error[0]
was empty).
from civctp2.
I feel that this repo is dead.
@myocytebd What makes you feel that?
from civctp2.
A clear warning is needed in the instructions. "configure: error: unsafe absolute working directory name" is too vague, not everyone will realize that no spaces in the path is assumed.
from civctp2.
I feel that this repo is dead.
@myocytebd What makes you feel that?
Nothing to do with feelings just his bad way of stating it. Most files have no recent edits, lots of open issues, latest edits are a year old, lots of open issues directly related to people being unable to build.
from civctp2.
I feel that this repo is dead.
@myocytebd What makes you feel that?
Nothing to do with feelings just his bad way of stating it. Most files have no recent edits, lots of open issues, latest edits are a year old, lots of open issues directly related to people being unable to build.
Contributions for improvement are very welcome!
Most of the long term contributors and maintainers have not so much time any more;-)
from civctp2.
Please, also let us know if things work out for you now and what caused the problems.
from civctp2.
Please, also let us know if things work out for you now and what caused the problems.
I will definitely try building it again in a few weeks when my new computer comes in. Thank you!
from civctp2.
Related Issues (20)
- Drop-down lists have no scroll option HOT 1
- Remofications due to buy of Activision by Microsoft HOT 1
- Windows release HOT 5
- My lets play of original Activision version Call to power 2 HOT 2
- Is this good time to ask Microsoft for Activision assets? HOT 6
- Having issues getting this edition to work on Lubuntu (Jammy Jellyfish) HOT 35
- CI testing integration to Travis and GitLab broken HOT 1
- Nation conquered message even if nation still exists HOT 3
- Unhappiness due to War Discontent possibly processed wrongly HOT 2
- Old repo at ctp2.darkdust.net is going to be removed HOT 4
- How to enable console printing? HOT 2
- Nuke "move" animation does not display correct facing? HOT 1
- monthly rebuild GL-CI schedules HOT 4
- GitLab for Open Source Program HOT 2
- Freeze in Build Manager: multiple cities and impossible build request HOT 1
- SegFaults when processing mouse events in invalid aui_Region HOT 2
- Non-Win Debug Builds HOT 3
- AVCodecContext error when building on Debian12 HOT 2
- Need for optimized/new implementation of the astar algorithm
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from civctp2.