You are not logged in.

#1 2016-01-24 06:53

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Can compiler in Q4OS Development pack *.sh to *.x executables ?

Does the Q4OS Development pack include a compiler that I can use to compile bash scripts *.sh to binary executable file that can be placed in /urs/bin and run from command line or by desktop icon ?

For Example: Compile my 4os-update.sh file to /usr/bin/4os-update.x (Termianl --> sudo 4os-update)

Using binary executable files will make sure that no changes have been made to script downloaded from official source.

Thanks for your help,

Bobby

This is what I tried but it failed:

installed shc package & libc6-dev

sudo apt-get install libc6-dev
sudo apt-get install shc

===================

created bash script to run apt-get update --> 4os-update.sh

sudo nano 4os-update.sh
#!/bin/bash 
# launch apt-get-update

sudo apt-get update

clear

exit

===================

use shc to try and compile bash shell file to an executable

shc -T -f script.sh

============ERROR========

sh: 1: cc: not found
shc: Success

==========================

The C file was created but, the *.x file is missing.

bobby@q4osdev:~/Documents/shcdev$ ls
4os-update.sh  4os-update.sh.x.c 

No Longer Using Q4OS

Offline

#2 2016-01-24 18:19

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,492
Website

Re: Can compiler in Q4OS Development pack *.sh to *.x executables ?

You need to install at least 'gcc' package to be able to compile and link .c files . The best way is to install Q4OS development pack, it includes all the necessary.

Offline

#3 2016-01-24 19:37

bobby
Member
From: Nevada, USA
Registered: 2015-12-24
Posts: 459
Website

Re: Can compiler in Q4OS Development pack *.sh to *.x executables ?

Q4OS Team, Thank you - will install Q4OS development pack and try it again.


No Longer Using Q4OS

Offline

Board footer

Powered by FluxBB