full cross compile using clickable
This commit is contained in:
parent
bd24d6416d
commit
1f4c5c3ec5
7 changed files with 101 additions and 24 deletions
|
@ -80,7 +80,7 @@ Page {
|
|||
Label {
|
||||
width: parent.width
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: i18n.tr("Copyright (c) 2020 Morgan McMillian <<a href='mailto:thrrgilag@dreamfall.space'>thrrgilag@dreamfall.space</a>>")
|
||||
text: i18n.tr("Copyright (c) 2021 Morgan McMillian <<a href='mailto:thrrgilag@dreamfall.space'>thrrgilag@dreamfall.space</a>>")
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ Page {
|
|||
Label {
|
||||
width: parent.width
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: i18n.tr("Pantalaimon v0.7.0")
|
||||
text: i18n.tr("Pantalaimon v0.9.1")
|
||||
wrapMode: Text.WordWrap
|
||||
fontSize: "large"
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ Page {
|
|||
Label {
|
||||
width: parent.width
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: i18n.tr("Copyright (c) 2020 The Matrix.org Foundation CIC")
|
||||
text: i18n.tr("Copyright (c) 2021 The Matrix.org Foundation CIC")
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ execute_process(
|
|||
set(QT_IMPORTS_DIR "lib/${ARCH_TRIPLET}")
|
||||
|
||||
set(APP_NAME "Pantalaimon UT")
|
||||
set(APP_VERSION "0.4.0")
|
||||
set(APP_VERSION "0.5.0")
|
||||
set(PROJECT_NAME "pantalaimon")
|
||||
set(FULL_PROJECT_NAME "pantalaimon.thrrgilag")
|
||||
set(CMAKE_INSTALL_PREFIX /)
|
||||
|
@ -41,6 +41,7 @@ endif()
|
|||
|
||||
configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json)
|
||||
configure_file(AboutPage.qml.in ${CMAKE_CURRENT_BINARY_DIR}/AboutPage.qml)
|
||||
configure_file(pantalaimon.sh.in ${CMAKE_CURRENT_BINARY_DIR}/pantalaimon.sh)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(FILES ${PROJECT_NAME}.apparmor DESTINATION ${DATA_DIR})
|
||||
install(DIRECTORY assets DESTINATION ${DATA_DIR})
|
||||
|
@ -51,6 +52,11 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/AboutPage.qml DESTINATION ${DATA_DIR}q
|
|||
# TODO: example config file for local testing
|
||||
# install(FILES example.conf DESTINATION ${CMAKE_INSTALL_PREFIX} RENAME pantalaimon.conf)
|
||||
|
||||
file(GLOB_RECURSE OLM_SO_FILES "$ENV{OLM_LIB_INSTALL_DIR}/lib/libolm.so*")
|
||||
install(FILES ${OLM_SO_FILES} DESTINATION ${QT_IMPORTS_DIR})
|
||||
install(PROGRAMS build/${ARCH_TRIPLET}/pantalaimon/dist/pantalaimon DESTINATION ${CMAKE_INSTALL_PREFIX} RENAME pantalaimonexec)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pantalaimon.sh DESTINATION ${CMAKE_INSTALL_PREFIX} RENAME pantalaimon)
|
||||
|
||||
# Translations
|
||||
file(GLOB_RECURSE I18N_SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/po qml/*.qml qml/*.js)
|
||||
list(APPEND I18N_SRC_FILES ${DESKTOP_FILE_NAME}.in.h)
|
||||
|
@ -72,9 +78,6 @@ add_custom_target(${DESKTOP_FILE_NAME} ALL
|
|||
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE_NAME} DESTINATION ${DATA_DIR})
|
||||
|
||||
# TODO: figure out how to cross compile this
|
||||
install(PROGRAMS ${PROJECT_NAME}-${CLICK_ARCH} DESTINATION ${CMAKE_INSTALL_PREFIX} RENAME ${PROJECT_NAME})
|
||||
|
||||
add_subdirectory(po)
|
||||
|
||||
# Make source files visible in qtcreator
|
||||
|
|
30
README.md
30
README.md
|
@ -12,9 +12,9 @@ End-to-end encryption aware Matrix reverse proxy daemon for Ubuntu Touch.
|
|||
- [x] About page
|
||||
- [x] App icon
|
||||
- [x] Fix image fetching (fixed in fluffychat)
|
||||
- [x] Cross compile python+pantalaimon
|
||||
- [ ] Import/export keys
|
||||
- [ ] Ability to verify, ignore, or blacklist devices
|
||||
- [ ] Cross compile python+pantalaimon
|
||||
- [ ] Release on open-store.io
|
||||
|
||||
## Known Issues
|
||||
|
@ -22,19 +22,23 @@ End-to-end encryption aware Matrix reverse proxy daemon for Ubuntu Touch.
|
|||
* Previously encrypted messages cannot be decrypted
|
||||
* No user interaction to verify, ignore, or blacklist devices
|
||||
|
||||
## Build
|
||||
## Build for armhf
|
||||
|
||||
This project is not currently setup for cross building. A binary will need to
|
||||
be compiled on a device for each target architecture. Make sure there is
|
||||
enough space on the device to install the build tools and compile python, olm,
|
||||
and pantalaimon.
|
||||
```sh
|
||||
git clone https://git.sr.ht/~thrrgilag/pantalaimon-ut
|
||||
git submodule update --init
|
||||
clickable build-libs --arch armhf
|
||||
clickable --arch armhf
|
||||
```
|
||||
|
||||
* `git clone https://git.sr.ht/~thrrgilag/pantalaimon-ut`
|
||||
* push dev-build.sh to /home/phablet
|
||||
* run `dev-build.sh`
|
||||
* pull /home/phablet/pantalaimon-build/dist/pantalaimon
|
||||
* rename pantalaimon to pantalaimon-armhf (or pantalaimon-arm64)
|
||||
* run `clickable`
|
||||
## Build for arm64
|
||||
|
||||
```sh
|
||||
git clone https://git.sr.ht/~thrrgilag/pantalaimon-ut
|
||||
git submodule update --init
|
||||
clickable build-libs --arch arm64
|
||||
clickable --arch arm64
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
|
@ -48,6 +52,6 @@ Bugs can be filed at https://todo.sr.ht/~thrrgilag/pantalaimon-ut
|
|||
|
||||
## License
|
||||
|
||||
Copyright (C) 2020 Morgan McMillian
|
||||
Copyright (C) 2021 Morgan McMillian
|
||||
|
||||
Licensed under the Apache Software License 2.0
|
||||
|
|
45
build-python.sh
Executable file
45
build-python.sh
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/bash
|
||||
|
||||
PYTHON_VERSION="3.7.7"
|
||||
CRYPTOGRAPHY_VERSION="3.2.1"
|
||||
|
||||
echo "...building python..."
|
||||
cd ${BUILD_DIR}
|
||||
wget -qO- "https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz" | tar -xz
|
||||
|
||||
echo
|
||||
echo "...building python..."
|
||||
echo
|
||||
cd Python-${PYTHON_VERSION}
|
||||
./configure --prefix="${INSTALL_DIR}" --enable-shared
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
|
||||
export LD_LIBRARY_PATH=${INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
|
||||
|
||||
echo
|
||||
echo "...installing pyinstaller..."
|
||||
echo
|
||||
${INSTALL_DIR}/bin/pip3 install --upgrade pyinstaller
|
||||
|
||||
export CRYPTOGRAPHY_ALLOW_OPENSSL_102="yes"
|
||||
echo
|
||||
echo "...installing cryptography..."
|
||||
echo
|
||||
${INSTALL_DIR}/bin/pip3 install --upgrade cryptography==${CRYPTOGRAPHY_VERSION}
|
||||
|
||||
export LD_LIBRARY_PATH=${ROOT}/build/${ARCH_TRIPLET}/olm/install/lib/${ARCH_TRIPLET}:${LD_LIBRARY_PATH}
|
||||
export CFLAGS=-I${ROOT}/build/${ARCH_TRIPLET}/olm/install/include
|
||||
export LDFLAGS=-L${ROOT}/build/${ARCH_TRIPLET}/olm/install/lib/${ARCH_TRIPLET}
|
||||
echo
|
||||
echo "...installing pantalaimon..."
|
||||
echo
|
||||
${INSTALL_DIR}/bin/pip3 install --upgrade pantalaimon
|
||||
|
||||
export PATH=/usr/${ARCH_TRIPLET}/bin:${PATH}
|
||||
echo
|
||||
echo "...creating executable..."
|
||||
echo
|
||||
${INSTALL_DIR}/bin/pyinstaller --onefile ${INSTALL_DIR}/bin/pantalaimon
|
||||
|
|
@ -1,5 +1,24 @@
|
|||
{
|
||||
"clickable_minimum_required": "6.12.2",
|
||||
"builder": "cmake",
|
||||
"libraries": {
|
||||
"olm": {
|
||||
"builder": "cmake",
|
||||
"build_args": [ "-Bbuild",
|
||||
"-DOLM_TESTS=OFF",
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
],
|
||||
"prebuild": "git submodule update --init --recursive"
|
||||
},
|
||||
"pantalaimon": {
|
||||
"builder": "custom",
|
||||
"dependencies_target": [
|
||||
"libffi-dev",
|
||||
"libssl-dev",
|
||||
"libsqlite3-dev"
|
||||
],
|
||||
"build": "${ROOT}/build-python.sh"
|
||||
}
|
||||
},
|
||||
"kill": "qmlscene"
|
||||
}
|
||||
|
|
6
pantalaimon.sh.in
Executable file
6
pantalaimon.sh.in
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
INSTALL_DIR=`dirname $0`
|
||||
export LD_LIBRARY_PATH=$INSTALL_DIR/lib/${ARCH_TRIPLET}:$LD_LIBRARY_PATH
|
||||
$INSTALL_DIR/pantalaimonexec $@
|
||||
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: pantalaimon.thrrgilag\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-09-08 03:47+0000\n"
|
||||
"POT-Creation-Date: 2021-03-10 06:14+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -107,14 +107,14 @@ msgstr ""
|
|||
msgid "LogLevel"
|
||||
msgstr ""
|
||||
|
||||
#: ../qml/SettingsPage.qml:148
|
||||
#: ../qml/SettingsPage.qml:146
|
||||
msgid "Delete homeserver"
|
||||
msgstr ""
|
||||
|
||||
#: ../qml/SettingsPage.qml:166
|
||||
#: ../qml/SettingsPage.qml:164
|
||||
msgid "No homeservers"
|
||||
msgstr ""
|
||||
|
||||
#: ../qml/SettingsPage.qml:227
|
||||
#: ../qml/SettingsPage.qml:225
|
||||
msgid "Add Homeserver"
|
||||
msgstr ""
|
||||
|
|
Loading…
Reference in a new issue