#!/bin/bash # Copyright (C) 2007-2010 PlayOnLinux Team # Copyright (C) 2011 Pâris Quentin # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # PlayOnLinux / PlayOnMac Online [ "$PLAYONLINUX" = "" ] && exit source "$PLAYONLINUX/lib/sources" TITLE="$APPLICATION_TITLE Online" personal_scripts() { POL_Website_GET "$SITE/V4_data/repository/get_personal_list.php" POL_SetupWindow_menu "$(eval_gettext "This is the list of the scripts you sent to us. You can run one of them")" "$TITLE" "$(POL_Website_Result)" "~" POL_Website_GET "$SITE/V4_data/repository/get_file.php?id=$APP_ANSWER" POL_Website_Result > "$POL_USER_ROOT/install" cd "$POL_USER_ROOT" POL_SetupWindow_wait "$(eval_gettext "Running...")" "$TITLE" POL_Bash "install" } send_script() { POL_SetupWindow_message "$(eval_gettext "This tools will allow you to help us :")\n$(eval_gettext "If you have successfully installed a program with 'Install a non-listed\nsoftware' button, it will allow you to add this program in our list")\n\n$(eval_gettext "We're going to ask you some questions, please be as much accurate as\npossible")" "$TITLE" LIST="" cd "$POL_USER_ROOT/scripts" for file in * do LIST="$LIST~$file" done LIST="${LIST:1}" POL_SetupWindow_menu "$(eval_gettext "Choose the file corresponding to your program.")" "$TITLE" "$LIST" "~" SCRIPTFILE="$APP_ANSWER" script="$(cat "$SCRIPTFILE")" script="$(POL_Website_urlparse "$script")" POL_SetupWindow_question "$(eval_gettext "Does your program run?")" "$TITLE" if [ "$APP_ANSWER" = "TRUE" ] then POL_SetupWindow_textbox "$(eval_gettext "What is the title of your program?")" "$TITLE" SCRIPTTITLE="$APP_ANSWER" POL_SetupWindow_textbox "$(eval_gettext "What is the editor of your program?")" "$TITLE" EDITOR="$APP_ANSWER" POL_SetupWindow_textbox "$(eval_gettext "What is the editor website of your program?")" "$TITLE" "http://" URL="$APP_ANSWER" POL_SetupWindow_menu_num "$(eval_gettext "Select a category for your program")" "$TITLE" "$(eval_gettext "Other")~$(eval_gettext "Games")~$(eval_gettext "Accessories")~$(eval_gettext "Office")~$(eval_gettext "Internet")~$(eval_gettext "Multimedia")~$(eval_gettext "Graphics")~$(eval_gettext "Development")~$(eval_gettext "Education")~$(eval_gettext "Patches")~$(eval_gettext "Testing")" "~" CATEGORY="$APP_ANSWER" URL="$(printf $APP_ANSWER | sed s/\\//\\\\\\//g)" # J'adore ce genre de ligne la POL_SetupWindow_textbox_multiline "$(eval_gettext "What feature of your program does not work?\nIf everything works, please mention it")" "$TITLE" FEATURE="$APP_ANSWER" POL_SetupWindow_textbox_multiline "$(eval_gettext "Write any change you made to wine configuration here:")" "$TITLE" DESCRIPTION="Features $FEATURE Wine configuration : $APP_ANSWER" script="${script/'{SCRIPT_NAME}'/$SCRIPTTITLE}" script="${script/'{SCRIPT_EDITEUR}'/$EDITOR}" script="${script/'{SCRIPT_URL}'/$URL}" script="${script/'{SCRIPT_USER}'/$POL_LOGIN}" [ "$POL_OS" == "Mac" ] && repos="playonmac" [ "$POL_OS" == "Linux" ] && repos="playonlinux" POL_Website_Request "http://www.$repos.com/repository/new.php" "name=Generated $SCRIPTTITLE&send=Add" #POL_SetupWindow_message "Debug : premiere requete faite" "$TITLE" SCRIPT_ID="$(POL_Website_Result | grep '