Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
Takin
mag-core
Commits
b47afb18
Commit
b47afb18
authored
Feb 02, 2020
by
Tobias WEBER
Browse files
created mingw install script
parent
8d74793a
Changes
4
Hide whitespace changes
Inline
Side-by-side
install_scripts/install_mingw.sh
0 → 100755
View file @
b47afb18
#!/bin/bash
#
# installs mingw files
# @author Tobias Weber <tweber@ill.fr>
# @date 2-feb-2020
# @license GPLv3
#
# directories
MINGW_DIR
=
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/
MINGW_LIB_DIR
=
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/
INSTALL_DIR
=
~/.wine/drive_c/takin2tools
# binaries
mkdir
-vp
${
INSTALL_DIR
}
cp
-v
tools/moldyn/build/moldyn.exe
${
INSTALL_DIR
}
/
cp
-v
tools/pol/build/pol.exe
${
INSTALL_DIR
}
/
cp
-v
tools/structfact/build/structfact.exe
${
INSTALL_DIR
}
/
cp
-v
tools/magstructfact/build/magstructfact.exe
${
INSTALL_DIR
}
/
cp
-v
tools/cif2xml/build/
*
.exe
${
INSTALL_DIR
}
/
# libraries
MINGW_LIBS
=
"Qt5Core.dll Qt5Gui.dll Qt5Widgets.dll
\
libstdc++-6.dll libglib-2.0-0.dll libgcc_s_seh-1.dll libwinpthread-1.dll
\
libintl-8.dll iconv.dll libpcre2-16-0.dll libpcre-1.dll
\
zlib1.dll libbz2-1.dll libpng16-16.dll
\
libharfbuzz-0.dll libfreetype-6.dll"
for
FILE
in
${
MINGW_LIBS
}
;
do
cp
-v
${
MINGW_DIR
}
/
${
FILE
}
${
INSTALL_DIR
}
/
done
# qt libraries
mkdir
-vp
${
INSTALL_DIR
}
/qtplugins/platforms/
cp
-v
${
MINGW_LIB_DIR
}
/qt5/plugins/platforms/
*
.dll
${
INSTALL_DIR
}
/qtplugins/platforms/
# access rights
find
${
INSTALL_DIR
}
-name
"*.dll"
-exec
chmod
a-x
{}
\;
-print
find
${
INSTALL_DIR
}
-name
"*.exe"
-exec
chmod
a+x
{}
\;
-print
# strip
find
${
INSTALL_DIR
}
\(
-name
"*.exe"
-o
-name
"*.dll"
\)
-exec
strip
-v
{}
\;
-print
tools/magstructfact/magstructfact.cpp
View file @
b47afb18
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include
"magstructfact.h"
#include
"magstructfact.h"
#include
<QtCore/QDir>
#include
<QtWidgets/QApplication>
#include
<QtWidgets/QApplication>
#include
<QtWidgets/QGridLayout>
#include
<QtWidgets/QGridLayout>
#include
<QtWidgets/QHeaderView>
#include
<QtWidgets/QHeaderView>
...
@@ -2183,6 +2184,7 @@ int main(int argc, char** argv)
...
@@ -2183,6 +2184,7 @@ int main(int argc, char** argv)
set_gl_format
(
1
,
_GL_MAJ_VER
,
_GL_MIN_VER
,
8
);
set_gl_format
(
1
,
_GL_MAJ_VER
,
_GL_MIN_VER
,
8
);
tl2
::
set_locales
();
tl2
::
set_locales
();
QApplication
::
addLibraryPath
(
QString
(
"."
)
+
QDir
::
separator
()
+
"qtplugins"
);
auto
app
=
std
::
make_unique
<
QApplication
>
(
argc
,
argv
);
auto
app
=
std
::
make_unique
<
QApplication
>
(
argc
,
argv
);
auto
dlg
=
std
::
make_unique
<
MagStructFactDlg
>
(
nullptr
);
auto
dlg
=
std
::
make_unique
<
MagStructFactDlg
>
(
nullptr
);
dlg
->
show
();
dlg
->
show
();
...
...
tools/pol/pol.cpp
View file @
b47afb18
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
*/
*/
#include
<QtCore/QSettings>
#include
<QtCore/QSettings>
#include
<QtCore/QDir>
#include
<QtWidgets/QApplication>
#include
<QtWidgets/QApplication>
#include
<QtWidgets/QGridLayout>
#include
<QtWidgets/QGridLayout>
#include
<QtWidgets/QLabel>
#include
<QtWidgets/QLabel>
...
@@ -525,8 +526,8 @@ int main(int argc, char** argv)
...
@@ -525,8 +526,8 @@ int main(int argc, char** argv)
set_gl_format
(
1
,
_GL_MAJ_VER
,
_GL_MIN_VER
,
8
);
set_gl_format
(
1
,
_GL_MAJ_VER
,
_GL_MIN_VER
,
8
);
tl2
::
set_locales
();
tl2
::
set_locales
();
QApplication
::
addLibraryPath
(
QString
(
"."
)
+
QDir
::
separator
()
+
"qtplugins"
);
auto
app
=
std
::
make_unique
<
QApplication
>
(
argc
,
argv
);
auto
app
=
std
::
make_unique
<
QApplication
>
(
argc
,
argv
);
auto
dlg
=
std
::
make_unique
<
PolDlg
>
(
nullptr
);
auto
dlg
=
std
::
make_unique
<
PolDlg
>
(
nullptr
);
dlg
->
show
();
dlg
->
show
();
...
...
tools/structfact/structfact.cpp
View file @
b47afb18
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include
"structfact.h"
#include
"structfact.h"
#include
<QtCore/QDir>
#include
<QtWidgets/QApplication>
#include
<QtWidgets/QApplication>
#include
<QtWidgets/QGridLayout>
#include
<QtWidgets/QGridLayout>
#include
<QtWidgets/QHeaderView>
#include
<QtWidgets/QHeaderView>
...
@@ -1491,6 +1492,7 @@ int main(int argc, char** argv)
...
@@ -1491,6 +1492,7 @@ int main(int argc, char** argv)
set_gl_format
(
1
,
_GL_MAJ_VER
,
_GL_MIN_VER
,
8
);
set_gl_format
(
1
,
_GL_MAJ_VER
,
_GL_MIN_VER
,
8
);
tl2
::
set_locales
();
tl2
::
set_locales
();
QApplication
::
addLibraryPath
(
QString
(
"."
)
+
QDir
::
separator
()
+
"qtplugins"
);
auto
app
=
std
::
make_unique
<
QApplication
>
(
argc
,
argv
);
auto
app
=
std
::
make_unique
<
QApplication
>
(
argc
,
argv
);
auto
dlg
=
std
::
make_unique
<
StructFactDlg
>
(
nullptr
);
auto
dlg
=
std
::
make_unique
<
StructFactDlg
>
(
nullptr
);
dlg
->
show
();
dlg
->
show
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment