The forum

[Script] CASSYLab2

Author Replies
Scindix Monday 21 December 2015 at 4:38
Scindix

This is a script to install CASSYLab 2, which is a program used in science and education to gather measurements and analyze them. In order for CASSYLab 2 to work you need to install dotnet20. Also I remember that some really old versions of wine that I used back in my school time didn't work. Just to be sure I'm using version 1.7.49 in this script. I don't know how you handle this, but perhaps the version could also be dropped.
According to WineHQ you can't get the USB measuring tools to work. (I can't confirm this as I don't have one at home). However this software is still usefull if you just want to analyze your measurements at home (or even just want to be able to read and export the files containing your measurements). Also I have recognized that some analyzing functions lead to a crash. I haven't found a solution for that yet. But I think even the (slightly) reduced set of functions that work would help a lot of people in my situation.

Script

#!/bin/bash
# Date : (2015-12-21 00-20)
# Last revision : (2015-12-21 00-20)
# Wine version used : 1.7.49
# Distribution used to test : Arch Linux (kernel 4.2.5-1)
# Author : Cedric Wehrum
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="CASSYLab 2"
PREFIX="CASSYLab2"

#Used to determine which file should be downloaded, depending on the preferred language
DOWNLOAD_LANG_CODE=("de" "en" "fr" "es" "pt" "it" "nl" "ru")
DOWNLOAD_HASH=("b3e97b0760ac05dad4ef15e7966cac86" "bb0e7ec6dcf5e94c16102e58101579a0" "983fe20eedc95d689aec1076af5d6fe3" "22846d4e917583683d84083c4ddf8674" "c40e194be08d0f76b99d36102005f84a" "073414ad07562765b75cb87f1cf08c09" "a6cb672946018e972cf87542d3be7c03" "2165fa5eae1c5afe19115292b7a90b95")

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "LD Didactic" "http://www.ld-didactic.de" "Cedric Wehrum" "$PREFIX"

# I think I remember that the software didn't work for me with some older versions of wine. Just to be sure I'm using 1.7.49 which is known to work
POL_Wine_PrefixCreate "1.7.49"
# The most important thing. CASSYLab doesn't work without dotnet 2.0
POL_Call POL_Install_dotnet20

# Either download from the website or use a local file
POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

if [ "$INSTALL_METHOD" = "LOCAL" ]
then
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
    # Installing
    POL_Wine start /unix "$APP_ANSWER"
    # Wine returns immediately. So we have to wait for the user to confirm that the installation is over.
    POL_SetupWindow_message "$(eval_gettext 'Please wait while $TITLE is installed.') $(eval_gettext 'Click next when the installer has finished.')" "$TITLE"
elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
    # Downloading file
    POL_System_TmpCreate "$PREFIX"
    cd "$POL_System_TmpDir"
    # There are different setup files. One for each language. So the user has to choose the language beforehand.
    POL_SetupWindow_menu_num "$(eval_gettext 'Which language version would you like to install?')" "$TITLE" "German~English~French~Spanish~Portuguese~Italian~Dutch~Russian" "~"
    
    POL_Download "http://www.ld-didactic.com/software/cassylab2_${DOWNLOAD_LANG_CODE[APP_ANSWER]}.msi" ${DOWNLOAD_HASH[APP_ANSWER]}
    # Installing
    POL_Wine start /unix "$POL_System_TmpDir/cassylab2_${DOWNLOAD_LANG_CODE[APP_ANSWER]}.msi"
    # Wine returns immediately. So we have to wait for the user to confirm that the installation is over.
    POL_SetupWindow_message "$(eval_gettext 'Please wait while $TITLE is installed.') $(eval_gettext 'Click next when the installer has finished.')" "$TITLE"
    # Delete downloaded file
    POL_System_TmpDelete
fi

# Create a shortcut, show the user a message that everything went successfully and exit
POL_Shortcut "CASSYLab2.exe" "$TITLE"
POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.') $(eval_gettext 'Visit http://www.ld-didactic.de/en/service/software-download/cassylab2.html for the manual')" "$TITLE"

POL_SetupWindow_Close
exit

Screenshots

http://postimg.org/image/lpz013unn/

http://postimg.org/image/7kt6zalmb/

http://postimg.org/image/42h72wkqb/

Install resources and images

22x22: http://s5.postimg.org/wunymdsdv/CASSYLab2_22x22.png

48x48: http://s5.postimg.org/e125pdu5v/CASSYLab2_48x48.png

left: http://postimg.org/image/4x3qoxskz/

top: http://s5.postimg.org/46b0j5q7n/top.png

 

Let me kow if I forgot anything.

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