Skip to content

Commit

Permalink
qtcreator: Update to qtc 14.0.2 and strip down the IDE.
Browse files Browse the repository at this point in the history
  • Loading branch information
kwagyeman committed Oct 4, 2024
1 parent 3004ebc commit 1fa75b3
Show file tree
Hide file tree
Showing 12 changed files with 477 additions and 234 deletions.
6 changes: 5 additions & 1 deletion bin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
if (NOT APPLE)
install(PROGRAMS qtcreator.sh DESTINATION bin)
# OPENMV-DIFF #
# install(PROGRAMS qtcreator.sh DESTINATION bin)
# OPENMV-DIFF #
install(PROGRAMS openmvide.sh DESTINATION bin)
# OPENMV-DIFF #
endif()
45 changes: 45 additions & 0 deletions bin/openmvide.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#! /bin/sh

# Use this script if you add paths to LD_LIBRARY_PATH
# that contain libraries that conflict with the
# libraries that OpenMV IDE depends on.

makeAbsolute() {
case $1 in
/*)
# already absolute, return it
echo "$1"
;;
*)
# relative, prepend $2 made absolute
echo `makeAbsolute "$2" "$PWD"`/"$1" | sed 's,/\.$,,'
;;
esac
}

me=`which "$0"` # Search $PATH if necessary
if test -L "$me"; then
# Try GNU readlink(1)
nme=`readlink -nf "$me" 2>/dev/null`
if test -n "$nme"; then
me=$nme
else
# No GNU readlink(1), so let's try ls -l
base=`dirname "$me"`
me=`ls -l "$me" | sed 's/^.*-> //'`
me=`makeAbsolute "$me" "$base"`
fi
fi

bindir=`dirname "$me"`
libdir=`cd "$bindir/../lib" ; pwd`
# Add path to deployed Qt libraries in package
qtlibdir=$libdir/Qt/lib
if test -d "$qtlibdir"; then
qtlibpath=:$qtlibdir
fi
# Add OpenMV IDE library path
_ORIGINAL_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$libdir:$libdir/qtcreator$qtlibpath${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
exec "$bindir/openmvide" -user-library-path "$_ORIGINAL_LD_LIBRARY_PATH" ${1+"$@"}
18 changes: 18 additions & 0 deletions cmake/QtCreatorIDEBranding.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
set(IDE_VERSION "14.0.2") # The IDE version.
set(IDE_VERSION_COMPAT "14.0.0") # The IDE Compatibility version.
set(IDE_VERSION_DISPLAY "14.0.2") # The IDE display version.
# OPENMV-DIFF #
set(IDE_AUTHOR "The Qt Company Ltd")
set(IDE_COPYRIGHT_YEAR_FOUNDED "2008")
# OPENMV-DIFF #
set(IDE_COPYRIGHT_YEAR "2024") # The IDE current copyright year.

set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation.
Expand All @@ -19,3 +23,17 @@ set(IDE_ICON_PATH "")
# Absolute, or relative to <qtcreator>/src/app
# Should contain images/logo/(16|24|32|48|64|128|256|512)/QtProject-qtcreator.png
set(IDE_LOGO_PATH "")

# OPENMV-DIFF #
set(IDE_VERSION "4.3.0")
set(IDE_VERSION_COMPAT "${IDE_VERSION}")
set(IDE_VERSION_DISPLAY "${IDE_VERSION}")
set(IDE_AUTHOR "OpenMV LLC")
set(IDE_COPYRIGHT_YEAR_FOUNDED "2013")
set(IDE_COPYRIGHT_YEAR "2024")
set(IDE_SETTINGSVARIANT "OpenMV")
set(IDE_DISPLAY_NAME "OpenMV IDE")
set(IDE_ID "openmvide")
set(IDE_CASED_ID "OpenMVIDE")
set(IDE_BUNDLE_IDENTIFIER "io.openmv.${IDE_ID}")
# OPENMV-DIFF #
121 changes: 68 additions & 53 deletions share/qtcreator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,62 +1,77 @@
set(resource_directories
android
cplusplus
glsl
indexer_preincludes
jsonschemas
# OPENMV-DIFF #
# android
# cplusplus
# glsl
# indexer_preincludes
# jsonschemas
# OPENMV-DIFF #
lua-plugins
modeleditor
qmldesigner
qmlicons
qml-type-descriptions
schemes
snippets
styles
templates
themes
# OPENMV-DIFF #
# modeleditor
# qmldesigner
# qmlicons
# qml-type-descriptions
# schemes
# snippets
# styles
# templates
# themes
# OPENMV-DIFF #
)

set(resource_files
debugger/.pylintrc
debugger/boosttypes.py
debugger/cdbbridge.py
debugger/cdbext.pyi
debugger/creatortypes.py
debugger/dumper.py
debugger/gdbbridge.py
debugger/gdbtracepoint.py
debugger/LICENSE.GPL3-EXCEPT
debugger/lldbbridge.py
debugger/misctypes.py
debugger/opencvtypes.py
debugger/pdbbridge.py
debugger/personaltypes.py
debugger/qttypes.py
debugger/README.txt
debugger/setup.cfg
debugger/android_stdtypes.py
debugger/libcpp_stdtypes.py
debugger/stdtypes.py
debugger/utils.py
debugger/loadorder.txt
# OPENMV-DIFF #
# debugger/.pylintrc
# debugger/boosttypes.py
# debugger/cdbbridge.py
# debugger/cdbext.pyi
# debugger/creatortypes.py
# debugger/dumper.py
# debugger/gdbbridge.py
# debugger/gdbtracepoint.py
# debugger/LICENSE.GPL3-EXCEPT
# debugger/lldbbridge.py
# debugger/misctypes.py
# debugger/opencvtypes.py
# debugger/pdbbridge.py
# debugger/personaltypes.py
# debugger/qttypes.py
# debugger/README.txt
# debugger/setup.cfg
# debugger/android_stdtypes.py
# debugger/libcpp_stdtypes.py
# debugger/stdtypes.py
# debugger/utils.py
# debugger/loadorder.txt
# OPENMV-DIFF #

debugger-with-python2/qttypes.py
debugger-with-python2/personaltypes.py
debugger-with-python2/android_stdtypes.py
debugger-with-python2/README.txt
debugger-with-python2/gdbbridge.py
debugger-with-python2/cdbbridge.py
debugger-with-python2/lldbbridge.py
debugger-with-python2/misctypes.py
debugger-with-python2/opencvtypes.py
debugger-with-python2/libcpp_stdtypes.py
debugger-with-python2/creatortypes.py
debugger-with-python2/stdtypes.py
debugger-with-python2/gdbtracepoint.py
debugger-with-python2/utils.py
debugger-with-python2/boosttypes.py
debugger-with-python2/dumper.py
debugger-with-python2/pdbbridge.py
# OPENMV-DIFF #
# debugger-with-python2/qttypes.py
# debugger-with-python2/personaltypes.py
# debugger-with-python2/android_stdtypes.py
# debugger-with-python2/README.txt
# debugger-with-python2/gdbbridge.py
# debugger-with-python2/cdbbridge.py
# debugger-with-python2/lldbbridge.py
# debugger-with-python2/misctypes.py
# debugger-with-python2/opencvtypes.py
# debugger-with-python2/libcpp_stdtypes.py
# debugger-with-python2/creatortypes.py
# debugger-with-python2/stdtypes.py
# debugger-with-python2/gdbtracepoint.py
# debugger-with-python2/utils.py
# debugger-with-python2/boosttypes.py
# debugger-with-python2/dumper.py
# debugger-with-python2/pdbbridge.py
# OPENMV-DIFF #

# OPENMV-DIFF #
# styles/flat-dark.xml
# styles/flat-light.xml
themes/flat-dark.creatortheme
themes/flat-light.creatortheme
# OPENMV-DIFF #
)

# copy resource directories during build
Expand Down
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ add_subdirectory(share)
add_subdirectory(shared)
add_subdirectory(plugins)
add_subdirectory(app)
add_subdirectory(tools)
# OPENMV-DIFF #
# add_subdirectory(tools)
# OPENMV-DIFF #

install(
FILES
Expand Down
71 changes: 48 additions & 23 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ if (WIN32)
set(RC_APPLICATION_NAME "${IDE_DISPLAY_NAME}")
set(RC_VERSION "${IDE_VERSION}.0")
set(RC_VERSION_STRING "${IDE_VERSION_DISPLAY}")
set(RC_COPYRIGHT "2008-${IDE_COPYRIGHT_YEAR} The Qt Company Ltd")
# OPENMV-DIFF #
# set(RC_COPYRIGHT "2008-${IDE_COPYRIGHT_YEAR} The Qt Company Ltd")
# OPENMV-DIFF #
set(RC_COPYRIGHT "${IDE_COPYRIGHT_YEAR_FOUNDED}-${IDE_COPYRIGHT_YEAR} ${IDE_AUTHOR}")
# OPENMV-DIFF #

string(REPLACE " " "\\x20" RC_APPLICATION_NAME "${RC_APPLICATION_NAME}")
string(REPLACE " " "\\x20" RC_COPYRIGHT "${RC_COPYRIGHT}")
Expand All @@ -98,36 +102,53 @@ if (APPLE)
set(MACOSX_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()
set_target_properties(qtcreator PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/app-Info.plist"
)
# icon
add_custom_command(
OUTPUT qtcreator.icns qtcreator-project.icns
COMMAND
xcrun actool --app-icon qtcreator --output-partial-info-plist "${CMAKE_CURRENT_BINARY_DIR}/qtcreator.Info.plist"
--platform macosx --minimum-deployment-target 10.7 --compile "${CMAKE_CURRENT_BINARY_DIR}"
"${IDE_ICON_PATH}/qtcreator.xcassets"
> /dev/null
BYPRODUCTS qtcreator.Info.plist
VERBATIM
)
target_sources(qtcreator
PRIVATE
"${CMAKE_CURRENT_BINARY_DIR}/qtcreator.icns"
"${CMAKE_CURRENT_BINARY_DIR}/qtcreator-project.icns"
# OPENMV-DIFF #
# MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/app-Info.plist"
# OPENMV-DIFF #
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/openmvide-Info.plist"
# OPENMV-DIFF #
)
# OPENMV-DIFF #
# # icon
# add_custom_command(
# OUTPUT qtcreator.icns qtcreator-project.icns
# COMMAND
# xcrun actool --app-icon qtcreator --output-partial-info-plist "${CMAKE_CURRENT_BINARY_DIR}/qtcreator.Info.plist"
# --platform macosx --minimum-deployment-target 10.7 --compile "${CMAKE_CURRENT_BINARY_DIR}"
# "${IDE_ICON_PATH}/qtcreator.xcassets"
# > /dev/null
# BYPRODUCTS qtcreator.Info.plist
# VERBATIM
# )
# target_sources(qtcreator
# PRIVATE
# "${CMAKE_CURRENT_BINARY_DIR}/qtcreator.icns"
# "${CMAKE_CURRENT_BINARY_DIR}/qtcreator-project.icns"
# )
# qtc_copy_to_builddir(copy_icns
# DESTINATION ${IDE_DATA_PATH}
# FILES
# ${CMAKE_CURRENT_BINARY_DIR}/qtcreator.icns
# ${CMAKE_CURRENT_BINARY_DIR}/qtcreator-project.icns
# )
# install(
# FILES
# ${CMAKE_CURRENT_BINARY_DIR}/qtcreator.icns
# ${CMAKE_CURRENT_BINARY_DIR}/qtcreator-project.icns
# DESTINATION ${IDE_DATA_PATH}
# )
# OPENMV-DIFF #
qtc_copy_to_builddir(copy_icns
DESTINATION ${IDE_DATA_PATH}
FILES
${CMAKE_CURRENT_BINARY_DIR}/qtcreator.icns
${CMAKE_CURRENT_BINARY_DIR}/qtcreator-project.icns
${CMAKE_BINARY_DIR}/../openmv-media/icons/openmv-icon/openmv.icns
)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/qtcreator.icns
${CMAKE_CURRENT_BINARY_DIR}/qtcreator-project.icns
${CMAKE_BINARY_DIR}/../openmv-media/icons/openmv-icon/openmv.icns
DESTINATION ${IDE_DATA_PATH}
)
# OPENMV-DIFF #
endif()

option(QTC_FORCE_XCB "Enables that Qt Creator forces XCB on Linux if QT_QPA_PLATFORM is not set." OFF)
Expand Down Expand Up @@ -156,7 +177,11 @@ if ((NOT WIN32) AND (NOT APPLE))
# install logo
foreach(size 16 24 32 48 64 128 256 512)
install(
FILES ${IDE_LOGO_PATH}/images/logo/${size}/QtProject-qtcreator.png
# OPENMV-DIFF #
# FILES ${IDE_LOGO_PATH}/images/logo/${size}/QtProject-qtcreator.png
# OPENMV-DIFF #
FILES ${IDE_LOGO_PATH}/images/logo/${size}/OpenMV-openmvide.png
# OPENMV-DIFF #
DESTINATION share/icons/hicolor/${size}x${size}/apps
)
endforeach()
Expand Down
Loading

0 comments on commit 1fa75b3

Please sign in to comment.