Forums

[Script] Tanki Online

Auteur Réponses
rlarjsdn122 Lundi 27 Novembre 2017 à 16:42
rlarjsdn122Anonymous

Tanki Online is a popular Russian tank game.

#!/usr/bin/env playonlinux-bash
# Date : 2017-11-26
# Last revision : Current Version
# Wine version used : 1.7.55
# Distribution used to test : Ubuntu 10.04 LTS
# Author : rlarjsdn122
# Script licence : GPLv3
# Program licence : AlternativaPlatform

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

TITLE="Tanki Online"
PREFIX="tanki"

POL_SetupWindow_Init

POL_SetupWindow_presentation "$TITLE" "AlternativaPlatform" "http://tankionline.com/" "rlarjsdn122" "$PREFIX"

POL_SetupWindow_Init

POL_SetupWindow_message "Hello, Tanker! Welcome to installation of Tanki Online client for Linux.\nYou can connect to Tanki with web-browser.\nInstall this, if you do not want to play Tanki with browser." "Welcome"

POL_System_TmpCreate "tankitmp"

POL_Wine_SelectPrefix "$PREFIX"

cd "$POL_System_TmpDir"

POL_Download "http://s.eu.tankionline.com/resources/client/1/tankionline-eu.exe" "00eea89dd08a5c134f3f26cf6818344d"

INSTALLER="$POL_System_TmpDir/tankionline-eu.exe"

POL_Wine_PrefixCreate
POL_SetupWindow_VMS "512"
POL_Call POL_Install_corefonts
POL_Call POL_Install_d3dx9
POL_Call POL_Install_d3dcompiler_43
POL_Call POL_Install_flashplayer
POL_Call POL_Install_AdobeAir

POL_SetupWindow_wait "Please wait" "Installation in progress"
POL_Wine "$INSTALLER"

POL_System_TmpDelete

POL_Shortcut "Tanki Online.exe" "Tanki Online"

POL_SetupWindow_Close
exit

Screenshot

Install resources and images:

left -

top -

22x22 -

48x48 -

Edité par rlarjsdn122

LinuxScripter Samedi 3 Février 2018 à 11:09
LinuxScripterAnonymous

First of all we generally specify what version of wine will be used via

WORKING_WINE_VERSION=

Second of all why did you use this line twice?

POL_SetupWindow_Init

Also you have to add this line to include debug in the script. It's a very simple script I know but it never hurts anything

POL_Debug_Init

And you do not set up memory size in scripts since there are so many graphics cards out there. In 99% of games you do not have to do this.

This is the script after all the necesseary modifications to make it work:

#!/bin/bash
# Date : 2017-11-26
# Last revision : 2018-02-03 10:44
# Wine version used : 1.7.55, 3.0
# Distribution used to test : Ubuntu 10.04 LTS, 18.04 x64
# Author : rlarjsdn122 (original script), LinuxScripter
# Script licence : GPLv3
# Program licence : AlternativaPlatform

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Tanki Online"
PREFIX="tanki"
WORKING_WINE_VERSION="3.0"
 
POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_presentation "$TITLE" "AlternativaPlatform" "http://tankionline.com/" "rlarjsdn122" "$PREFIX"
 
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate

POL_System_TmpCreate "$PREFIX"

POL_Call POL_Install_corefonts
POL_Call POL_Install_d3dx9
POL_Call POL_Install_d3dcompiler_43
POL_Call POL_Install_flashplayer
POL_Call POL_Install_AdobeAir
 
cd "$POL_System_TmpDir"
 
POL_Download "http://s.eu.tankionline.com/resources/client/1/tankionline-eu.exe" "00eea89dd08a5c134f3f26cf6818344d"
 
INSTALLER="$POL_System_TmpDir/tankionline-eu.exe"
 
POL_SetupWindow_wait "Please wait" "Installation in progress"
POL_Wine "$INSTALLER"
 
POL_Shortcut "Tanki Online.exe" "Tanki Online"

POL_System_TmpDelete
 
POL_SetupWindow_Close
exit

Take a look and compare the two scripts and you should see what you did wrong. Not that I'm discouraging you from making more scripts - quite the oposite actually.


Tutul Samedi 3 Février 2018 à 19:06
Tutul

The command POL_SetupWindow_VMS "512" is used to ask how many VRAM the user has and set the default value to the ARG (here 512). It's mostly required for a better wine configuration


Gentils modérateur dans mes bon jours - Attention, à tenir hors de portée des enfants. En cas de contact, veuillez immédiatement rincer à l'eau clair. Peut provoquer des sueurs froide !
LinuxScripter Samedi 3 Février 2018 à 23:55
LinuxScripterAnonymous

 

The command POL_SetupWindow_VMS "512" is used to ask how many VRAM the user has and set the default value to the ARG (here 512). It's mostly required for a better wine configuration

 

You're right but I dont think a simple flash game will work any better with this command.


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