TablEdit

Informations

Creator Message
VolkerFroehlich Anonymous

Information

This installer has been approved by the team.

Informations

Platforms:
Downloads: 108
Wine: System

Feedbacks

Description

Creating, editing, printing and listening to tablature and sheet music (standard notation) for guitar and other fretted, stringed instruments. Website.

Appdb.winehq.org 

Screenshots

Miniature

Source code

#!/usr/bin/env playonlinux-bash
# Date : (2020-08-17 23:57)
# Last revision : (2020-08-19 17:20)
# Wine version used : 5.0.2
# Distribution used to test : Ubuntu 19.10, 20.04.1 LTS
# Author : VolkerFröhlich
# PlayOnLinux : 4.3.4
# Script licence : GPL3
# Program licence : Free/Retail
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="TablEdit3"
 
PREFIX="tabledit3"
AUTHOR="VolkerFröhlich"
EDITOR="Matthieu Leschemelle"
EDITOR_URL="https://tabledit.com/"
 
EXECUTABLE_FILE="tableditdemo.exe"
MD5=""
 
# Starting the script
POL_SetupWindow_Init
                           
# Starting debugging API
POL_Debug_Init
          
#POL_SetupWindow_SetID
# Open dialogue box
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$EDITOR_URL" "$AUTHOR" "$PREFIX"
Set_OS "win7"
POL_System_TmpCreate "$PREFIX"
 
POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
 
cd "$POL_System_TmpDir";
##############################
POL_Debug_Message "# select installer"
if [ "$INSTALL_METHOD" = "LOCAL" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
        INSTALLER="$APP_ANSWER"
        POL_Debug_Message "# confirm the executable name"
        if [ ! "`basename $INSTALLER`" = "tabled32.exe" ]; then
                EXECUTABLE_FILE="tabledit.exe"
        fi

elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
        DOWNLOAD_LINK=https://tabledit.com/download/tabled32.exe
        DOWNLOAD_FILE=$(basename "https://tabledit.com/download/tabled32.exe")
        POL_Download "$DOWNLOAD_LINK"
        INSTALLER="$POL_System_TmpDir/tabled32.exe"
fi
 
##############################
POL_Debug_Message "# Set prefix"
POL_Wine_SelectPrefix "$PREFIX"
POL_Debug_Message "# setting WINEARCH to win32"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate

##############################
POL_Debug_Message "# check TiMidity is available"
TIMIDITY_APP=`which timidity`
if [ -z "$TIMIDITY_APP" ];then
        MSG="For $TITLE to run, we recommend you install TiMidity on your system first.\nPlease open a terminal and execute this command line:\n
        sudo apt-get -y install timidity\n\nThen continue or restart this POL installation.\n"
        POL_SetupWindow_message "$(eval_gettext '$MSG')"
fi

##############################
POL_Debug_Message "# start wine installation"
MSG="Installation in progress."
POL_SetupWindow_wait "$(eval_gettext '$MSG')" "$TITLE"

POL_Wine "$INSTALLER"

POL_Debug_Message "# confirm the executable exists"
if [ -z `find $WINEPREFIX -name "$EXECUTABLE_FILE" -print` ]; then
        POL_Debug_Fatal "$EXECUTABLE_FILE not found in $WINEPREFIX"
fi

POL_Shortcut "$EXECUTABLE_FILE" "$TITLE" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;"

##############################
# Add timidity to POL shortcut
TIMIDITY_APP=`which timidity`
if [ ! -z "$TIMIDITY_APP" ];then
        POL_TITLE_PATH="$POL_USER_ROOT/shortcuts/$TITLE"
        POL_Debug_Message "# Adding TiMidity to POL shortcut $POL_TITLE_PATH"
        if [ ! -f "$POL_TITLE_PATH" ];then
                POL_Debug_Warning "file not found: $POL_TITLE_PATH"
        else
                if [ -z "`fgrep timidity $POL_TITLE_PATH`" ];then
                        STARTTIMIDITY="[ -z \"\`pstree | grep timidity\`\" ] \&\& timidity -iA -B2,8 -Os1l -s 44100 \&"
                        echo "s+POL_Wine*+$STARTTIMIDITY\nPOL_Wine+g" > $POL_System_TmpDir/SED_CMD
                        sed -i -f $POL_System_TmpDir/SED_CMD $POL_TITLE_PATH
                fi
        fi
fi

##############################
POL_Debug_Message "# delete temp directory"
POL_System_TmpDelete
 
POL_SetupWindow_Close
exit

Contributions

Filters:

Contribute
Member Message
VolkerFroehlich Wednesday 19 August 2020 at 17:23
VolkerFroehlich Anonymous

Information

This update has been approved by the team.

Message

Hi Guys,
I have implemented the improvements and fixed the wine-5.0.2 issue I encountered on Ubuntu 20.04.

The code now runs stable on both Ubuntu 19.10 and 20.04.1.


 

Differences

@@ -1,121 +1,107 @@
 #!/usr/bin/env playonlinux-bash
 # Date : (2020-08-17 23:57)
-# Last revision : (2020-08-18 02:40)
+# Last revision : (2020-08-19 17:20)
 # Wine version used : 5.0.2
-# Distribution used to test : Ubuntu 19.10
+# Distribution used to test : Ubuntu 19.10, 20.04.1 LTS
 # Author : VolkerFröhlich
 # PlayOnLinux : 4.3.4
 # Script licence : GPL3
 # Program licence : Free/Retail
-##################
-# code ideas:
-# 1-TiMidity installation requires sudo
-#   sudo apt-get install -y timidity
-# 2-create a bash script 'start_tabledit3.sh'
-#   for app launch with TiMidity
-#   echo "timidity -iA -B2,8 -Os1l -s 44100 & playonlinux --run \"TablEdit3\"" > start_tabledit3.sh
-# 3-Patch TablEdit3.desktop
-#   DESKTOP_PATH="`xdg-user-dir DESKTOP`/TablEdit3.desktop"
-#   if [ -f "$DESKTOP_PATH" ] && [ -z "`fgrep start_tabledit3 $DESKTOP_PATH`" ];then
-#        sed -i 's+Exec=/usr/share/playonlinux/playonlinux --run "TablEdit3" %F+#Exec=/usr/share/playonlinux/playonlinux --run "TablEdit3" %F\nExec=start_tabledit3.sh+g' $DESKTOP_PATH
-#   fi
-##################
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
-
+ 
 TITLE="TablEdit3"
-
+ 
 PREFIX="tabledit3"
 AUTHOR="VolkerFröhlich"
 EDITOR="Matthieu Leschemelle"
 EDITOR_URL="https://tabledit.com/"
-
+ 
 EXECUTABLE_FILE="tableditdemo.exe"
 MD5=""
-
+ 
 # Starting the script
 POL_SetupWindow_Init
-                          
+                           
 # Starting debugging API
 POL_Debug_Init
-         
+          
 #POL_SetupWindow_SetID
 # Open dialogue box
 POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$EDITOR_URL" "$AUTHOR" "$PREFIX"
 Set_OS "win7"
 POL_System_TmpCreate "$PREFIX"
-
+ 
 POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
-
+ 
 cd "$POL_System_TmpDir";
-if [ "$INSTALL_METHOD" = "LOCAL" ]
-then
-    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
-    INSTALLER="$APP_ANSWER"
+##############################
+POL_Debug_Message "# select installer"
+if [ "$INSTALL_METHOD" = "LOCAL" ]; then
+	POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
+	INSTALLER="$APP_ANSWER"
+	POL_Debug_Message "# confirm the executable name"
+	if [ ! "`basename $INSTALLER`" = "tabled32.exe" ]; then
+		EXECUTABLE_FILE="tabledit.exe"
+	fi
+
 elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
-##################
-# code ideas:
-# for registered TablEdit user we need to enter user/password
-# and use wget to download
-#    POL_SetupWindow_question "Are you registered user?" "$TITLE";
-#    if [ "$APP_ANSWER" = "TRUE" ]; then
-#        DOWNLOAD_LINK="https://tabledit.com/secured/tev300.exe"
-#        DOWNLOAD_FILE="tev300.exe"
-#        EXECUTABLE_FILE="tabledit.exe"
-#        CMD_SUDO="sudo wget --user=<user> --password=<password> $DOWNLOAD_LINK"
-#        `$CMD_SUDO`
-#    else
-##################
-DOWNLOAD_LINK=https://tabledit.com/download/tabled32.exe
-DOWNLOAD_FILE=$(basename "https://tabledit.com/download/tabled32.exe")
-POL_Download "$DOWNLOAD_LINK"
-#    fi
-INSTALLER="$POL_System_TmpDir/tabled32.exe"
+	DOWNLOAD_LINK=https://tabledit.com/download/tabled32.exe
+	DOWNLOAD_FILE=$(basename "https://tabledit.com/download/tabled32.exe")
+	POL_Download "$DOWNLOAD_LINK"
+	INSTALLER="$POL_System_TmpDir/tabled32.exe"
 fi
-
-# Setting prefix path
+ 
+##############################
+POL_Debug_Message "# Set prefix"
 POL_Wine_SelectPrefix "$PREFIX"
+POL_Debug_Message "# setting WINEARCH to win32"
+POL_System_SetArch "x86"
 POL_Wine_PrefixCreate
 
-POL_SetupWindow_message "$(eval_gettext 'For $TITLE to run, you should make sure TiMidity is installed on your system:\n sudo apt-get -y install timidity')"
-
+##############################
+POL_Debug_Message "# check TiMidity is available"
+TIMIDITY_APP=`which timidity`
+if [ -z "$TIMIDITY_APP" ];then
+	MSG="For $TITLE to run, we recommend you install TiMidity on your system first.\nPlease open a terminal and execute this command line:\n
+	sudo apt-get -y install timidity\n\nThen continue or restart this POL installation.\n"
+	POL_SetupWindow_message "$(eval_gettext '$MSG')"
+fi
 
-POL_SetupWindow_wait "$(eval_gettext 'Installation in progress.\n Do NOT launch the program and first let finish this script.')" "$TITLE"
-
-##################
-# HACK: START
-#       We create the shortcut based on a dummy exe.
-#       This avoids this script ends prematurely,
-#       if the user is launching the executable during installation
-#
-# manually create the TablEdit progamm directory
-cd "$HOME/.PlayOnLinux/wineprefix/$PREFIX/drive_c" 2>/dev/null;
-mkdir "Program Files (x86)" 2>/dev/null;
-cd "Program Files (x86)" 2>/dev/null;
-mkdir "TablEdit" 2>/dev/null;
-cd "TablEdit" 2>/dev/null;
-# copy the dummy file
-cp "$INSTALLER" "./$EXECUTABLE_FILE" 2>/dev/null;
-# create the shortcut
-POL_Shortcut "$EXECUTABLE_FILE" "$TITLE" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;"
-# remove the TablEdit progamm directory
-cd .. 2>/dev/null;
-rm -r "TablEdit" 2>/dev/null;
-cd "$POL_System_TmpDir";
-# HACK: END
-##################
+##############################
+POL_Debug_Message "# start wine installation"
+MSG="Installation in progress."
+POL_SetupWindow_wait "$(eval_gettext '$MSG')" "$TITLE"
 
 POL_Wine "$INSTALLER"
 
-##################
-# The code below may never be reached.
-# If the application launches directly
-# during install, this scripts exits.
+POL_Debug_Message "# confirm the executable exists"
+if [ -z `find $WINEPREFIX -name "$EXECUTABLE_FILE" -print` ]; then
+	POL_Debug_Fatal "$EXECUTABLE_FILE not found in $WINEPREFIX"
+fi
 
 POL_Shortcut "$EXECUTABLE_FILE" "$TITLE" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;"
- 
-POL_System_TmpDelete
 
+##############################
+# Add timidity to POL shortcut
+TIMIDITY_APP=`which timidity`
+if [ ! -z "$TIMIDITY_APP" ];then
+	POL_TITLE_PATH="$POL_USER_ROOT/shortcuts/$TITLE"
+	POL_Debug_Message "# Adding TiMidity to POL shortcut $POL_TITLE_PATH"
+	if [ ! -f "$POL_TITLE_PATH" ];then
+		POL_Debug_Warning "file not found: $POL_TITLE_PATH"
+	else
+		if [ -z "`fgrep timidity $POL_TITLE_PATH`" ];then
+			STARTTIMIDITY="[ -z \"\`pstree | grep timidity\`\" ] \&\& timidity -iA -B2,8 -Os1l -s 44100 \&"
+			echo "s+POL_Wine*+$STARTTIMIDITY\nPOL_Wine+g" > $POL_System_TmpDir/SED_CMD
+			sed -i -f $POL_System_TmpDir/SED_CMD $POL_TITLE_PATH
+		fi
+	fi
+fi
+
+##############################
+POL_Debug_Message "# delete temp directory"
+POL_System_TmpDelete
+ 
 POL_SetupWindow_Close
 exit
-

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2020-08-17 23:57)
# Last revision : (2020-08-19 17:20)
# Wine version used : 5.0.2
# Distribution used to test : Ubuntu 19.10, 20.04.1 LTS
# Author : VolkerFröhlich
# PlayOnLinux : 4.3.4
# Script licence : GPL3
# Program licence : Free/Retail
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="TablEdit3"
 
PREFIX="tabledit3"
AUTHOR="VolkerFröhlich"
EDITOR="Matthieu Leschemelle"
EDITOR_URL="https://tabledit.com/"
 
EXECUTABLE_FILE="tableditdemo.exe"
MD5=""
 
# Starting the script
POL_SetupWindow_Init
                           
# Starting debugging API
POL_Debug_Init
          
#POL_SetupWindow_SetID
# Open dialogue box
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$EDITOR_URL" "$AUTHOR" "$PREFIX"
Set_OS "win7"
POL_System_TmpCreate "$PREFIX"
 
POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
 
cd "$POL_System_TmpDir";
##############################
POL_Debug_Message "# select installer"
if [ "$INSTALL_METHOD" = "LOCAL" ]; then
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
        INSTALLER="$APP_ANSWER"
        POL_Debug_Message "# confirm the executable name"
        if [ ! "`basename $INSTALLER`" = "tabled32.exe" ]; then
                EXECUTABLE_FILE="tabledit.exe"
        fi

elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
        DOWNLOAD_LINK=https://tabledit.com/download/tabled32.exe
        DOWNLOAD_FILE=$(basename "https://tabledit.com/download/tabled32.exe")
        POL_Download "$DOWNLOAD_LINK"
        INSTALLER="$POL_System_TmpDir/tabled32.exe"
fi
 
##############################
POL_Debug_Message "# Set prefix"
POL_Wine_SelectPrefix "$PREFIX"
POL_Debug_Message "# setting WINEARCH to win32"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate

##############################
POL_Debug_Message "# check TiMidity is available"
TIMIDITY_APP=`which timidity`
if [ -z "$TIMIDITY_APP" ];then
        MSG="For $TITLE to run, we recommend you install TiMidity on your system first.\nPlease open a terminal and execute this command line:\n
        sudo apt-get -y install timidity\n\nThen continue or restart this POL installation.\n"
        POL_SetupWindow_message "$(eval_gettext '$MSG')"
fi

##############################
POL_Debug_Message "# start wine installation"
MSG="Installation in progress."
POL_SetupWindow_wait "$(eval_gettext '$MSG')" "$TITLE"

POL_Wine "$INSTALLER"

POL_Debug_Message "# confirm the executable exists"
if [ -z `find $WINEPREFIX -name "$EXECUTABLE_FILE" -print` ]; then
        POL_Debug_Fatal "$EXECUTABLE_FILE not found in $WINEPREFIX"
fi

POL_Shortcut "$EXECUTABLE_FILE" "$TITLE" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;"

##############################
# Add timidity to POL shortcut
TIMIDITY_APP=`which timidity`
if [ ! -z "$TIMIDITY_APP" ];then
        POL_TITLE_PATH="$POL_USER_ROOT/shortcuts/$TITLE"
        POL_Debug_Message "# Adding TiMidity to POL shortcut $POL_TITLE_PATH"
        if [ ! -f "$POL_TITLE_PATH" ];then
                POL_Debug_Warning "file not found: $POL_TITLE_PATH"
        else
                if [ -z "`fgrep timidity $POL_TITLE_PATH`" ];then
                        STARTTIMIDITY="[ -z \"\`pstree | grep timidity\`\" ] \&\& timidity -iA -B2,8 -Os1l -s 44100 \&"
                        echo "s+POL_Wine*+$STARTTIMIDITY\nPOL_Wine+g" > $POL_System_TmpDir/SED_CMD
                        sed -i -f $POL_System_TmpDir/SED_CMD $POL_TITLE_PATH
                fi
        fi
fi

##############################
POL_Debug_Message "# delete temp directory"
POL_System_TmpDelete
 
POL_SetupWindow_Close
exit

Replies

Thursday 20 August 2020 at 9:32
script approved.
Dadu042 Tuesday 18 August 2020 at 6:03
Dadu042
Moderator

Warning

This update has not been approved yet by the team.
Use it at your own risk

Differences

@@ -0,0 +1,121 @@
+#!/usr/bin/env playonlinux-bash
+# Date : (2020-08-17 23:57)
+# Last revision : (2020-08-18 02:40)
+# Wine version used : 5.0.2
+# Distribution used to test : Ubuntu 19.10
+# Author : VolkerFröhlich
+# PlayOnLinux : 4.3.4
+# Script licence : GPL3
+# Program licence : Free/Retail
+##################
+# code ideas:
+# 1-TiMidity installation requires sudo
+#   sudo apt-get install -y timidity
+# 2-create a bash script 'start_tabledit3.sh'
+#   for app launch with TiMidity
+#   echo "timidity -iA -B2,8 -Os1l -s 44100 & playonlinux --run \"TablEdit3\"" > start_tabledit3.sh
+# 3-Patch TablEdit3.desktop
+#   DESKTOP_PATH="`xdg-user-dir DESKTOP`/TablEdit3.desktop"
+#   if [ -f "$DESKTOP_PATH" ] && [ -z "`fgrep start_tabledit3 $DESKTOP_PATH`" ];then
+#        sed -i 's+Exec=/usr/share/playonlinux/playonlinux --run "TablEdit3" %F+#Exec=/usr/share/playonlinux/playonlinux --run "TablEdit3" %F\nExec=start_tabledit3.sh+g' $DESKTOP_PATH
+#   fi
+##################
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+
+TITLE="TablEdit3"
+
+PREFIX="tabledit3"
+AUTHOR="VolkerFröhlich"
+EDITOR="Matthieu Leschemelle"
+EDITOR_URL="https://tabledit.com/"
+
+EXECUTABLE_FILE="tableditdemo.exe"
+MD5=""
+
+# Starting the script
+POL_SetupWindow_Init
+                          
+# Starting debugging API
+POL_Debug_Init
+         
+#POL_SetupWindow_SetID
+# Open dialogue box
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$EDITOR_URL" "$AUTHOR" "$PREFIX"
+Set_OS "win7"
+POL_System_TmpCreate "$PREFIX"
+
+POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
+
+cd "$POL_System_TmpDir";
+if [ "$INSTALL_METHOD" = "LOCAL" ]
+then
+    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
+    INSTALLER="$APP_ANSWER"
+elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
+##################
+# code ideas:
+# for registered TablEdit user we need to enter user/password
+# and use wget to download
+#    POL_SetupWindow_question "Are you registered user?" "$TITLE";
+#    if [ "$APP_ANSWER" = "TRUE" ]; then
+#        DOWNLOAD_LINK="https://tabledit.com/secured/tev300.exe"
+#        DOWNLOAD_FILE="tev300.exe"
+#        EXECUTABLE_FILE="tabledit.exe"
+#        CMD_SUDO="sudo wget --user=<user> --password=<password> $DOWNLOAD_LINK"
+#        `$CMD_SUDO`
+#    else
+##################
+DOWNLOAD_LINK=https://tabledit.com/download/tabled32.exe
+DOWNLOAD_FILE=$(basename "https://tabledit.com/download/tabled32.exe")
+POL_Download "$DOWNLOAD_LINK"
+#    fi
+INSTALLER="$POL_System_TmpDir/tabled32.exe"
+fi
+
+# Setting prefix path
+POL_Wine_SelectPrefix "$PREFIX"
+POL_Wine_PrefixCreate
+
+POL_SetupWindow_message "$(eval_gettext 'For $TITLE to run, you should make sure TiMidity is installed on your system:\n sudo apt-get -y install timidity')"
+
+
+POL_SetupWindow_wait "$(eval_gettext 'Installation in progress.\n Do NOT launch the program and first let finish this script.')" "$TITLE"
+
+##################
+# HACK: START
+#       We create the shortcut based on a dummy exe.
+#       This avoids this script ends prematurely,
+#       if the user is launching the executable during installation
+#
+# manually create the TablEdit progamm directory
+cd "$HOME/.PlayOnLinux/wineprefix/$PREFIX/drive_c" 2>/dev/null;
+mkdir "Program Files (x86)" 2>/dev/null;
+cd "Program Files (x86)" 2>/dev/null;
+mkdir "TablEdit" 2>/dev/null;
+cd "TablEdit" 2>/dev/null;
+# copy the dummy file
+cp "$INSTALLER" "./$EXECUTABLE_FILE" 2>/dev/null;
+# create the shortcut
+POL_Shortcut "$EXECUTABLE_FILE" "$TITLE" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;"
+# remove the TablEdit progamm directory
+cd .. 2>/dev/null;
+rm -r "TablEdit" 2>/dev/null;
+cd "$POL_System_TmpDir";
+# HACK: END
+##################
+
+POL_Wine "$INSTALLER"
+
+##################
+# The code below may never be reached.
+# If the application launches directly
+# during install, this scripts exits.
+
+POL_Shortcut "$EXECUTABLE_FILE" "$TITLE" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;"
+ 
+POL_System_TmpDelete
+
+POL_SetupWindow_Close
+exit
+

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2020-08-17 23:57)
# Last revision : (2020-08-18 02:40)
# Wine version used : 5.0.2
# Distribution used to test : Ubuntu 19.10
# Author : VolkerFröhlich
# PlayOnLinux : 4.3.4
# Script licence : GPL3
# Program licence : Free/Retail
##################
# code ideas:
# 1-TiMidity installation requires sudo
#   sudo apt-get install -y timidity
# 2-create a bash script 'start_tabledit3.sh'
#   for app launch with TiMidity
#   echo "timidity -iA -B2,8 -Os1l -s 44100 & playonlinux --run \"TablEdit3\"" > start_tabledit3.sh
# 3-Patch TablEdit3.desktop
#   DESKTOP_PATH="`xdg-user-dir DESKTOP`/TablEdit3.desktop"
#   if [ -f "$DESKTOP_PATH" ] && [ -z "`fgrep start_tabledit3 $DESKTOP_PATH`" ];then
#        sed -i 's+Exec=/usr/share/playonlinux/playonlinux --run "TablEdit3" %F+#Exec=/usr/share/playonlinux/playonlinux --run "TablEdit3" %F\nExec=start_tabledit3.sh+g' $DESKTOP_PATH
#   fi
##################
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="TablEdit3"

PREFIX="tabledit3"
AUTHOR="VolkerFröhlich"
EDITOR="Matthieu Leschemelle"
EDITOR_URL="https://tabledit.com/"

EXECUTABLE_FILE="tableditdemo.exe"
MD5=""

# Starting the script
POL_SetupWindow_Init
                          
# Starting debugging API
POL_Debug_Init
         
#POL_SetupWindow_SetID
# Open dialogue box
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$EDITOR_URL" "$AUTHOR" "$PREFIX"
Set_OS "win7"
POL_System_TmpCreate "$PREFIX"

POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

cd "$POL_System_TmpDir";
if [ "$INSTALL_METHOD" = "LOCAL" ]
then
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
    INSTALLER="$APP_ANSWER"
elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
##################
# code ideas:
# for registered TablEdit user we need to enter user/password
# and use wget to download
#    POL_SetupWindow_question "Are you registered user?" "$TITLE";
#    if [ "$APP_ANSWER" = "TRUE" ]; then
#        DOWNLOAD_LINK="https://tabledit.com/secured/tev300.exe"
#        DOWNLOAD_FILE="tev300.exe"
#        EXECUTABLE_FILE="tabledit.exe"
#        CMD_SUDO="sudo wget --user=<user> --password=<password> $DOWNLOAD_LINK"
#        `$CMD_SUDO`
#    else
##################
DOWNLOAD_LINK=https://tabledit.com/download/tabled32.exe
DOWNLOAD_FILE=$(basename "https://tabledit.com/download/tabled32.exe")
POL_Download "$DOWNLOAD_LINK"
#    fi
INSTALLER="$POL_System_TmpDir/tabled32.exe"
fi

# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate

POL_SetupWindow_message "$(eval_gettext 'For $TITLE to run, you should make sure TiMidity is installed on your system:\n sudo apt-get -y install timidity')"


POL_SetupWindow_wait "$(eval_gettext 'Installation in progress.\n Do NOT launch the program and first let finish this script.')" "$TITLE"

##################
# HACK: START
#       We create the shortcut based on a dummy exe.
#       This avoids this script ends prematurely,
#       if the user is launching the executable during installation
#
# manually create the TablEdit progamm directory
cd "$HOME/.PlayOnLinux/wineprefix/$PREFIX/drive_c" 2>/dev/null;
mkdir "Program Files (x86)" 2>/dev/null;
cd "Program Files (x86)" 2>/dev/null;
mkdir "TablEdit" 2>/dev/null;
cd "TablEdit" 2>/dev/null;
# copy the dummy file
cp "$INSTALLER" "./$EXECUTABLE_FILE" 2>/dev/null;
# create the shortcut
POL_Shortcut "$EXECUTABLE_FILE" "$TITLE" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;"
# remove the TablEdit progamm directory
cd .. 2>/dev/null;
rm -r "TablEdit" 2>/dev/null;
cd "$POL_System_TmpDir";
# HACK: END
##################

POL_Wine "$INSTALLER"

##################
# The code below may never be reached.
# If the application launches directly
# during install, this scripts exits.

POL_Shortcut "$EXECUTABLE_FILE" "$TITLE" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;"
 
POL_System_TmpDelete

POL_SetupWindow_Close
exit

Replies