HP Forums
[newRPL][How To] Compiling newRPL without QTCreator - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: [newRPL][How To] Compiling newRPL without QTCreator (/thread-17667.html)



[newRPL][How To] Compiling newRPL without QTCreator - gwh - 11-04-2021 12:18 PM

Wanting to build (and package for Slackware) newRPL I managed to do it without QTCreator. I thought it might a good idea to have it documented somewhere.

Procedure:
PHP Code:
git clone https://git.code.sf.net/p/newrpl/sources ~/newrpl
cd ~/newrpl/

cd tools/elf2rom/
qmake elf2rom.pro
make
cp elf2rom 
../../tools-bin/

cd ~/newrpl/
cd tools/fonts/bmp2font/
qmake bmp2font.pro
make
cp bmp2font 
../../../tools-bin/

cd ~/newrpl/
qmake newrpl-comp.pro
make
cp newrpl
-comp tools-bin/

# This `make clean` is important
make clean
qmake newrpl
-ui.pro
make 

After running all this you'll have newrpl-ui and newrpl-comp in ~/newrpl/

Full SlackBuild @ https://github.com/gwenhael-le-moine/slackbuilds/blob/master/d/newrpl/SlackBuild


RE: [newRPL][How To] Compiling newRPL without QTCreator - erazor - 11-05-2021 06:34 AM

You always should do out of source builds.Saves from troubles and you can keep your object files which lets you profit from incremental build speed after update.


RE: [newRPL][How To] Compiling newRPL without QTCreator - gwh - 11-05-2021 07:50 AM

(11-05-2021 06:34 AM)erazor Wrote:  You always should do out of source builds.Saves from troubles and you can keep your object files which lets you profit from incremental build speed after update.

You're right. Although in the context of my packaging script it's less important (the process starts from scratch each time) I updated it and it allowed me to remove a "kludgy"
Code:
make clean
I had to do before. Thanks!

I also took the chance to parallelize the build and build both ui and ui-prime:
Code:

git clone https://git.code.sf.net/p/newrpl/sources ~/newrpl
cd ~/newrpl/

NPROC=$(nproc)

mkdir build-elf2rom
cd build-elf2rom/
qmake ../tools/elf2rom//elf2rom.pro
make -j$NPROC
cp elf2rom ../tools-bin/

cd ~/newrpl/
mkdir build-bmp2font
cd build-bmp2font/
qmake ../tools/fonts/bmp2font//bmp2font.pro
make -j$NPROC
cp bmp2font ../tools-bin/

cd ~/newrpl/
mkdir build-comp
cd build-comp/
qmake ../newrpl-comp.pro
make -j$NPROC
cp newrpl-comp ../tools-bin/

cd ~/newrpl/
mkdir build-ui
cd build-ui/
qmake ../newrpl-ui.pro
make -j$NPROC

cd ~/newrpl/
mkdir build-ui-prime
cd build-ui-prime/
qmake ../newrpl-ui-prime.pro
make -j$NPROC

cd ~/newrpl/
mkdir -p $PKG$PREFIX/bin/
cp build-ui/newrpl-ui build-comp/newrpl-comp $PKG$PREFIX/bin/
cp build-ui-prime/newrpl-ui $PKG$PREFIX/bin/newrpl-ui-prime
cp build-elf2rom/elf2rom $PKG$PREFIX/bin/newrpl-elf2rom
cp build-bmp2font/bmp2font $PKG$PREFIX/bin/newrpl-bmp2font



RE: [newRPL][How To] Compiling newRPL without QTCreator - Claudio L. - 11-05-2021 03:15 PM

Looks great!

A couple of notes:

For newrpl-ui and newrpl-ui-prime you only need to build newrpl-comp as a prerequisite. You only need elf2rom if you are also building the firmware images for the various calculator targets.
Similar deal with bmp2font, you only need it if you are creating or modifying one of the existing fonts.


RE: [newRPL][How To] Compiling newRPL without QTCreator - gwh - 11-06-2021 06:51 PM

(11-05-2021 03:15 PM)Claudio L. Wrote:  Looks great!

A couple of notes:

For newrpl-ui and newrpl-ui-prime you only need to build newrpl-comp as a prerequisite. You only need elf2rom if you are also building the firmware images for the various calculator targets.
Similar deal with bmp2font, you only need it if you are creating or modifying one of the existing fonts.

Indeed, I already guessed it wasn't really necessary to package them but it's even better to not build them at all. I commented that part in case I want to try to build actual firmware later. Thanks, now on to actually jump back into (new)RPL after maybe 20 years.