It is currently Wed Jun 20, 2018 10:29 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Register extensions and make menu-entry for PB
PostPosted: Sun May 28, 2017 8:01 pm 
Offline
Always Here
Always Here
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 5736
Location: Berlin - Germany
fryquez wrote:
If I run the Purebasic 5.60 included register.sh on my Ubuntu Mate 17.04,
I get an error: register.sh: 36: [: unexpected operator

I think, you have used anotherone :wink:
Change:
Code:
echo "[Desktop Entry]

to
Code:
echo "[Desktop Entry]"

_________________
PureBasic 5.70 | SpiderBasic 2.10 | Windows 10 Pro (x64) | Linux Mint 19.0 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Register extensions and make menu-entry for PB
PostPosted: Sun May 28, 2017 8:40 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Dec 21, 2015 8:12 pm
Posts: 115
Hi ts-soft,

no the included one in Purebaisc 5.60 is following one:
Code:
#!/bin/bash

# Goto home
cd $HOME
# Make sure, dir exist
mkdir -p .local/share/mime/packages
# change to dir for purebasic.xml
cd .local/share/mime/packages
# purebasic.xml create
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > purebasic.xml
echo "<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>" >> purebasic.xml
echo "   <mime-type type=\"text/purebasic\">" >> purebasic.xml
echo "      <comment>PureBasic source code</comment>" >> purebasic.xml
echo "      <glob pattern=\"*.pb\"/>" >> purebasic.xml
echo "      <glob pattern=\"*.pbi\"/>" >> purebasic.xml
echo "      <glob pattern=\"*.pbf\"/>" >> purebasic.xml
echo "   </mime-type>" >> purebasic.xml
echo "</mime-info>" >> purebasic.xml

# change to home
cd $HOME
# Make sure, dir exist
mkdir -p .local/share/applications
# change to dir for PureBasic.desktop
cd .local/share/applications
# PureBasic.desktop create
echo "[Desktop Entry]" > PureBasic.desktop
echo "Comment=PureBasic IDE" >> PureBasic.desktop
echo "Terminal=false" >> PureBasic.desktop
echo "Name=PureBasic" >> PureBasic.desktop
echo "Type=Application" >> PureBasic.desktop
echo "MimeType=text/purebasic" >> PureBasic.desktop
echo "Categories=Development;" >> PureBasic.desktop
echo "StartupNotify=true" >> PureBasic.desktop
# check environment var
if [ "$PUREBASIC_HOME" == "" ]
then
   echo "Exec=${HOME}/purebasic/compilers/purebasic" >> PureBasic.desktop
   echo "Icon=${HOME}/purebasic/logo.png" >> PureBasic.desktop
else
   echo "Exec=${PUREBASIC_HOME}/compilers/purebasic" >> PureBasic.desktop
   echo "Icon=${PUREBASIC_HOME}/logo.png" >> PureBasic.desktop
fi

# Update Databases
update-desktop-database ~/.local/share/applications
update-mime-database    ~/.local/share/mime
echo "File extensions .pb, .pbi, .pbf are now registered for PureBasic."


so line 36 is: "if [ "$PUREBASIC_HOME" == "" ]"
Not sure why it complains about the bracket, removing it doesn't help either.


Top
 Profile  
Reply with quote  
 Post subject: Re: Register extensions and make menu-entry for PB
PostPosted: Mon Apr 02, 2018 12:57 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 14, 2014 12:09 pm
Posts: 213
Same problem on UBUNTU 17.10 and the sh file seems not executing
THe extension is not registered / Can someone help me to solve this problem


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye