The forum

Derive 6

Simple script

Author Replies
fekir Wednesday 5 May 2010 at 16:39
fekirAnonymous

Hello to everybody, I've made my first script (it's very simple), and wanted to shar it with you.
With this script you can install derive 6, i've tested it with ubuntu 9.10 and 10.4, i think there shouldn't be any problems depending by the version of wine, because this script doe not apply any type of patch, it does only creates the prefix and executes wine.

Here it is:
#!/bin/bash
# Author : Fekir
# Licence : Gnu LGP

 [ "$PLAYONLINUX" = "" ] && exit 0
 
source "$PLAYONLINUX/lib/sources"

NAME="Derive6" 
PREFIX="Derive6"

wget http://education.ti.com/images/rightcolumn/products/software/derive6_L.jpg --output-document="$REPERTOIRE/tmp/leftnotscaled.jpeg"
convert "$REPERTOIRE/tmp/leftnotscaled.jpeg" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpeg"
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpeg" #Getting derive images

POL_SetupWindow_presentation "$NAME" "Soft Wharehouse" "http://education.ti.com/" "Fekir" "$PREFIX"

PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES

select_prefix "$HOME/.PlayOnLinux/wineprefix/$PREFIX/"
POL_SetupWindow_prefixcreate #creates the prefix

POL_SetupWindow_browse "Please select the .exe installation file." "Derive6" 
FILE="$APP_ANSWER" #File to execute

POL_SetupWindow_wait_next_signal "Installing Derive6..." "Derive6"
wine "$FILE" #installation of Derive

POL_SetupWindow_reboot 

POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/TI Education/Derive 6" "Derive6.exe" "" "$NAME" #creates a shortcut

POL_SetupWindow_message "Derive has been successfully installed" "Derive" #notification of successful installation

POL_SetupWindow_Close
exit

I have also done some screenshots:




Hope you'll like it

Edited by fekir

NSLW Friday 7 May 2010 at 14:21
NSLW

There is no
POL_SetupWindow_detect_exit 
after
wine "$FILE" #installation of Derive

You also should specify Wine for the installation.
fekir Friday 7 May 2010 at 15:01
fekirAnonymous

Doesn't it use the default wine version of Playonlinux if i do not specify a version?
fekir Friday 7 May 2010 at 15:30
fekirAnonymous

I've forgotten to mention:
I'll add the line
<code>POL_SetupWindow_detect_exit<code>
but the script works perfectly without it, is it normal?

How can i resize images in a discussion, eg modify a discussion? Or it isn't possible? I've found no option for that...
NSLW Friday 7 May 2010 at 21:00
NSLW

Doesn't it use the default wine version of Playonlinux if i do not specify a version?

Quote from fekir

PlayOnLinux will use system's Wine which isn't the best solution because you can't predict which version is this.


but the script works perfectly without it, is it normal?

Quote from fekir

I don't know but it should be there.

How can i resize images in a discussion, eg modify a discussion? Or it isn't possible? I've found no option for that...

Quote from fekir

I think it's impossible on this forum.
fekir Saturday 8 May 2010 at 0:03
fekirAnonymous

Ok now i've a question...if I add in my script, after
<code>POL_SetupWindow_prefixcreatez</code>
the line
<code>POL_SetupWindow_install_wine "1.1.42"</code>
and after the creation of the shortcut I've put the function
<code>Set_WineVersion_Assign "1.1.42" "$NAME"</code>

If you can give me and advice: the icon of the shortcut is the one of playonlinux, how can I extract the icon of the program of the .exe file? I've not really understood how POL_SetupWindow_make_shortcut works, shouldn't he extract the icon alone?
NSLW Sunday 9 May 2010 at 16:56
NSLW

Ok now i've a question...if I add in my script, after
<code>POL_SetupWindow_prefixcreatez</code>
the line
<code>POL_SetupWindow_install_wine "1.1.42"</code>
and after the creation of the shortcut I've put the function
<code>Set_WineVersion_Assign "1.1.42" "$NAME"</code>

Quote from fekir


You should also use that Wine for prefix creation.


If you can give me and advice: the icon of the shortcut is the one of playonlinux, how can I extract the icon of the program of the .exe file? I've not really understood how POL_SetupWindow_make_shortcut works, shouldn't he extract the icon alone?

Quote from fekir


The icon for the shortcut is in ~/.local/share/icons
fekir Sunday 9 May 2010 at 23:59
fekirAnonymous

now the script looks like this:
#!/bin/bash
# Author : Fekir
# Licence : Gnu LGP

 [ "$PLAYONLINUX" = "" ] && exit 0
 
source "$PLAYONLINUX/lib/sources"

NAME="Derive6" 
PREFIX="Derive6"

wget http://education.ti.com/images/rightcolumn/products/software/derive6_L.jpg --output-document="$REPERTOIRE/tmp/deriveleft.jpeg"
convert "$REPERTOIRE/tmp/deriveleft.jpeg" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpeg"
wget http://static.sftcdn.net/it/scrn/12000/12935/2t_thumbfinale.jpg --output-document="$REPERTOIRE/tmp/derivetop.jpeg"
convert "$REPERTOIRE/tmp/derivetop.jpeg" -scale 60x60\\! "$REPERTOIRE/tmp/top.jpeg"
POL_SetupWindow_Init "$REPERTOIRE/tmp/top.jpeg" "$REPERTOIRE/tmp/left.jpeg"

POL_SetupWindow_presentation "$NAME" "Soft Wharehouse" "http://education.ti.com/" "Fekir" "$PREFIX"

PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES

select_prefix "$HOME/.PlayOnLinux/wineprefix/$PREFIX/"
POL_SetupWindow_prefixcreate 
POL_SetupWindow_install_wine "1.1.42"

POL_SetupWindow_browse "Please select the .exe installation file." "Derive6" 
FILE="$APP_ANSWER" 

POL_SetupWindow_wait_next_signal "Installing Derive6..." "Derive6"
wine "$FILE" 
POL_SetupWindow_detect_exit

POL_SetupWindow_reboot 
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/TI Education/Derive 6" "Derive6.exe" "" "$NAME"
Set_WineVersion_Assign "1.1.42" "$NAME"
clean_tmp
POL_SetupWindow_message "Derive has been successfully installed" "Derive" 
POL_SetupWindow_Close
exit
what do you mean by using that wine version?
If I install wine 1.1.42 doesn't it use that version? It seemed to me so, I looked at other scripts, for example this one:http://www.playonmac.com/repository/?script=373, and it doesn't seem different for the assignement f the wine version..
and also here http://www.playonmac.com/en/page-19-PlayOnLinux_script_functions_reference.html, looking under POL_SetupWindow_install_wine it says "Calling this function in a script allows you then to use Set_WineVersion_Assign" wich is needed to assgn a specific version of wine
fekir Saturday 15 May 2010 at 19:16
fekirAnonymous

ok, now I've updated my script, I hope it is all right:
#!/bin/bash
# Author : Fekir
# Version : 1.2
# Licence : Gnu LGP

 [ "$PLAYONLINUX" = "" ] && exit 0
 
source "$PLAYONLINUX/lib/sources"

NAME="Derive6" 
PREFIX="Derive6"

wget http://education.ti.com/images/rightcolumn/products/software/derive6_L.jpg --output-document="$REPERTOIRE/tmp/deriveleft.jpeg"
convert "$REPERTOIRE/tmp/deriveleft.jpeg" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpeg"
wget http://static.sftcdn.net/it/scrn/12000/12935/2t_thumbfinale.jpg --output-document="$REPERTOIRE/tmp/derivetop.jpeg"
convert "$REPERTOIRE/tmp/derivetop.jpeg" -scale 60x60\\! "$REPERTOIRE/tmp/top.jpeg"
POL_SetupWindow_Init "$REPERTOIRE/tmp/top.jpeg" "$REPERTOIRE/tmp/left.jpeg"


if [ "$POL_LANG" == "it" ]; then
TITLE="Alternative a Derive6"
PRESENTATION="Considera le alternative OpenSource che esistono nativamente per Gnu/Linux come ad esempio \\n\\n- Maxima (http://maxima.sourceforge.net/) \\n\\n- Octave (http://www.gnu.org/software/octave/) \\n\\n- Scilab (www.scilab.org) \\n\\nprima di installare $NAME attraverso Wine."
EXECUTE="Per favore, seleziona il file d'installazione." 
INSTALLATION="Sto installando $NAME ..."
POLEND="$NAME è stato installato con successo"
else
TITLE="Alternatives to Derive6"
PRESENTATION="Please consider some OpenSource alternative programs that runs natively on Linux, as for example \\n\\n- Maxima (http://maxima.sourceforge.net/), \\n\\n- Octave (http://www.gnu.org/software/octave/) or \\n\\n- Scilab (www.scilab.org) befor installing $NAME through Wine."
INSTALLATION="Installing $NAME..."
EXECUTE="Please select the .exe installation file."
POLEND="$NAME has been installed succesfully"
fi

POL_SetupWindow_free_presentation "$TITLE" "$PRESENTATION"

POL_SetupWindow_presentation "$NAME" "Soft Wharehouse" "http://education.ti.com/" "Fekir" "$PREFIX"

PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES

select_prefix "$HOME/.PlayOnLinux/wineprefix/$PREFIX/"
POL_SetupWindow_prefixcreate 
POL_SetupWindow_install_wine "1.1.42"
Use_WineVersion "1.1.42"

POL_SetupWindow_browse "$EXECUTE" "$NAME" 
FILE="$APP_ANSWER" 

POL_SetupWindow_wait_next_signal "$INSTALLATION" "$NAME"
wine "$FILE" 
POL_SetupWindow_detect_exit

POL_SetupWindow_reboot 
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/TI Education/Derive 6" "Derive6.exe" "" "$NAME"
Set_WineVersion_Assign "1.1.42" "$NAME"
clean_tmp
POL_SetupWindow_message "$POLEND" "$NAME" 
POL_SetupWindow_Close
exit
the script works, I just do not know if youthink there are other "syntax problems" like before.
I would also ask what I have to do to to insert this script in the program like the others..
Does somebody else have to test it or what?
NSLW Sunday 16 May 2010 at 8:00
NSLW

You should use Wine 1.1.42 before creating prefix.
You should ask for the file before creating prefix.
You should read program files variable after creating prefix.
How do you check if FILE is the right file?
fekir Sunday 16 May 2010 at 10:38
fekirAnonymous

ok, then i have to change it so, right?

....
#asking for the installation file
POL_SetupWindow_browse "$EXECUTE" "$NAME"
FILE="$APP_ANSWER"
#creating the right prefix & installing/using wine
POL_SetupWindow_install_wine "1.1.42"
Use_WineVersion "1.1.42"
select_prefix "$HOME/.PlayOnLinux/wineprefix/$PREFIX/"
POL_SetupWindow_prefixcreate
#installing derive6
wine "$FILE"
POL_SetupWindow_detect_exit
....

I don't know how I could check it (does other scripts check it?)...I haven't found any example in the other scripts yet and any POL-functions that could help...
I guess we have to hope that the user choose the file he wants to install

What do you mean with program files variable...?

gosh, haven't thought it could be that complicated...
NSLW Sunday 16 May 2010 at 21:55
NSLW

ok, then i have to change it so, right?

....
#asking for the installation file
POL_SetupWindow_browse "$EXECUTE" "$NAME"
FILE="$APP_ANSWER"
#creating the right prefix & installing/using wine
POL_SetupWindow_install_wine "1.1.42"
Use_WineVersion "1.1.42"
select_prefix "$HOME/.PlayOnLinux/wineprefix/$PREFIX/"
POL_SetupWindow_prefixcreate
#installing derive6
wine "$FILE"
POL_SetupWindow_detect_exit
....

Quote from fekir

I think it's OK. Does Derive work on Wine 1.1.44.

What do you mean with program files variable...?

Quote from fekir

You want to know Program Files name by this two lines
PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES

but you haven't even created prefix where that directory exists.
fekir Sunday 16 May 2010 at 22:24
fekirAnonymous

not sure if I've understood... you mean I've to change the script in that way:
....
#asking for the installation file
POL_SetupWindow_browse "$EXECUTE" "$NAME"
FILE="$APP_ANSWER"
#creating the right prefix & installing/using wine
POL_SetupWindow_install_wine "1.1.42"
Use_WineVersion "1.1.42"
select_prefix "$HOME/.PlayOnLinux/wineprefix/$PREFIX/"
POL_SetupWindow_prefixcreate
#installing derive6
wine "$FILE"
POL_SetupWindow_detect_exit
PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES
....
(I've not found anything in the documentation about programfiles...

Tomorrow I'll try derive with wine 1.1.44, but I think it'll work ;)
NSLW Tuesday 18 May 2010 at 15:33
NSLW

There is so much correct scripts to look at and I think you hasn't seen any of it at searching answers for your questions.

Edited by NSLW

fekir Tuesday 18 May 2010 at 16:49
fekirAnonymous

Sorry if I disagree with you, but I looked a lot to other scripts

but because the program worked 100% right on my Pc and I didn't got any error I didn't realized that I had to invert/add some part to it, because to me it seemed all right.

and:
in some scripts there isn't the function:
Use_WineVersion for example
and the order for:
POL_SetupWindow_install_wine "1.1.42"
Use_WineVersion "1.1.42"
select_prefix "$HOME/.PlayOnLinux/wineprefix/$PREFIX/"
POL_SetupWindow_prefixcreate
isn't the same in all scripts
for the problem with programfiles...
in 7zip (and by other programs) the function
POL_LoadVar_PROGRAMFILES
is called right after
POL_SetupWindow_prefixcreate
in FlatOut II (and others), it's called before the
POL_SetupWindow_Init
in blender it isn't even called...
so I thought my script would have been all right

but that's not the matter...
derive (seems to me, I've not made a real test) works perfectly with wine 1.1.44
fekir Friday 21 May 2010 at 1:22
fekirAnonymous

I'm sorry, if I ask, but I have not understood one thing in this forum...when can I validate a script?
Didn't done yet because I thought that through the forum the script would have ben corrected from errors (as it happened), but should i wait that a moderator gives me an ok or what?
NSLW Friday 21 May 2010 at 7:36
NSLW

You can send your script for validation any time but it's useless if your script doesn't look like it should.
You are here: Index > Your creations. > Derive 6

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmcayonlinux.com