mp3DirectCut
Informations
Creator | Meddelanden |
---|---|
VolkerFroehlich
|
WarningThis installer is a beta script. It means that it might not work as expected InformationsPlatforms: Feedbacks0 0 Descriptionmp3DirectCut is a lossless editor for MP3 audio files. Website. ScreenshotsSource code#!/usr/bin/env playonlinux-bash # Date : (2020-08-18 12:00) # Last revision : (2020-08-18 12:00) # 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 #!/usr/bin/env playonlinux-bash [ "$PLAYONLINUX" = "" ] && exit 0 source "$PLAYONLINUX/lib/sources" TITLE="mp3DirectCut" PREFIX="mp3DirectCut" AUTHOR="Volker Fröhlich" EDITOR="Martin Pesch" EDITOR_URL="https://mpesch3.de/" EXECUTABLE_FILE="mp3DirectCut.exe" MD5="a4043199945edd9023e2274445b6d528" # 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" cd "$POL_System_TmpDir" || POL_Debug_Fatal "Unable to change directory" POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD" 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 DOWNLOAD_LINK="https://kubadownload.com/site/assets/files/2452/mp3DC230.exe" DOWNLOAD_FILE=$(basename $DOWNLOAD_LINK) POL_Download "$DOWNLOAD_LINK" "$MD5" INSTALLER="$POL_System_TmpDir/$DOWNLOAD_FILE" fi [ -z "$INSTALLER" ] && exit -1 # Setting prefix path POL_Wine_SelectPrefix "$PREFIX" POL_Wine_PrefixCreate POL_Wine_WaitBefore "$TITLE" ########### # The installer consistently crashes wine and, # POL_Wine will show an error message. # However, the app then runs smoothly, so let's not bother. export POL_IgnoreWineErrors="True" POL_Wine "$INSTALLER" POL_Shortcut "$EXECUTABLE_FILE" "$TITLE" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;" POL_System_TmpDelete POL_SetupWindow_Close exit |
Contributions
Filters:
ContributeMember | Meddelanden |
VolkerFroehlich | Saturday 29 January 2022 at 17:52 |
VolkerFroehlich
|
WarningThis update has not been approved yet by the team. MeddelandenSupport new installer: mp3DirectCut Version 2.36 · 2022-01-28Differences@@ -1,68 +1,161 @@ #!/usr/bin/env playonlinux-bash -# Date : (2020-08-18 12:00) -# Last revision : (2020-08-18 12:00) -# 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 -#!/usr/bin/env playonlinux-bash [ "$PLAYONLINUX" = "" ] && exit 0 -source "$PLAYONLINUX/lib/sources" - +source "/usr/share/playonlinux/lib/sources" +# ###################################################################### +# created Sa 29. Jan 17:42:49 CET 2022 +# ###################################################################### +# global parameters TITLE="mp3DirectCut" - PREFIX="mp3DirectCut" AUTHOR="Volker Fröhlich" EDITOR="Martin Pesch" EDITOR_URL="https://mpesch3.de/" - -EXECUTABLE_FILE="mp3DirectCut.exe" -MD5="a4043199945edd9023e2274445b6d528" - -# Starting the script +FILE="mp3DC232.exe" +MD5="" +DOWNLOAD_PATH="https://mpesch3.de/" +# automation parameters +USE_AUTOMATION="0" # 1: do not ask user +# ###################################################################### +# FUNCTIONS +# ====================================================================== +getInstallerLocalDownload() +# ---------------------------------------------------------------------- +# 1. decide if local or download +# 1.1 browse for local installer +# 1.2 download +# .store download page locally +# .analyze page for latest installer +# This may no longer work if download page logic changes. +# 2. check installer size is not too small +# ====================================================================== +{ +INSTALLER="" +DOWNLOAD_FULLPATH="$DOWNLOAD_PATH$FILE" +POL_Debug_Message "# USER CHOICE: select local or download" +[ "$USE_AUTOMATION" = 1 ] && \ + INSTALL_METHOD="DOWNLOAD" || \ + POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD" +if [ "$INSTALL_METHOD" = "LOCAL" ]; then + POL_Debug_Message "# local installer" + MSG="Please select the setup file to run." + POL_SetupWindow_browse "$(eval_gettext '$MSG')" "" + INSTALLER="$APP_ANSWER" +elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then + POL_Debug_Message "# download installer page" + wget -P "$POL_System_TmpDir/" "$DOWNLOAD_PATH" + DOWNLOAD_FULLPATH=`cat $POL_System_TmpDir/index.html | grep '.exe' | grep 'href=' | cut -d '"' -f 2` + POL_Debug_Message "# download installer" + DOWNLOAD_FILE=$(basename "$DOWNLOAD_FULLPATH") + DOWNLOAD_LINK=$DOWNLOAD_PATH/$DOWNLOAD_FILE + POL_Debug_Message "# DOWNLOAD_LINK=$DOWNLOAD_LINK" + POL_Debug_Message "# MD5=$MD5" + POL_Download "$DOWNLOAD_LINK" "$MD5" + INSTALLER="$POL_System_TmpDir/$DOWNLOAD_FILE" +fi +if [[ -z "$INSTALLER" || ! -f "$INSTALLER" ]];then + MSG=-e "\x1B[1;31mERROR:\x1b[0m cannot locate installer >$INSTALLER< for $TITLE." + POL_Debug_Message "# $MSG" + POL_SetupWindow_message "$(eval_gettext '$MSG')" "$TITLE" +fi +# --------------------- +# check installer size +file_size_kb=`du -k "$INSTALLER" | cut -f1` +if [ "$file_size_kb" -lt 300 ]; then + POL_Debug_Warning "# Warning: Installer $INSTALLER size $file_size_kb kb is too small for a set-up file." +fi +return 0 +} +# ====================================================================== +getVersionInstalled() +# ---------------------------------------------------------------------- +# store installed version in variable +# VERSION_INSTALLED +# ====================================================================== +{ +POL_Debug_Message "# getVersionInstalled" +VERSION_INSTALLED="" +POL_Debug_Message "# WINEPREFIX: $WINEPREFIX" +VERSION_FILE="$WINEPREFIX/drive_c/Program Files/mp3DirectCut/Version.txt" +POL_Debug_Message "# VERSION_FILE=$VERSION_FILE" +[ ! -f "$VERSION_FILE" ] && POL_Debug_Message "file not found $VERSION_FILE" +[ -f "$VERSION_FILE" ] && VERSION_INSTALLED=`head -5 "$VERSION_FILE" | grep "20" | cut -d "," -f 1` +POL_Debug_Message "# VERSION_INSTALLED: $VERSION_INSTALLED" +} +# ====================================================================== +createShortcut() +# ---------------------------------------------------------------------- +# 1. get installed version +# 2. remove previous desktop starter +# 3. remove previous POL shortcut +# 4. add POL shortcut with version info +# ====================================================================== +{ +# ------------------- +POL_Debug_Message "# get program version" +getVersionInstalled +POL_Debug_Message "# VERSION_INSTALLED: $VERSION_INSTALLED" +LAUNCHER="$TITLE" +[ ! -z "$VERSION_INSTALLED" ] && LAUNCHER="$LAUNCHER-v$VERSION_INSTALLED" +POL_Debug_Message "# LAUNCHER: $LAUNCHER" +# ------------------- +PATH_SHORTCUT="$POL_USER_ROOT/shortcuts/$LAUNCHER" +if [ ! -f "$PATH_SHORTCUT" ];then + EXECUTABLE_FILE="mp3DirectCut.exe" + # ------------------- + POL_Debug_Message "# remove previous desktop starter" + LINUX_DESKTOP=`xdg-user-dir DESKTOP` + PATH_SHORTCUT="$LINUX_DESKTOP/$TITLE" + [ ! -z "$PATH_SHORTCUT" ] && rm -r "$PATH_SHORTCUT"* 2>/dev/null; + rm -r $HOME/.local/share/applications/*$TITLE* 2>/dev/null; + # ------------------- + POL_Debug_Message "# remove previous POL shortcut" + PATH_SHORTCUT="$POL_USER_ROOT/shortcuts/$TITLE" + [ ! -z "$PATH_SHORTCUT" ] && rm -r "$PATH_SHORTCUT"* 2>/dev/null; + # ------------------- + POL_Debug_Message "# create POL shortcut" + POL_Shortcut "$EXECUTABLE_FILE" "$LAUNCHER" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;" + POL_Debug_Message "# rename LAUNCHER: playonlinux-$LAUNCHER" + DESKTOP_DIR=/home/benutzer1/Desktop + [ -f "$DESKTOP_DIR/$LAUNCHER.desktop" ] && mv "$DESKTOP_DIR/$LAUNCHER.desktop" "$DESKTOP_DIR/playonlinux-$LAUNCHER.desktop" && chmod a+x "$DESKTOP_DIR/\playonlinux-$LAUNCHER.desktop" + # ------------------- + PATH_SHORTCUT="$POL_USER_ROOT/shortcuts/$LAUNCHER" +fi +[ -f "$PATH_SHORTCUT" ] && MSG="$LAUNCHER installation ok" && POL_Debug_Message "# $MSG" +return 0 +} +# ###################################################################### +# MAIN +IMAGE_TOP="https://mpesch3.de/img/ico-mp3dc.png" +IMAGE_LEFT="https://repacks.de/images/file/8d/234.png" +POL_GetSetupImages --force "$IMAGE_TOP" "$IMAGE_LEFT" "$TITLE" POL_SetupWindow_Init - -# Starting debugging API POL_Debug_Init - -#POL_SetupWindow_SetID -# Open dialogue box +POL_Debug_Message "# show POL Window" POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$EDITOR_URL" "$AUTHOR" "$PREFIX" -Set_OS "win7" -POL_System_TmpCreate "$PREFIX" -cd "$POL_System_TmpDir" || POL_Debug_Fatal "Unable to change directory" - -POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD" - -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 - DOWNLOAD_LINK="https://kubadownload.com/site/assets/files/2452/mp3DC230.exe" - DOWNLOAD_FILE=$(basename $DOWNLOAD_LINK) - POL_Download "$DOWNLOAD_LINK" "$MD5" - INSTALLER="$POL_System_TmpDir/$DOWNLOAD_FILE" -fi -[ -z "$INSTALLER" ] && exit -1 - -# Setting prefix path +# --------------------- +POL_Debug_Message "# create PREFIX environment" POL_Wine_SelectPrefix "$PREFIX" +POL_System_SetArch "x86" POL_Wine_PrefixCreate - +Set_OS "win7" +POL_System_TmpCreate "$PREFIX" +PWD_OLD=`pwd` +cd "$POL_System_TmpDir" || POL_Debug_Fatal "# ERROR: Unable to change directory" +POL_Debug_Message "# WINEPREFIX: $WINEPREFIX" +POL_Debug_Message "# PREFIX: $PREFIX" +POL_Debug_Message "# POL_System_TmpDir: $POL_System_TmpDir" +# --------------------- +POL_Debug_Message "# USER CHOICE: Installer local or download" +getInstallerLocalDownload +# ====================================================================== +# Run Wine installation +MSG="Installation in progress." +POL_SetupWindow_wait "$(eval_gettext '$MSG')" "$TITLE" POL_Wine_WaitBefore "$TITLE" -########### -# The installer consistently crashes wine and, -# POL_Wine will show an error message. -# However, the app then runs smoothly, so let's not bother. export POL_IgnoreWineErrors="True" POL_Wine "$INSTALLER" - -POL_Shortcut "$EXECUTABLE_FILE" "$TITLE" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;" - -POL_System_TmpDelete - +# --------------------- +createShortcut +cd $PWD_OLD POL_SetupWindow_Close -exit \ No newline at end of file +exit New source code#!/usr/bin/env playonlinux-bash [ "$PLAYONLINUX" = "" ] && exit 0 source "/usr/share/playonlinux/lib/sources" # ###################################################################### # created Sa 29. Jan 17:42:49 CET 2022 # ###################################################################### # global parameters TITLE="mp3DirectCut" PREFIX="mp3DirectCut" AUTHOR="Volker Fröhlich" EDITOR="Martin Pesch" EDITOR_URL="https://mpesch3.de/" FILE="mp3DC232.exe" MD5="" DOWNLOAD_PATH="https://mpesch3.de/" # automation parameters USE_AUTOMATION="0" # 1: do not ask user # ###################################################################### # FUNCTIONS # ====================================================================== getInstallerLocalDownload() # ---------------------------------------------------------------------- # 1. decide if local or download # 1.1 browse for local installer # 1.2 download # .store download page locally # .analyze page for latest installer # This may no longer work if download page logic changes. # 2. check installer size is not too small # ====================================================================== { INSTALLER="" DOWNLOAD_FULLPATH="$DOWNLOAD_PATH$FILE" POL_Debug_Message "# USER CHOICE: select local or download" [ "$USE_AUTOMATION" = 1 ] && \ INSTALL_METHOD="DOWNLOAD" || \ POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD" if [ "$INSTALL_METHOD" = "LOCAL" ]; then POL_Debug_Message "# local installer" MSG="Please select the setup file to run." POL_SetupWindow_browse "$(eval_gettext '$MSG')" "" INSTALLER="$APP_ANSWER" elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then POL_Debug_Message "# download installer page" wget -P "$POL_System_TmpDir/" "$DOWNLOAD_PATH" DOWNLOAD_FULLPATH=`cat $POL_System_TmpDir/index.html | grep '.exe' | grep 'href=' | cut -d '"' -f 2` POL_Debug_Message "# download installer" DOWNLOAD_FILE=$(basename "$DOWNLOAD_FULLPATH") DOWNLOAD_LINK=$DOWNLOAD_PATH/$DOWNLOAD_FILE POL_Debug_Message "# DOWNLOAD_LINK=$DOWNLOAD_LINK" POL_Debug_Message "# MD5=$MD5" POL_Download "$DOWNLOAD_LINK" "$MD5" INSTALLER="$POL_System_TmpDir/$DOWNLOAD_FILE" fi if [[ -z "$INSTALLER" || ! -f "$INSTALLER" ]];then MSG=-e "\x1B[1;31mERROR:\x1b[0m cannot locate installer >$INSTALLER< for $TITLE." POL_Debug_Message "# $MSG" POL_SetupWindow_message "$(eval_gettext '$MSG')" "$TITLE" fi # --------------------- # check installer size file_size_kb=`du -k "$INSTALLER" | cut -f1` if [ "$file_size_kb" -lt 300 ]; then POL_Debug_Warning "# Warning: Installer $INSTALLER size $file_size_kb kb is too small for a set-up file." fi return 0 } # ====================================================================== getVersionInstalled() # ---------------------------------------------------------------------- # store installed version in variable # VERSION_INSTALLED # ====================================================================== { POL_Debug_Message "# getVersionInstalled" VERSION_INSTALLED="" POL_Debug_Message "# WINEPREFIX: $WINEPREFIX" VERSION_FILE="$WINEPREFIX/drive_c/Program Files/mp3DirectCut/Version.txt" POL_Debug_Message "# VERSION_FILE=$VERSION_FILE" [ ! -f "$VERSION_FILE" ] && POL_Debug_Message "file not found $VERSION_FILE" [ -f "$VERSION_FILE" ] && VERSION_INSTALLED=`head -5 "$VERSION_FILE" | grep "20" | cut -d "," -f 1` POL_Debug_Message "# VERSION_INSTALLED: $VERSION_INSTALLED" } # ====================================================================== createShortcut() # ---------------------------------------------------------------------- # 1. get installed version # 2. remove previous desktop starter # 3. remove previous POL shortcut # 4. add POL shortcut with version info # ====================================================================== { # ------------------- POL_Debug_Message "# get program version" getVersionInstalled POL_Debug_Message "# VERSION_INSTALLED: $VERSION_INSTALLED" LAUNCHER="$TITLE" [ ! -z "$VERSION_INSTALLED" ] && LAUNCHER="$LAUNCHER-v$VERSION_INSTALLED" POL_Debug_Message "# LAUNCHER: $LAUNCHER" # ------------------- PATH_SHORTCUT="$POL_USER_ROOT/shortcuts/$LAUNCHER" if [ ! -f "$PATH_SHORTCUT" ];then EXECUTABLE_FILE="mp3DirectCut.exe" # ------------------- POL_Debug_Message "# remove previous desktop starter" LINUX_DESKTOP=`xdg-user-dir DESKTOP` PATH_SHORTCUT="$LINUX_DESKTOP/$TITLE" [ ! -z "$PATH_SHORTCUT" ] && rm -r "$PATH_SHORTCUT"* 2>/dev/null; rm -r $HOME/.local/share/applications/*$TITLE* 2>/dev/null; # ------------------- POL_Debug_Message "# remove previous POL shortcut" PATH_SHORTCUT="$POL_USER_ROOT/shortcuts/$TITLE" [ ! -z "$PATH_SHORTCUT" ] && rm -r "$PATH_SHORTCUT"* 2>/dev/null; # ------------------- POL_Debug_Message "# create POL shortcut" POL_Shortcut "$EXECUTABLE_FILE" "$LAUNCHER" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;" POL_Debug_Message "# rename LAUNCHER: playonlinux-$LAUNCHER" DESKTOP_DIR=/home/benutzer1/Desktop [ -f "$DESKTOP_DIR/$LAUNCHER.desktop" ] && mv "$DESKTOP_DIR/$LAUNCHER.desktop" "$DESKTOP_DIR/playonlinux-$LAUNCHER.desktop" && chmod a+x "$DESKTOP_DIR/\playonlinux-$LAUNCHER.desktop" # ------------------- PATH_SHORTCUT="$POL_USER_ROOT/shortcuts/$LAUNCHER" fi [ -f "$PATH_SHORTCUT" ] && MSG="$LAUNCHER installation ok" && POL_Debug_Message "# $MSG" return 0 } # ###################################################################### # MAIN IMAGE_TOP="https://mpesch3.de/img/ico-mp3dc.png" IMAGE_LEFT="https://repacks.de/images/file/8d/234.png" POL_GetSetupImages --force "$IMAGE_TOP" "$IMAGE_LEFT" "$TITLE" POL_SetupWindow_Init POL_Debug_Init POL_Debug_Message "# show POL Window" POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$EDITOR_URL" "$AUTHOR" "$PREFIX" # --------------------- POL_Debug_Message "# create PREFIX environment" POL_Wine_SelectPrefix "$PREFIX" POL_System_SetArch "x86" POL_Wine_PrefixCreate Set_OS "win7" POL_System_TmpCreate "$PREFIX" PWD_OLD=`pwd` cd "$POL_System_TmpDir" || POL_Debug_Fatal "# ERROR: Unable to change directory" POL_Debug_Message "# WINEPREFIX: $WINEPREFIX" POL_Debug_Message "# PREFIX: $PREFIX" POL_Debug_Message "# POL_System_TmpDir: $POL_System_TmpDir" # --------------------- POL_Debug_Message "# USER CHOICE: Installer local or download" getInstallerLocalDownload # ====================================================================== # Run Wine installation MSG="Installation in progress." POL_SetupWindow_wait "$(eval_gettext '$MSG')" "$TITLE" POL_Wine_WaitBefore "$TITLE" export POL_IgnoreWineErrors="True" POL_Wine "$INSTALLER" # --------------------- createShortcut cd $PWD_OLD POL_SetupWindow_Close exit Svar |
VolkerFroehlich | Saturday 30 January 2021 at 22:31 |
VolkerFroehlich
|
WarningThis update has not been approved yet by the team. MeddelandenThere is a new version 2.32 out. Differences@@ -1,68 +1,88 @@ #!/usr/bin/env playonlinux-bash -# Date : (2020-08-18 12:00) -# Last revision : (2020-08-18 12:00) -# 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 -#!/usr/bin/env playonlinux-bash [ "$PLAYONLINUX" = "" ] && exit 0 -source "$PLAYONLINUX/lib/sources" - +source "/usr/share/playonlinux/lib/sources" +###################### +# global parameters TITLE="mp3DirectCut" - PREFIX="mp3DirectCut" AUTHOR="Volker Fröhlich" EDITOR="Martin Pesch" EDITOR_URL="https://mpesch3.de/" - -EXECUTABLE_FILE="mp3DirectCut.exe" -MD5="a4043199945edd9023e2274445b6d528" - -# Starting the script +FILE="mp3DC232.exe" +MD5="" +DOWNLOAD_PATH="https://maddownload.com/audio-video/audio-editors/mp3directcut/download/" +###################### +# show POL Window POL_SetupWindow_Init - -# Starting debugging API POL_Debug_Init - -#POL_SetupWindow_SetID -# Open dialogue box POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$EDITOR_URL" "$AUTHOR" "$PREFIX" +###################### +# create PREFIX environment +POL_Wine_SelectPrefix "$PREFIX" +POL_System_SetArch "x86" +POL_Wine_PrefixCreate Set_OS "win7" POL_System_TmpCreate "$PREFIX" +PWD_OLD=`pwd` cd "$POL_System_TmpDir" || POL_Debug_Fatal "Unable to change directory" - +POL_Debug_Message "# WINEPREFIX: $WINEPREFIX" +POL_Debug_Message "# PREFIX: $PREFIX" +POL_Debug_Message "# POL_System_TmpDir: $POL_System_TmpDir" +###################### +# user choice: +# local installer vs. download from $DOWNLOAD_PATH +INSTALLER="" POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD" - -if [ "$INSTALL_METHOD" = "LOCAL" ] -then - POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" - INSTALLER="$APP_ANSWER" +if [ "$INSTALL_METHOD" = "LOCAL" ]; then +###################### +# user selects installer + POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" + INSTALLER="$APP_ANSWER" elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then - DOWNLOAD_LINK="https://kubadownload.com/site/assets/files/2452/mp3DC230.exe" - DOWNLOAD_FILE=$(basename $DOWNLOAD_LINK) - POL_Download "$DOWNLOAD_LINK" "$MD5" - INSTALLER="$POL_System_TmpDir/$DOWNLOAD_FILE" +###################### +POL_Debug_Message "# download HTML page and get download link to installer" +wget -P "$POL_System_TmpDir/" "$DOWNLOAD_PATH" +DOWNLOAD_FULLPATH=`cat $POL_System_TmpDir/index.html | grep '.exe' | grep 'href=' | cut -d '"' -f 2` +###################### +# download installer +POL_Debug_Message "# download installer" + DOWNLOAD_LINK=$DOWNLOAD_FULLPATH + DOWNLOAD_FILE=$(basename "$DOWNLOAD_FULLPATH") +POL_Debug_Message "# DOWNLOAD_LINK=$DOWNLOAD_LINK" +POL_Debug_Message "# MD5=$MD5" + POL_Download "$DOWNLOAD_LINK" "$MD5" + INSTALLER="$POL_System_TmpDir/$DOWNLOAD_FILE" fi -[ -z "$INSTALLER" ] && exit -1 - -# Setting prefix path -POL_Wine_SelectPrefix "$PREFIX" -POL_Wine_PrefixCreate - -POL_Wine_WaitBefore "$TITLE" +########################### +# Run Wine installation +if [ -f "$INSTALLER" ]; then + MSG="Installation in progress." + POL_SetupWindow_wait "$(eval_gettext '$MSG')" "$TITLE" + POL_Wine_WaitBefore "$TITLE" ########### # The installer consistently crashes wine and, # POL_Wine will show an error message. # However, the app then runs smoothly, so let's not bother. -export POL_IgnoreWineErrors="True" -POL_Wine "$INSTALLER" - -POL_Shortcut "$EXECUTABLE_FILE" "$TITLE" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;" - + export POL_IgnoreWineErrors="True" + POL_Wine "$INSTALLER" +########################### +# Get Installed Version + VERSION_INSTALLED="" + POL_Debug_Message "# WINEPREFIX: $WINEPREFIX" + VERSION_FILE="$WINEPREFIX/drive_c/Program Files/mp3DirectCut/Version.txt" + POL_Debug_Message "# VERSION_FILE=$VERSION_FILE" + [ ! -f "$VERSION_FILE" ] && POL_Debug_Message "file not found $VERSION_FILE" + [ -f "$VERSION_FILE" ] && VERSION_INSTALLED=`head -5 "$VERSION_FILE" | grep "20" | cut -d "," -f 1` +POL_Debug_Message "# VERSION_INSTALLED: $VERSION_INSTALLED" +########################### +# Create Shortcut + LAUNCHER="$TITLE" + [ ! -z "$VERSION_INSTALLED" ] && LAUNCHER="$TITLE-v$VERSION_INSTALLED" +POL_Debug_Message "# LAUNCHER: $LAUNCHER" + POL_Shortcut "mp3DirectCut.exe" "$LAUNCHER" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;" +fi +cd $PWD_OLD POL_System_TmpDelete - + POL_SetupWindow_Close -exit \ No newline at end of file +exit New source code#!/usr/bin/env playonlinux-bash [ "$PLAYONLINUX" = "" ] && exit 0 source "/usr/share/playonlinux/lib/sources" ###################### # global parameters TITLE="mp3DirectCut" PREFIX="mp3DirectCut" AUTHOR="Volker Fröhlich" EDITOR="Martin Pesch" EDITOR_URL="https://mpesch3.de/" FILE="mp3DC232.exe" MD5="" DOWNLOAD_PATH="https://maddownload.com/audio-video/audio-editors/mp3directcut/download/" ###################### # show POL Window POL_SetupWindow_Init POL_Debug_Init POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$EDITOR_URL" "$AUTHOR" "$PREFIX" ###################### # create PREFIX environment POL_Wine_SelectPrefix "$PREFIX" POL_System_SetArch "x86" POL_Wine_PrefixCreate Set_OS "win7" POL_System_TmpCreate "$PREFIX" PWD_OLD=`pwd` cd "$POL_System_TmpDir" || POL_Debug_Fatal "Unable to change directory" POL_Debug_Message "# WINEPREFIX: $WINEPREFIX" POL_Debug_Message "# PREFIX: $PREFIX" POL_Debug_Message "# POL_System_TmpDir: $POL_System_TmpDir" ###################### # user choice: # local installer vs. download from $DOWNLOAD_PATH INSTALLER="" POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD" if [ "$INSTALL_METHOD" = "LOCAL" ]; then ###################### # user selects installer POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" INSTALLER="$APP_ANSWER" elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then ###################### POL_Debug_Message "# download HTML page and get download link to installer" wget -P "$POL_System_TmpDir/" "$DOWNLOAD_PATH" DOWNLOAD_FULLPATH=`cat $POL_System_TmpDir/index.html | grep '.exe' | grep 'href=' | cut -d '"' -f 2` ###################### # download installer POL_Debug_Message "# download installer" DOWNLOAD_LINK=$DOWNLOAD_FULLPATH DOWNLOAD_FILE=$(basename "$DOWNLOAD_FULLPATH") POL_Debug_Message "# DOWNLOAD_LINK=$DOWNLOAD_LINK" POL_Debug_Message "# MD5=$MD5" POL_Download "$DOWNLOAD_LINK" "$MD5" INSTALLER="$POL_System_TmpDir/$DOWNLOAD_FILE" fi ########################### # Run Wine installation if [ -f "$INSTALLER" ]; then MSG="Installation in progress." POL_SetupWindow_wait "$(eval_gettext '$MSG')" "$TITLE" POL_Wine_WaitBefore "$TITLE" ########### # The installer consistently crashes wine and, # POL_Wine will show an error message. # However, the app then runs smoothly, so let's not bother. export POL_IgnoreWineErrors="True" POL_Wine "$INSTALLER" ########################### # Get Installed Version VERSION_INSTALLED="" POL_Debug_Message "# WINEPREFIX: $WINEPREFIX" VERSION_FILE="$WINEPREFIX/drive_c/Program Files/mp3DirectCut/Version.txt" POL_Debug_Message "# VERSION_FILE=$VERSION_FILE" [ ! -f "$VERSION_FILE" ] && POL_Debug_Message "file not found $VERSION_FILE" [ -f "$VERSION_FILE" ] && VERSION_INSTALLED=`head -5 "$VERSION_FILE" | grep "20" | cut -d "," -f 1` POL_Debug_Message "# VERSION_INSTALLED: $VERSION_INSTALLED" ########################### # Create Shortcut LAUNCHER="$TITLE" [ ! -z "$VERSION_INSTALLED" ] && LAUNCHER="$TITLE-v$VERSION_INSTALLED" POL_Debug_Message "# LAUNCHER: $LAUNCHER" POL_Shortcut "mp3DirectCut.exe" "$LAUNCHER" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;" fi cd $PWD_OLD POL_System_TmpDelete POL_SetupWindow_Close exit SvarÄndrat av VolkerFroehlich |
VolkerFroehlich | Tuesday 18 August 2020 at 12:04 |
VolkerFroehlich
|
InformationThis update has been approved by the team. Differences@@ -0,0 +1,68 @@ +#!/usr/bin/env playonlinux-bash +# Date : (2020-08-18 12:00) +# Last revision : (2020-08-18 12:00) +# 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 +#!/usr/bin/env playonlinux-bash +[ "$PLAYONLINUX" = "" ] && exit 0 +source "$PLAYONLINUX/lib/sources" + +TITLE="mp3DirectCut" + +PREFIX="mp3DirectCut" +AUTHOR="Volker Fröhlich" +EDITOR="Martin Pesch" +EDITOR_URL="https://mpesch3.de/" + +EXECUTABLE_FILE="mp3DirectCut.exe" +MD5="a4043199945edd9023e2274445b6d528" + +# 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" +cd "$POL_System_TmpDir" || POL_Debug_Fatal "Unable to change directory" + +POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD" + +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 + DOWNLOAD_LINK="https://kubadownload.com/site/assets/files/2452/mp3DC230.exe" + DOWNLOAD_FILE=$(basename $DOWNLOAD_LINK) + POL_Download "$DOWNLOAD_LINK" "$MD5" + INSTALLER="$POL_System_TmpDir/$DOWNLOAD_FILE" +fi +[ -z "$INSTALLER" ] && exit -1 + +# Setting prefix path +POL_Wine_SelectPrefix "$PREFIX" +POL_Wine_PrefixCreate + +POL_Wine_WaitBefore "$TITLE" +########### +# The installer consistently crashes wine and, +# POL_Wine will show an error message. +# However, the app then runs smoothly, so let's not bother. +export POL_IgnoreWineErrors="True" +POL_Wine "$INSTALLER" + +POL_Shortcut "$EXECUTABLE_FILE" "$TITLE" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;" + +POL_System_TmpDelete + +POL_SetupWindow_Close +exit \ No newline at end of file New source code#!/usr/bin/env playonlinux-bash # Date : (2020-08-18 12:00) # Last revision : (2020-08-18 12:00) # 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 #!/usr/bin/env playonlinux-bash [ "$PLAYONLINUX" = "" ] && exit 0 source "$PLAYONLINUX/lib/sources" TITLE="mp3DirectCut" PREFIX="mp3DirectCut" AUTHOR="Volker Fröhlich" EDITOR="Martin Pesch" EDITOR_URL="https://mpesch3.de/" EXECUTABLE_FILE="mp3DirectCut.exe" MD5="a4043199945edd9023e2274445b6d528" # 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" cd "$POL_System_TmpDir" || POL_Debug_Fatal "Unable to change directory" POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD" 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 DOWNLOAD_LINK="https://kubadownload.com/site/assets/files/2452/mp3DC230.exe" DOWNLOAD_FILE=$(basename $DOWNLOAD_LINK) POL_Download "$DOWNLOAD_LINK" "$MD5" INSTALLER="$POL_System_TmpDir/$DOWNLOAD_FILE" fi [ -z "$INSTALLER" ] && exit -1 # Setting prefix path POL_Wine_SelectPrefix "$PREFIX" POL_Wine_PrefixCreate POL_Wine_WaitBefore "$TITLE" ########### # The installer consistently crashes wine and, # POL_Wine will show an error message. # However, the app then runs smoothly, so let's not bother. export POL_IgnoreWineErrors="True" POL_Wine "$INSTALLER" POL_Shortcut "$EXECUTABLE_FILE" "$TITLE" "" "" "AudioVideo;Audio;AudioVideoEditing;Music;" POL_System_TmpDelete POL_SetupWindow_Close exit SvarTuesday 18 August 2020 at 16:28
|
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 dmca-notice@playonlinux.com