1
Help / Re: wxSmith has a blackout!
« Last post by Danois on Yesterday at 07:26:49 pm »Thank you for your suggestion. I spun up a VM with a clean instance of Kubuntu 26.04 (I assume the following works for any *buntu), and this is what worked:
There are a couple of things, though.. Whilst running "configure .." i got an error that seemed to be related to a missing library (zlib), but after a lot of investigation I found out that the macro "PKG_CHECK_MODULES( .. )" was unavailable because the package "pkg-config" was not installed. I would suggest to either check for the presence of this package during bootstrap:
The portability of this approach is unknown, though.. You could also use AC_CHECK_LIB in configure.ac instead:
Which is portable.
During the first launch of C::B, i created a new wxWidgets project and landed on wxSmith which took up all the space of the main window and from there I had to go to the View menu and show the "Manager" before I could find the headers / sources. If you are not familiar with C::B, that is not very intuitive and I would suggest that the Manager showing the "Projects" tab is always displayed when C::B is launched for the first time.
Code
#!/bin/bash
set -e
# Required packages
sudo apt update
sudo apt install -y build-essential libtool pkg-config libglib2.0-dev libgtk-3-dev libwxgtk3.2-dev subversion
# Get the source
cd "$(xdg-user-dir DOCUMENTS)"
svn checkout svn://svn.code.sf.net/p/codeblocks/code/trunk codeblocks-code
cd codeblocks-code
# Build & install
./bootstrap
./configure --with-contrib-plugins=all,-NassiShneiderman --prefix=/opt/codeblocks
make -j $(nproc)
sudo make install
# Desktop integration
mkdir -p ~/.local/share/applications
cat /opt/codeblocks/share/applications/codeblocks.desktop | \
sed 's/^Exec=.*/Exec=\/opt\/codeblocks\/bin\/codeblocks \%F/' | \
sed 's/^Icon=.*/Icon=application-x-codeblocks/' > ~/.local/share/applications/codeblocks.desktop
mkdir -p ~/.local/share/icons/hicolor/48x48/mimetypes
ln -s /opt/codeblocks/share/icons/hicolor/48x48/mimetypes/* ~/.local/share/icons/hicolor/48x48/mimetypes/
There are a couple of things, though.. Whilst running "configure .." i got an error that seemed to be related to a missing library (zlib), but after a lot of investigation I found out that the macro "PKG_CHECK_MODULES( .. )" was unavailable because the package "pkg-config" was not installed. I would suggest to either check for the presence of this package during bootstrap:
Code
# Test if pkg-config/pkgconf exists or else PKG_CHECK_MODULES(..) is not generated
if test -z "`pkg-config --version`" && test -z "`pkgconf --version`"; then
echo "pkg-config or pkgconf is required. Aborting build..."
exit 1
fi
The portability of this approach is unknown, though.. You could also use AC_CHECK_LIB in configure.ac instead:
Code
AC_CHECK_LIB([z], [compress2], [], [AC_MSG_ERROR([ZLib (libz) was not found!])])Which is portable.
During the first launch of C::B, i created a new wxWidgets project and landed on wxSmith which took up all the space of the main window and from there I had to go to the View menu and show the "Manager" before I could find the headers / sources. If you are not familiar with C::B, that is not very intuitive and I would suggest that the Manager showing the "Projects" tab is always displayed when C::B is launched for the first time.
Recent Posts