Comments (30)
DEPENDENCIES
Install MSYS2 with mingw-w64 toolchain
pacman -Syu
Install opusfile (not currently packaged by MSYS2 distribution)
wget http://downloads.xiph.org/releases/opus/opusfile-0.6.tar.gz
./configure --prefix=/mingw32/ --{build,host,target}=mingw64-i686
make install
Install dependencies
pacman -S mingw-w64-i686-{SDL2,SDL2_image,glew,freetype,ftgl,opus,opus-tools,libogg,python3-numpy,python3-Pillow}
fc-cache
PATCHES
Buildsystem patches: (I gave up on cmake)
- configure: Comment out 258-259, MSYS2 doesn't support symlinks.
- configure: Add
invocation.append('-G')
invocation.append('MSYS Makefiles')
around line 278. - buildsystem/simple: line 18 add
set -e
for debugging - buildsystem/simple:
sed -i 's~/usr/include/~/mingw32/include/~g' buildsystem/simple
- buildsystem/simple: remove
-z,relro
and-fPIC
options - buildsystem/simple: move
-lpython3.4m
to the END of the python ext module build - buildsystem/simple: change
PYTHONPATH
to justPYTHONPATH=py
- buildsystem/simple: Remove
-l{GLEW,GLU,GL,SM,ICE,X11,Xext,util}
from main gcc build ; move libraries to end ;-lSDL2
doesn't need to be there twice ; add-lglew32 -lopengl32
- buildsystem/simple: Add
-Wno-format
. There are lots of minor printf format issues owing to building on ILP32 platform.
C++ patches:
- utils/fds.h: comment out termio.h, comment 84
- utils/fds.cpp: comment out pty.h, comment 26-27, comment 101-111, comment 115-118
- console/tests.cpp: comment out pty.h, comment 36-158
- audio/hash_functions.h: change to <<16 for ILP32 platform. This seems unused?
- main.cpp: append the WinMain wrapper from http://www.flipcode.com/archives/WinMain_Command_Line_Parser.shtml , since main() doesn't seem to be called as-is and
ld
can't find the usual mainCRTStartup wrapper
Python patches:
- py/openage/convert/dataformat.py:1051: should be snippets_body_sorted ( issue #7 )
- py/openage/convert/mediafile.py:20: dat_cache_file = "C:/tmp_empires2_x1_p1.dat.pickle"
BUILD
Build binary
./configure --mode=debug --c-compiler=gcc --cpp-compiler=g++
cp -R .bin/gcc-debug-01 ./bin
buildsystem/simple
Build assets (takes a long time and 600MB+ ram.)
PYTHONPATH=py python3 -m openage.convert -v media -o "assets/converted" "/c/Program Files (x86)/Age of Empires/" graphics:*.* terrain:*.* sounds0:*.* sounds1:*.* gamedata0:*.* gamedata1:*.* gamedata2:*.* interface:*.*
Convert all *.docx files from CRLF to LF
find ./assets/converted/ | grep 'docx$' | xargs -n1 sed -rie 's/\r\n/\n/'
This conversion is slow, it would be better to fix the script to produce LF instead of CRLF on MSYS2 platform.
from openage.
awesome! lets see how we can bring your changes upstream without ugly hacks ;)
from openage.
https://github.com/franciscod/openage/compare/convert-crossplatform-tmp
This should fix the mentioned issue:
py/openage/convert/mediafile.py:20: dat_cache_file = "C:/tmp_empires2_x1_p1.dat.pickle"
from openage.
Hi mappu,
I'm a windows user, and i'm never use linux before. So could you explain to me how to build openage on windows step by step. How can i build assets and convert all *.docx files as you say?
Many thanks.
from openage.
there's no step by step guide to compiling on windows: this guide posted by @mappu cross-compiles from arch linux to windows using mingw
EDIT: this is for windows! read mappu's comment below
from openage.
@franciscod Just to clarify, i did build it on windows - MSYS2 is a distribution of pacman and mingw-w64 on windows. You can find it at http://msys2.github.io/ .
from openage.
Oh, I didn't know of msys2! I assumed Arch Linux from pacman. Thanks for
your clarification!
from openage.
I would like to help develop the project, can I use Visual Studio 2012 to help develop it? Also, how would I do this?
from openage.
@EvilPeanut for long-enduring discussion the best place is our irc channel π (#sfttech on freenode). The resulting tasks and decisions will then be posted back here in the issue tracker.
from openage.
@TheJJ Thanks, il have a look at that.
I know it's alot to ask, but would it be possible for someone to build it for Windows for me and send me the files (.exe ect..). I would love to try it and learn C++, but don't currently have the required knowledge to build the project.
from openage.
@EvilPeanut I think it'll be easier for the initial understanding to learn developing under Linux. You can simply install a Linux VM or use dual-boot. openage is currently working under Linux and MacOS X, it will be a long way and very complicated for you to start developing under Windows. Just join the IRC, many people can help you directly there.
from openage.
@TheJJ Just for clarification, is the solution by @mappu in the right direction, but needs to be properly integrated into CMake? Or is there a different issue?
from openage.
@burgerga The direction seems to be ok. Yes, it should be integrated into CMake properly and the plattform-specific switches should happen in cpp/crossplattform
. Using mingw64 is probably the ideal way for us I hope.
from openage.
I'm giving a shot on this one, under a W7 32bit VM. Wish me luck!
from openage.
Good work @franciscod. I don't suppose you would mind zipping and sending me the compiled windows files for openage do you? If so it would be greatly appreciated. My email is [email protected]
from openage.
PROTIP: setbuf(stdout, NULL);
is very useful π
@EvilPeanut nope, the compiled files doesn't work at all :D if you want the binaries just follow my instructions; this is far from finished.
from openage.
holy crap, i've been debugging 2 hours for THISS!!!!!
MSG ERROR: failed reading the file ./assets/converted/termcolors.docx
FATAL Exception: failed reading the file ./assets/converted/termcolors.docx
and i forgot the last step from our god and saviour mappu:
- Convert all *.docx files from CRLF to LF
find ./assets/converted/ | grep 'docx$' | xargs -n1 sed -rie 's/\r\n/\n/'
from openage.
!!!!!!!!!!!!!!!!!!!!!
>be gaben
>gotta go fast
from openage.
This commit builds and runs!!!
https://github.com/franciscod/openage/tree/a4519112381fe7dd8ceed3377d620dc548064d07
from openage.
#207 targets compiling and running from a MSYS2 system, on a windows host
#233 cross compiles using mingw-w64 and runs with wine!
from openage.
Congrats, but beware of the next step: packaging π
from openage.
You should consider using the new Clang support in Visual Studio. That may make some things easier.
from openage.
Necrobumping to the maximum level!
Should we target crosscompiling windows binaries from *nix (using mingw-w64, for example), building on windows hosts (with msys2 and/or visual studio), or both?
from openage.
I'd say prio #1
is crosscompiling with mingw-w64, if that works, we can think about msys2
and then visualstudio.
from openage.
It's still in prerelease. No debugger support.
from openage.
One of the main problems now is packaging, and mainly the question what to do with the python interpreter. If you want to include that in the package it's quite annoying, I think there are only nice solutions for python 2 but i could be wrong...
from openage.
@burgerga I ran into some problems myself trying to package it for nixos. We will probably redesign some of the python-specific parts. Shipping an interpreter in the openage package will probably cause a lot of problems.
from openage.
Ho, I remember trying to crosscompile with mingw-w64 from Arch Linux and hit some roadblocks with the mingw-w64 Python package. It's been updated to 3.6 now, just letting you know if someone wants to give it a shot :)
https://aur.archlinux.org/packages/mingw-w64-python
from openage.
There is a 64-bit installer out for windows 10. You can download it here.
Next step could be reproducible and frequent CI-builds with Kevin.
I don't know when this topic can be closed - Windows support could take forever. :-D
EDIT: I'll close this issue now, openage is building, running and could even be packaged and installed on windows 10 64bit, issues that are related to windows like conversion, cross-compiling under linux targeting windows should be separate.
from openage.
Bookmarking one relevant commit (probably not fast-forward) to build openage under windows with mingw (by @tusharpm).
from openage.
Related Issues (20)
- "error: βDictβ is not a member of βnyanβ" during build HOT 7
- Can't build with clang, error: "jthread is supported now, remove custom definition" HOT 4
- Asset conversion issue, AttributeError: 'NoneType' object has no attribute 'readable' HOT 6
- Adding PR/ISSUE Templates for this repo HOT 7
- Asset path type is incorrectly used HOT 5
- error: Couldn't find qml root folder HOT 15
- Test fail when building with GCC 13.2.1 HOT 10
- Error launching game, uncaught exception(s) HOT 25
- openage game: error: the following arguments are required: --modpacks HOT 4
- Running Error on Mac osx 13.4(Macbook M1 Pro ARM architecture) HOT 1
- FATAL: terminate has been called uncaught exception std::exception of type std::__1::system_error: thread::join failed: Invalid argument HOT 2
- Multiple cmake issues when trying to build HOT 4
- Submission to Steam HOT 2
- OpenGL error when launching on Wayland HOT 11
- CMake can't find toml11 on Linux Mint 21.2 HOT 4
- Errors after the new PR merged HOT 3
- Link on website https://openage.sft.mx/ to windows packages is a broken link HOT 2
- Windows Build: Python Command Requiring --modpacks Argument HOT 3
- Asset conversion stalls on media conversion HOT 10
- Fix Ubuntu Dependency installation script HOT 5
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 openage.