- Download OpenSUSE 12.2 32bit: http://software.opensuse.org/122/en
- Install it
In the YaST Control Center, click Software Repositories. Click Add and then Specify URL. Do that for the following:
Name: png2ico URL: http://download.opensuse.org/repositories/windows:/mingw/openSUSE_12.2/
Name: MinGW URL: http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/
Name: ownCloud MinGW libraries URL: http://download.opensuse.org/repositories/isv:/ownCloud:/devel:/mingw:/win32/openSUSE_12.2/
Name: Custom NSIS URL: http://pmbs.links2linux.org/download/mingw%3A/32/openSUSE_12.1/
You will be prompted to trust their GPG keys.
Open the YaST Control Center and click Software Management
Search for "git". Put a check next to:
- git
Search for "png2ico". Put a check next to:
- kdewin-png2ico
Search for "iniparser". Put a check next to:
- libiniparser-devel
- libiniparser0 (If not auto-checked)
- mingw32-iniparser
- mingw32-iniparser-devel
Search for "dlfcn". Put a check next to:
- mingw32-dlfcn
- mingw32-dlfcn-devel
Search for "neon". Put a check next to:
- libneon27 (If not already installed)
- libneon-devel
- mingw32-libneon
- mingw32-libneon-devel
Search for "sqlite3". Put a check next to:
- libsqlite3-0 (If not already installed)
Search for "libqt4". Put a check next to:
- libqt4 (If not already installed)
- libqt4-devel
- mingw32-libqt4
- mingw32-libqt4-devel
Search for "log4c". Put a check next to:
- liblog4c-devel
- liblog4c3 (If not auto-checked)
Search for "cmake". Put a check next to:
- cmake
Search for "mingw32-cross". Put a check next to:
- mingw32-cross-gcc
- mingw32-cross-gcc-c++
- mingw32-cross-nsis
For these two, click the Versions
tab and mark the radio button next to "0-3.1-i586 from Custom NSIS..."
- mingw32-cross-nsis-plugin-uac
- mingw32-cross-nsis-plugin-processes
Search for "mingw32-sqlite". Put a check next to:
- mingw32-sqlite
- mingw32-libsqlite-devel
Search for "mingw32-lib". Put a check next to:
- mingw32-libjpeg-devel
- mingw32-libpng-devel
- mingw32-libtiff-devel
Search for "mingw32-qtkeychain". Put a check next to:
- mingw32-qtkeychain
- mingw32-qtkeychain-devel
Search for "openssl". Put a check next to:
- mingw32-openssl
Click Accept to install it all. It will prompt about other things it has to install as well, accept that too.
In the desktop area, right click and create a new folder named owncloud-dev
Open a terminal and execute:
cd ~/Desktop/owncloud-dev
git clone git://git.csync.org/users/freitag/csync.git
cd csync
git checkout dav
Build it:
cd ..
mkdir buildcsync
cd buildcsync
cmake -DCMAKE_BUILD_TYPE="Debug" -DLOG_TO_CALLBACK=ON ../csync
make
cd ..
git clone git://github.com/owncloud/mirall.git
Go back to the owncloud-dev
folder and execute:
mkdir buildmirall
cd buildmirall
cmake -DCMAKE_BUILD_TYPE="Debug" ../mirall \
-DCSYNC_LIBRARY_PATH=~/Desktop/owncloud-dev/buildcsync \
../mirall
make
The executables will be in the bin
directory.
In the owncloud-dev
folder, make a directory named win
.
First we need to build csync and generate Windows libraries.
cd win
mkdir buildcsync
cd buildcsync
mingw32-cmake -DCMAKE_BUILD_TYPE="Debug" -DWITH_LOG4C=OFF -DLOG_TO_CALLBACK=ON ../../csync
mingw32-make
Now we can build the ownCloud client:
cd ..
mkdir buildmirall
cd buildmirall
Make a file called docmake.sh
with the following in it:
export QT_BINDIR=/usr/bin
export BIN_PRE=i686-w64-mingw32
/usr/bin/mingw32-cmake \
-DCMAKE_BUILD_TYPE="Debug" \
-DQMAKESPEC=win32-g++-cross \
-DQT_MKSPECS_DIR:PATH=/usr/i686-w64-mingw32/sys-root/mingw/share/qt4/mkspecs \
-DQT_INCLUDE_DIR=/usr/i686-w64-mingw32/sys-root/mingw/include \
-DQT_PLUGINS_DIR=/usr/i686-w64-mingw32/sys-root/mingw/lib/qt4/plugins \
-DQT_QMAKE_EXECUTABLE=${QT_BINDIR}/${BIN_PRE}-qmake \
-DQT_MOC_EXECUTABLE=${QT_BINDIR}/${BIN_PRE}-moc \
-DQT_RCC_EXECUTABLE=${QT_BINDIR}/${BIN_PRE}-rcc \
-DQT_UIC_EXECUTABLE=${QT_BINDIR}/${BIN_PRE}-uic \
-DQT_DBUSXML2CPP_EXECUTABLE=${QT_BINDIR}/qdbusxml2cpp \
-DQT_DBUSCPP2XML_EXECUTABLE=${QT_BINDIR}/qdbuscpp2xml \
-DQT_LRELEASE_EXECUTABLE=${QT_BINDIR}/${BIN_PRE}-lrelease \
-DWINDRES_EXECUTABLE=/usr/bin/${BIN_PRE}-windres \
-DCSYNC_LIBRARY_PATH=/home/administrator/Desktop/owncloud-dev/win/buildcsync \
../../mirall
NOTE: The DCSYNC_LIBRARY_PATH
parameter at the end needs to be updated to the absolute path to your win/buildcsync
directory.
chmod +x docmake.sh
./docmake.sh
mingw32-make
You can also generate a NSIS setup package:
sudo mingw32-make package
It seems to copy some files over to /usr/... for some reason and needs root privileges for that.
I'm trying to figure out why elevation is failing when running the setup exe for Windows 7.
I've followed the steps you've given (which were very helpful, thank you!). I can cross-compile and package the client successfully for Windows. However, when I try and execute on my Win 7 machine, I get a message saying "Unable to elevate, error". Any ideas why this is failing?