This is my build script under Kubuntu 20.04
#!/bin/bash
#install build essentials for codeblocks with gtk2 and gtk3
sudo apt install cmake
sudo apt install build-essential
sudo apt install libgtk2.0-dev libhunspell-dev libgamin-dev
sudo apt install libwxgtk3.0-gtk3-dev
#path to wxWidgets configuration scripts
WX_CONFIG_DIR=/usr/local/lib/wx/config
#actual wxWidgets configuration to use
#to see alternatives use: find /usr/local/lib/wx/config/*
WX_CONFIG=gtk2-unicode-3.0
WX_CONFIG_FULLPATH="$WX_CONFIG_DIR/$WX_CONFIG"
#build and install paths
CB_DIR=/ssd1/codeblocks
CB_BUILD_PATH="$CB_DIR/$WX_CONFIG/build"
CB_INSTALL_PATH="$CB_DIR/$WX_CONFIG/install"
#create build area
mkdir -p "$CB_BUILD_PATH"
pushd "$CB_BUILD_PATH"
pwd
git clone https://github.com/obfuscated/codeblocks_sf
cd codeblocks_sf/
#configure, build & install using selected configuration
./bootstrap
./configure --with-contrib-plugins=all \
--with-wx-config="$WX_CONFIG_FULLPATH" \
--prefix="$CB_INSTALL_PATH"
make
make install
ls -l "$CB_INSTALL_PATH/bin"
popd
@cacb than you very much for the script. I used it instead of the WIKI doc as the WIKI was for WxWidget 2.8 and as such was way out of date. I used GTK3. I was able to build and run the SF 12529 trunk code.
I had to add a few more packages from the default xubuntu-20.04.2.0-desktop-amd64.iso install (on Virtualbox using a script) to get it to compile and remove the --with-wx-config="$WX_CONFIG_FULLPATH" ./configure option as the wxconfig was not in the directory specified, but was in the path.
My updated script is below:
#!/bin/bash
#---- install build essentials for codeblocks with gtk2 and gtk3 ----
sudo apt install -y git
sudo apt install -y cmake
sudo apt install -y build-essential
sudo apt install subversion
sudo apt install -y libhunspell-dev libgamin-dev
sudo apt-get install libboost-system-dev
#-------- install build packages for codeblocks with gtk2 --------
# GTK2 #sudo apt install -y libgtk2.0-dev
#-------- install build packages for codeblocks with gtk3 --------
sudo apt install -y libgtk-3-devmake
sudo apt install -y libwxgtk3.0-gtk3-0v5 libwxgtk3.0-gtk3-dev
# -----------------------------------------------------------------
#path to wxWidgets configuration scripts
WX_CONFIG_DIR=/usr/local/lib/wx/config
#actual wxWidgets configuration to use
#to see alternatives use: find /usr/local/lib/wx/config/*
WX_CONFIG=gtk3-unicode-3.0
WX_CONFIG_FULLPATH="$WX_CONFIG_DIR/$WX_CONFIG"
#build and install paths
CB_DIR=~/code/codeblocks
CB_BUILD_PATH="$CB_DIR/$WX_CONFIG/build"
CB_INSTALL_PATH="$CB_DIR/$WX_CONFIG/install"
#create build area
mkdir -p "$CB_BUILD_PATH"
pushd "$CB_BUILD_PATH"
pwd
#git clone https://github.com/obfuscated/codeblocks_sf codeblocks_git
#cd codeblocks_git
svn checkout https://svn.code.sf.net/p/codeblocks/code/trunk codeblocks_sf
cd codeblocks_sf
# -----------------------------------------------------------------
#configure, build & install using selected configuration
./bootstrap
./configure --with-contrib-plugins=all \
--prefix="$CB_INSTALL_PATH"
#./configure --with-contrib-plugins=all \
# --with-wx-config="$WX_CONFIG_FULLPATH" \
# --prefix="$CB_INSTALL_PATH"
make
make install
ls -l "$CB_INSTALL_PATH/bin"
popd
Below is the VirtualBox script I use to install the initial XUbuntu and then did an upgrade and ran the script. I hope this may save you time in the future if you need to use VB as it can be modified for Windows very easily as most of the lines are for configuring the Virtualbox common HDD, Network, Video, Sound and serial port settings.
@rem https://kifarunix.com/how-to-automate-virtual-machine-installation-on-virtualbox/
set VM_Name=XUbuntu-2004-CB
set UserName=UNAME
set UserPassword=UPASSWORD
set ISO_IMAGE="%CD%\xubuntu-20.04.2.0-desktop-amd64.iso"
@rem ==============================================================================
set VM_Directory=G:\VirtualBox
set VBoxManageExe="C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
@rem goto end
@rem goto OS_Install
@echo off
%VBoxManageExe% createvm --name %VM_Name% --ostype Ubuntu_64 --register --basefolder "%VM_Directory%"
%VBoxManageExe% createmedium --filename "%VM_Directory%\%VM_Name%\%VM_Name%.vdi" --format VDI --size 102200
%VBoxManageExe% storagectl %VM_Name% --name SATA --add SATA --controller IntelAhci
%VBoxManageExe% storageattach %VM_Name% --storagectl SATA --port 0 --device 0 --type hdd --medium "%VM_Directory%\%VM_Name%\%VM_Name%.vdi"
%VBoxManageExe% storagectl %VM_Name% --name IDE --add IDE --controller PIIX4
@rem %VBoxManageExe% storageattach %VM_Name% --storagectl IDE --port 0 --device 0 --type dvddrive --medium "none"
%VBoxManageExe% modifyvm %VM_Name% --clipboard-mode bidirectional --draganddrop bidirectional
%VBoxManageExe% modifyvm %VM_Name% --memory 8192 --vram 128
%VBoxManageExe% modifyvm %VM_Name% --graphicscontroller vmsvga --monitorcount 2 --accelerate3d on
%VBoxManageExe% modifyvm %VM_Name% --ioapic on
%VBoxManageExe% modifyvm %VM_Name% --boot1 dvd --boot2 disk --boot3 none --boot4 none
%VBoxManageExe% modifyvm %VM_Name% --cpus 4
%VBoxManageExe% modifyvm %VM_Name% --audio dsound --audiocontroller hda --audioin off --audioout on
%VBoxManageExe% modifyvm %VM_Name% --usb off
%VBoxManageExe% modifyvm %VM_Name% --usbohci off
%VBoxManageExe% modifyvm %VM_Name% --usbehci off
%VBoxManageExe% modifyvm %VM_Name% --usbxhci off
%VBoxManageExe% modifyvm %VM_Name% --nic1 nat --nictype1 82540EM --cableconnected1 on --natpf1 ["EGM Simulator"],tcp,[0.0.0.0],3321,[0.0.0.0],3321
%VBoxManageExe% modifyvm %VM_Name% --nic2 none
%VBoxManageExe% modifyvm %VM_Name% --nic3 none
%VBoxManageExe% modifyvm %VM_Name% --nic4 none
%VBoxManageExe% modifyvm %VM_Name% --uart1 0x3f8 4 --uartmode1 COM1
%VBoxManageExe% modifyvm %VM_Name% --uart2 off
%VBoxManageExe% modifyvm %VM_Name% --uart3 0x3e8 4 --uartmode3 COM3
%VBoxManageExe% modifyvm %VM_Name% --uart4 0x2e8 3 --uartmode4 COM4
%VBoxManageExe% sharedfolder add %VM_Name% --name="VirtualBoxTransfer" --hostpath="%VM_Directory%\VB_Transfer" --automount --auto-mount-point="/home/%UserName%/Transfer"
:OS_Install
@rem NOTE: A caret at the line end, appends the next line, the first character of the appended line will be escaped.
@echo on
%VBoxManageExe% unattended install "%VM_Name%" --user=%UserName% --password=%UserPassword% --country=AU --time-zone="Australia/Sydney" --hostname="%VM_Name%".myguest.virtualbox.org ^
--iso="%ISO_IMAGE%" --start-vm=gui --install-additions --post-install-command="/home/%UserName%/Transfer/SU_Install_Common_and_GamingMachine.sh"
@rem --additionsIsoPath = C:\Program Files\Oracle\VirtualBox\ VBoxGuestAdditions.iso
@rem does NOT work %VBoxManageExe% guestproperty wait "%VM_Name%" installation_finished
@rem %VBoxManageExe%VBoxManage controlvm "%VM_Name%" acpipowerbutton
@rem %VBoxManageExe%VBoxManage startvm "%VM_Name%"
@rem %VBoxManageExe% --nologo guestcontrol "%VM_Name%" run --exe "usermod -G vboxsf -a ubuntu" --username su --password ubuntu --wait-stdout
@echo.
@echo.
@echo ^+=====================================================================================^+
@echo ^+ ^|
@echo ^+ REBOOT THE VM ONCE THE INSTALL FINISHES FOR THE TRASFER DIRECTORY MAPPING TO SETUP ^|
@echo ^+ ^|
@echo ^+=====================================================================================^+
@echo ^+ ^|
@echo ^+ After the reboot run follwoing (su password is ubuntu): ^|
@echo ^+ ^|
@echo ^+ su ^|
@echo ^+ adduser ubuntu sudo ^|
@echo ^+ and then reboot. ^|
@echo ^+ ^|
@echo ^+ and then: ^|
@echo ^+ su ^|
@echo ^+ cd ./Transfer ^|
@echo ^+ ./SU_Install_Common_and_GamingMachine.sh ^|
@echo ^+ ^|
@echo ^+=====================================================================================^+
@echo.
@echo.
goto end
:end
Saying that SF has GIT support, so the first thing is for someone to figure out how GIT in SF works if you are already are using SVN see if you enable/setup/config GIT in SF what how do the SVN and GIT interact and will this enable usage of both GIT or SVN and the changes automatically get applied to the other. I have no idea if this is possible or not or how SF version control works under the hood.
I tried to access the SF SVN repo with SF's claimed git support, but I couldn't make it work. Maybe that's just me, but anyway. So instead I installed the support for svn in git (I use Kubuntu 20.04 for this):
sudo apt-get install git-svn
git svn clone https://svn.code.sf.net/p/codeblocks/code/trunk codeblocks-code
Clearly, if you research git-svn it is possible to feed back updates to SVN repos from git svn, but I think it would be much easier if the main C::B repo was a git repo, on github or somewhere else.
By the way, I can now see that the latest SF SVN updates to C::B from a few hours ago have been successfully replicated in my github mirror, so it seems to be working as intended.
If there is anything to fix, as a minimum I need some pointers.
Actually, I don't understand the claim that the Fortran plugin is missing. I just tested C::B built yesterday from my github mirror, where supposedly the Fortran plugin is missing, but I was able to compile and build a Fortran program just fine. All I had to do was to install gfortran (under Kubuntu 20.04)
sudo apt-get install gfortran
In C::B I did
File -> New Project ... Fortran Application
I chose the "GNU Fortran Compiler" and it worked, see attached screenshot.
Is this because I have a default.conf from before or what? As far as I can tell Fortran works just fine.