Skip to content

Commit

Permalink
misc minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Oct 21, 2023
1 parent 921bdfd commit fe8302e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 49 deletions.
33 changes: 2 additions & 31 deletions src/app/GUI/aboutwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

#include "aboutwidget.h"
#include "appsupport.h"
#include "hardwareinfo.h"

#include <QHBoxLayout>
#include <QVBoxLayout>
Expand All @@ -44,44 +43,16 @@ AboutWidget::AboutWidget(QWidget *parent)

mTopLabel->setText(QString::fromUtf8("<div style=\"margin: 0; padding: 0; text-align: center; font-weight: normal;\">"
"<img src=\":/icons/hicolor/%2x%2/apps/%4.png\" width=\"%2\" height=\"%2\">"
"<h1 style=\"font-weight: normal; margin-top: 0; padding-top: 0;\">%3<br><span style=\"font-size: x-large;\">%1</span></h1>"
"<h1 style=\"font-weight: normal; margin-top: 0; padding-top: 0;\">%3<br><span style=\"font-size: large;\">%1</span></h1>"
"</div>")
.arg(AppSupport::getAppVersion(true),
QString::number(96),
AppSupport::getAppDisplayName(),
AppSupport::getAppName()));

const auto mHwLabel = new QLabel(this);
mHwLabel->setText(QString::fromUtf8("<style>"
"table { width: 100%; }"
".center {"
"text-align: center;"
"padding-left: .5em;"
"padding-right: .5em;"
"}"
".right { text-align: right; }"
".bold { font-weight: bold; }"
"</style>"
"<table><tr>"
"<td class=\"bold\">OpenGL</td>"
"<td class=\"bold center\">:</td>"
"<td class=\"right\">%3</td>"
"</tr><tr>"
"<td class=\"bold\">Threads</td>"
"<td class=\"bold center\">:</td>"
"<td class=\"right\">%1 available</td>"
"</tr><tr>"
"<td class=\"bold\">Memory</td>"
"<td class=\"bold center\">:</td>"
"<td class=\"right\">%2 MB total</td>"
"</tr></table>")
.arg(HardwareInfo::sCpuThreads())
.arg(intMB(HardwareInfo::sRamKB()).fValue)
.arg(HardwareInfo::sGpuRendererString()));

mTopLayout->addStretch();
mTopLayout->addWidget(mTopLabel);
mTopLayout->addStretch();
mTopLayout->addWidget(mHwLabel);

mLayout->addWidget(mTopWidget);

Expand Down
2 changes: 1 addition & 1 deletion src/app/GUI/welcomedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ WelcomeDialog::WelcomeDialog(QMenu *recentMenu,
logoLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
logoLabel->setText(QString::fromUtf8("<div style=\"margin: 0; padding: 0; text-align: center; font-weight: normal;\">"
"<p style=\"margin: 0; padding: 0;\"><img src=\":/icons/hicolor/%2x%2/apps/%4.png\" width=\"%2\" height=\"%2\"></p>"
"<h1 style=\"font-weight: normal; margin-top: 0; padding-top: 0;\">%3<br><span style=\"font-size: x-large;\">%1</span></h1>"
"<h1 style=\"font-weight: normal; margin-top: 0; padding-top: 0;\">%3<br><span style=\"font-size: large;\">%1</span></h1>"
"</div>")
.arg(AppSupport::getAppVersion(false),
QString::number(logoSize),
Expand Down
16 changes: 4 additions & 12 deletions src/cmake/friction-version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,9 @@ set(PROJECT_VERSION_PATCH 5)
set(PROJECT_VERSION_TWEAK 0)
set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})

option(SNAPSHOT "Snapshot build" OFF)
set(SNAPSHOT_VERSION_MAJOR "" CACHE STRING "Snapshot major version")
set(SNAPSHOT_VERSION_MINOR "" CACHE STRING "Snapshot minor version")
set(SNAPSHOT_VERSION_PATCH "" CACHE STRING "Snapshot patch version")
if(${SNAPSHOT})
set(PROJECT_VERSION_MAJOR ${SNAPSHOT_VERSION_MAJOR})
set(PROJECT_VERSION_MINOR ${SNAPSHOT_VERSION_MINOR})
set(PROJECT_VERSION_PATCH ${SNAPSHOT_VERSION_PATCH})
set(PROJECT_VERSION ${SNAPSHOT_VERSION_MAJOR}.${SNAPSHOT_VERSION_MINOR}.${SNAPSHOT_VERSION_PATCH})
endif()

set(GIT_BRANCH "" CACHE STRING "Git branch")
set(GIT_TAG "" CACHE STRING "Git tag")
set(GIT_COMMIT "" CACHE STRING "Git commit")
option(FRICTION_OFFICIAL_RELEASE "" OFF)
if (${FRICTION_OFFICIAL_RELEASE})
add_definitions(-DPROJECT_OFFICIAL)
endif()
1 change: 0 additions & 1 deletion src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ message("-- skia libraries: ${SKIA_LIBRARIES}")
add_definitions(-DPROJECT_VERSION="${PROJECT_VERSION}")
add_definitions(-DPROJECT_GIT="${GIT_COMMIT}")
add_definitions(-DPROJECT_BRANCH="${GIT_BRANCH}")
add_definitions(-DPROJECT_TAG="${GIT_TAG}")

add_definitions(-DCORE_LIBRARY)

Expand Down
3 changes: 3 additions & 0 deletions src/core/appsupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ const QString AppSupport::getAppVersion(bool html)
QString version = QString::fromUtf8("0.9.5"); // fallback, should not happen
#ifdef PROJECT_VERSION
version = QString::fromUtf8(PROJECT_VERSION);
#endif
#ifndef PROJECT_OFFICIAL
version.append("-dev");
#endif
QString git;
#ifdef PROJECT_GIT
Expand Down
12 changes: 8 additions & 4 deletions src/scripts/build_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

# Friction CI (Ubuntu)
# Friction CI (Ubuntu 22.04)

set -e -x

Expand Down Expand Up @@ -80,6 +80,10 @@ MKJOBS=${MKJOBS:-4}
COMMIT=`git rev-parse --short HEAD`
BRANCH=`git rev-parse --abbrev-ref HEAD`

if [ "${BRANCH}" = "main" ]; then
BRANCH=""
fi

if [ ! -f "${CWD}/src/gperftools/.libs/libtcmalloc.a" ]; then
cd ${CWD}/src/gperftools
./autogen.sh
Expand All @@ -97,9 +101,9 @@ if [ ! -f "${CWD}/src/skia/out/build/libskia.a" ]; then
fi

cd ${CWD}
rm -rf build || true
mkdir build
cd build
rm -rf build-ci || true
mkdir build-ci
cd build-ci

cmake -G Ninja \
-DUSE_SKIA_SYSTEM_LIBS=ON \
Expand Down

0 comments on commit fe8302e

Please sign in to comment.