This -should- be easily duplicatable on any operating system. Virtualbox is a free cross platform package for virtual computers.
https://www.virtualbox.org/
Operating system image: (free for 90 days, then just rebuild)
Microsoft Edge on Win 10 Stable (13.10586)
https://developer.microsoft.com/en-us/m ... s/windows/
I increased the video memory of the image to 64mb, enabled audio, and changed the audio
controller to 'Intel HD Audio'
Inside the running virtualbox:
1) Windows setup
Microsoft 2013 c++ redistributables need to be installed (both x86 AND x64)
https://www.microsoft.com/en-ca/downloa ... x?id=40784
7-Zip: (You'll need to run the 7zip file manager to extract .7z files)
http://www.7-zip.org/a/7z1514-x64.exe
Notepad++: This will be needed to edit source files
https://notepad-plus-plus.org/repositor ... taller.exe
Add the path names that will be needed. Right click the start button, left click system.
Go to Advanced System Settings / Enviroment Variables
Add a new user variable 'PATH' of value
'c:\Python27;c:\Qt\Qt5.4.2\5.4\mingw491_32\bin;c:\mingw32\bin;c:\mingw32\lib;c:\Program Files (x86)\CMake\bin;"
2) Compile environment setup
Python 2.7.11: (This is needed in building zzlib)
https://www.python.org/ftp/python/2.7.1 ... 2.7.11.msi
Qt 5.4.2
http://download.qt.io/official_releases ... -5.4.2.exe
Mingw: (extract to c:\mingw32)
http://sourceforge.net/projects/mingwbu ... six/dwarf/
msys: (download the latest and extract the msys folder to c:\mingw32)
http://sourceforge.net/projects/mingwbu ... -packages/
CMake:
http://www.cmake.org/files/v3.0/cmake-3 ... 32-x86.exe
3) Download libraries in MSYS
Open MSYS(click msys.bat in the msys folder), where you'll be in a home directory. Now enter:
Code: Select all
mkdir src
cd src
wget http://www.lua.org/ftp/lua-5.1.5.tar.gz
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
wget http://zlib.net/zlib-1.2.8.tar.gz
wget http://www.sqlite.org/2013/sqlite-autoconf-3071700.tar.gz
wget http://www.nih.at/libzip/libzip-0.11.2.tar.gz
Boost: Copy the 'boost' folder from inside the downloaded .tar.gz file to c:\mingw32\include\
https://sourceforge.net/projects/boost/ ... z/download
Hunspell: Copy this file to c:\mingw32\msys\home\your_name\src
http://downloads.sourceforge.net/hunspe ... 3.2.tar.gz
Yajl: Copy this file to c:\mingw32\msys\home\your_name\src
http://github.com/lloyd/yajl/tarball/2.0.1
Zziplib: Extract this to c:\mingw32\msys\home\your_name\src
https://sourceforge.net/projects/zzipli ... 2/download
In the msys window, to extract all the downloaded files enter:
Code: Select all
tar -zxvf hunspell-1.3.2.tar.gz
tar -zxvf lua-5.1.5.tar.gz
tar -zxvf zlib-1.2.8.tar.gz
tar -zxvf libzip-0.11.2.tar.gz
tar -zxvf pcre-8.38.tar.gz
tar -zxvf zziplib-0.13.62
tar -zxvf lloyd-yajl-2.0.1-0-gf4b2b1a.tar.gz
tar -zxvf sqlite-autoconf-3071700.tar.gz
4) MSYS Compilations
All these will be compiled inside the msys command prompt. 'cd dirname' into each respective directory:
hunspell-1.3.2:
./configure --prefix=/c/mingw32
You'll get an error in localname.c if you make right away, edit this file (intl/localename.c, comment out case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";)
make && make install
lloyd-yajl-f4b2b1a:
Edit CMakeLists.txt in the base dir of YAJL, and make the following changes:
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") to SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
SET(linkFlags "/PDB:NONE /INCREMENTAL:NO /OPT:NOREF /OPT:NOICF") to SET(linkFlags)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4255 /wd4130 /wd4100 /wd4711") to SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
SET(CMAKE_C_FLAGS_DEBUG "/D DEBUG /Od /Z7") to SET(CMAKE_C_FLAGS_DEBUG "-g")
SET(CMAKE_C_FLAGS_RELEASE "/D NDEBUG /O2") to SET(CMAKE_C_FLAGS_RELEASE "-O2")
And then compile:
Code: Select all
mkdir build
cd build
cmake -G "MSYS Makefiles" ..
make
cp yajl-2.0.1/lib/* /c/mingw32/lib/
cp -R yajl-2.0.1/include/* /c/mingw32/include/
edit the Makefile, change INSTALL_TOP= /usr/local to INSTALL_TOP= /c/mingw32
change TO_LIB= liblua.a to TO_LIB= liblua.a lua51.dll
make mingw
make install
pcre-8.38:
Code: Select all
./configure --prefix=/c/mingw32 && make && make install
Code: Select all
./configure --prefix=/c/mingw32 && make && make install
zlib-1.2.8:
Code: Select all
make -f win32/Makefile.gcc
export INCLUDE_PATH=/c/mingw32/include/
export LIBRARY_PATH=/c/mingw32/lib/
export BINARY_PATH=/c/mingw32/bin/
make -f win32/Makefile.gcc install
cp zlib1.dll /c/mingw32/bin
cp libz.dll.a /c/mingw32/lib
Code: Select all
./configure --prefix=/c/mingw32 && make && make install
cp lib/zipconf.h /c/mingw32/include
Edit the configure file, and change the two occurances of 'uname -msr' to 'uname -ms'
Code: Select all
configure --disable-mmap --prefix=c:/mingw32/ && make && make install
Change back to the src directory with all the downloaded packages.
(note! The git information i'm using doesn't directly target release 30 - comments?)
git clone https://github.com/Mudlet/Mudlet.git
( I will build a commit to change the below information at the source)
edit Mudlet/src/src.pro
to Win32:LIBS:
change:
-lzlib to -lzlib1
-lhunspell to -lhunspell-1.3-0
-lpcre to -lpcre-1
-llibzip to -llibzip-2
add right above -llua51:
-L"C:\\mingw32\\bin" \
6) Build mudlet
cd Mudlet/src
The below will generate warnings: Qt: Untested Windows version 10.0 detected!
qmake
make
That's where it breaks on Qt 5.6 (lack of opengl) - These instructions, however, are using 5.4.2
mkdir /c/release
cp release/mudlet.exe /c/release
7) Copy Needed DLLs to release directory
DLLs found in Qt\Qt5.4.2\5.4\mingw491_32\bin, c:\mingw32\lib and c:\mingw32\bin
Code: Select all
cp /c/Qt/Qt5.4.2/5.4/mingw491_32/bin/icudt53.dll /c/release
cp /c/Qt/Qt5.4.2/5.4/mingw491_32/bin/icuin53.dll /c/release
cp /c/Qt/Qt5.4.2/5.4/mingw491_32/bin/icuuc53.dll /c/release
cp /c/Qt/Qt5.4.2/5.4/mingw491_32/bin/Qt5Core.dll /c/release
cp /c/Qt/Qt5.4.2/5.4/mingw491_32/bin/Qt5Gui.dll /c/release
cp /c/Qt/Qt5.4.2/5.4/mingw491_32/bin/Qt5Network.dll /c/release
cp /c/Qt/Qt5.4.2/5.4/mingw491_32/bin/Qt5OpenGL.dll /c/release
cp /c/Qt/Qt5.4.2/5.4/mingw491_32/bin/Qt5Widgets.dll /c/release
cp /c/Qt/Qt5.4.2/5.4/mingw491_32/bin/Qt5Multimedia.dll /c/release
cp /c/Qt/Qt5.4.2/5.4/mingw491_32/bin/libgcc_s_dw2-1.dll /c/release
cp /c/Qt/Qt5.4.2/5.4/mingw491_32/bin/libstdc++-6.dll /c/release
cp /c/Qt/Qt5.4.2/5.4/mingw491_32/bin/libwinpthread-1.dll /c/release
cp /c/mingw32/lib/libyajl.dll /c/release
cp /c/mingw32/lib/lua51.dll /c/release
cp /c/mingw32/bin/libzip-2.dll /c/release
cp /c/mingw32/bin/libhunspell-1.3-0.dll /c/release
cp /c/mingw32/bin/libpcre-1.dll /c/release
cp /c/mingw32/bin/libsqlite3-0.dll /c/release
cp /c/mingw32/bin/zlib1.dll /c/release
audio
mediaservice
platforms
From the Mudlet src directory, copy the mudlet-lua folder and en_US.dic into the release directory
8) LUA
Luarocks:
Download and extract:
http://keplerproject.github.io/luarocks ... -win32.zip
From the directory extracted to,
install.bat /P c:\LuaRocks /MW
Edit \LuaRocks\lua\luarocks\cfg.lua changing mingw32-gcc to gcc (2 occurances)
Code: Select all
cd \LuaRocks
luarocks install LuaFileSystem
luarocks install LuaSQL-SQLite3 SQLITE_INCDIR="c:\mingw32\include" SQLITE_LIBDIR="c:\mingw32\lib"
luarocks install lrexlib-pcre PCRE_LIBDIR="c:\mingw32\lib" PCRE_INCDIR="c:\mingw32\include"
Download and extract LuaZip:
https://github.com/rjpcomputing/luazip/ ... master.zip
Code: Select all
gcc -O2 -c -o src/luazip.o -IC:/mingw32/include/ src/luazip.c
gcc -shared -o zip.dll src/luazip.o -Lc:\mingw32\lib -lzzip -lz c:/mingw32/lib/lua51.dll -lm
cp zip.dll /c/release
lfs.dll
<dir> luasql
rex_pcre.dll
Errors from use of Qt 5.5+
From a bit of research, gluPerspective was removed from GLU (the OpenGL helper library) at version 3.1 - Is linux perhaps linking against an older nonqt opengl library because of functions that were removed? In appears there was a major change to the way Qt supported opengl on windows from 5.5+, the last version i'm likely to be able to compile with without locating external libraries or other changes is 5.4.2
You need to specify an opengl version with Qt5.5+. I added -lopengl32 to LIBS+. There's still link errors, but not pages of them.
./release/glwidget.o:glwidget.cpp:(.text+0x22d): undefined reference to `gluOrtho2D@32'
./release/glwidget.o:glwidget.cpp:(.text+0x283): undefined reference to `gluPerspective@32'
./release/glwidget.o:glwidget.cpp:(.text+0x812): undefined reference to `gluPickMatrix@36'
./release/glwidget.o:glwidget.cpp:(.text+0x864): undefined reference to `gluPerspective@32'
./release/glwidget.o:glwidget.cpp:(.text+0x9b2): undefined reference to `gluPerspective@32'
./release/glwidget.o:glwidget.cpp:(.text+0x1f2f): undefined reference to `gluLookAt@72'
./release/glwidget.o:glwidget.cpp:(.text+0x2817): undefined reference to `gluLookAt@72'
./release/glwidget.o:glwidget.cpp:(.text+0x2ff4): undefined reference to `gluLookAt@72'
./release/glwidget.o:glwidget.cpp:(.text+0x3980): undefined reference to `gluLookAt@72'
./release/glwidget.o:glwidget.cpp:(.text+0x4d13): undefined reference to `gluLookAt@72'