Forums

Install Tree[d] (tree blender)

install test

Auteur Réponses
lahtis Jeudi 14 Février 2013 à 11:46
lahtis

tree[d] is an easy to use tree generator!

Tested:
Playonlinux: 4.1.9
wine: system or 1.5.17    (wine version 1.5.23 fonts not working)
Ubuntu 12.10

#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
 
if [ "$POL_LANG" = "fr" ] ; then
        DL_TREED="Patientez pendant le téléchargement de Tree[d]"
else
        DL_TREED="Please wait during downlad of Tree[d]"
fi
cd $REPERTOIRE/tmp/
rm *.png
POL_SetupWindow_Init "" ""
 
POL_SetupWindow_presentation "Tree[d]" "Giles" "http://www.frecle.net" "" "Treed"
 
select_prefixe "$REPERTOIRE/wineprefix/Treed/"
POL_SetupWindow_prefixcreate
 
Set_OS "winxp"
cd $REPERTOIRE/tmp
 
POL_SetupWindow_download "$DL_TREED" "Treed" "http://www.frecle.net/treed/tree[d]-setup310.exe"
 
POL_SetupWindow_wait_next_signal "Please wait while Tree[d] is installed" "Treed"
wine "tree[d]-setup310.exe" /quiet
POL_SetupWindow_detect_exit
POL_SetupWindow_reboot
POL_SetupWindow_make_shortcut "Treed" "Program Files\\gile[s]\\plugins\\tree[d]" "tree[d].exe" "" "Treed"
POL_SetupWindow_message "Tree[d] has been successfully installed" "Treed"
POL_SetupWindow_Close
exit

Installer working, but shorcut creater not create correct shorcut.
PlayonLinux crash with the Tree[d] filename.  This [d] causing the problem.
Im tested this: renamed manually the filename and shortcut works.

Error in POL_Shortcut
Binary not found: tree[d].exe
Binary is correct location. How to renamed the binary in the script or....
??


Using Ubuntu 18.04.4 LTS and latest Playonlinux.
My scripts: https://github.com/lahtis/playonlinux
petch Jeudi 14 Février 2013 à 12:18
petch

Hi,
PlayOnLinux uses find -iname, which uses fnmatch(), hence the need to escape ?s, *s and []s. Try
POL_Shortcut 'tree\\[d\\].exe' "Tree[d]"


Beside that, it looks like you used a PlayOnLinux 3 script as an example, and many things are obsolete by today's coding standards:
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi

That's a bit syntactically heavy, we tend to standardize on
 [ -z "$PLAYONLINUX" ] && exit 0


if [ "$POL_LANG" = "fr" ] ; then
        DL_TREED="Patientez pendant le téléchargement de Tree[d]"
else
        DL_TREED="Please wait during downlad of Tree[d]"
fi

Use $(eval_gettext '') to handle translation, see http://www.playonmac.com/en/dev-documentation-10.html

cd $REPERTOIRE/tmp/
rm *.png

Beside the fact that cleaning the temp directory shouldn't be of much concern for install scripts (POL cleans this directory when it starts anyway), and if it does it'd better create a private temp directory and trash it in the end instead (POL_System_TmpCreate), what PNG files will you remove if the cd fails?
This is a dangerous style.

POL_SetupWindow_Init "" ""

New scripts should have a POL_Debug_Init call just after that, too

select_prefixe "$REPERTOIRE/wineprefix/Treed/"
POL_SetupWindow_prefixcreate

PlayOnLinux 4 uses POL_Wine_SelectPrefix and POL_Wine_PrefixCreate instead.

POL_SetupWindow_wait_next_signal "Please wait while Tree[d] is installed" "Treed"
wine "tree[d]-setup310.exe" /quiet
POL_SetupWindow_detect_exit

Use of "naked" wine is prohibited, you should use POL_Wine instead (otherwise the command won't be correctly logged, for example)
Also POL_SetupWindow_wait_next_signal and POL_SetupWindow_detect_exit are deprecated, try POL_Wine_WaitBefore "$TITLE" before POL_Wine, or POL_Wine_WaitExit "$TITLE" after (shouldn't neen both).

POL_SetupWindow_make_shortcut "Treed" "Program Files\\gile[s]\\plugins\\tree[d]" "tree[d].exe" "" "Treed"

POL_SetupWindow_make_shortcut is deprecated, use the POL_Shortcut command described at the beginning of this message.

Regards,
Pierre.
lahtis Lundi 18 Février 2013 à 12:18
lahtis

i have a change the script. Now script working. Thanks for help.

[code]
#!/bin/bash
# Date : (2013-02-18)
# Last revision : (2013-02-18)
# Distribution used to test : Ubuntu 12.10 LTS
# Author : lahtis
# Licence : GPLv3
# PlayOnLinux: 4.1.9

[-z "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

PREFIX="treed"
WINEVERSION="1.5.17"
TITLE="Tree[d]"
EDITOR="Giles"
GAME_URL="http://www.frecle.net"
AUTHOR="lahtis"

#Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init

POL_Debug_Init

# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WINEVERSION"
POL_System_TmpCreate "Treed"

# Configuration
Set_OS "winxp"

# Select install method
POL_SetupWindow_InstallMethod "LOCAL, DOWNLOAD"
if [ "$INSTALL_METHOD" = "LOCAL" ]
then
POL_SetupWindow_browse "Please select the installation file to run." "$TITLE installation"
POL_SetupWindow_wait "Installation in progress." "$TITLE installation"
POL_Wine start /unix "$APP_ANSWER"
POL_Wine_WaitExit "$TITLE"


elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
cd "$POL_System_TmpDir"
POL_Download "http://www.frecle.net/treed/tree[d]-setup310.exe"
POL_SetupWindow_wait "Installation in progress." "$TITLE installation"
POL_Wine start /unix "tree[d]-setup310.exe"
POL_Wine_WaitExit "$TITLE"
fi
POL_System_TmpDelete


# Create Shortcuts
POL_Shortcut 'tree\\[d\\].exe' "$TITLE"

POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')" "$TITLE"

POL_SetupWindow_Close

exit
[/code]

tree[d] is an easy to use tree generator!

An accessible user interface allows you to create nearly any type of tree within minutes. Use the included media to try out the many options, to create realtime trees for your games or visualizations.

Once you have created your perfect tree, make an infinite number of variations by clicking a single button. And export the tree as a 3D model or as a billboard texture.

Export 3D models to .x, .obj or .b3d

Best of all tree[d] is free to use, and you can include the trees you make in your own projects, commercial or free, as long as they are not model packs, texture packs, 3D model generators, or texture generators.


image


Edité par lahtis


Using Ubuntu 18.04.4 LTS and latest Playonlinux.
My scripts: https://github.com/lahtis/playonlinux
petch Lundi 18 Février 2013 à 14:18
petch

Looks great! Feel free to submit the script for inclusion in the scripts repository:
Supported software (to the left of pages) > New Installer
and when you're done click to ask for signing and publication (I can never remember the exact wording, but shouldn't be difficult to find).

Regards,
Pierre.
lahtis Lundi 18 Février 2013 à 19:44
lahtis

i send this script to reposition but i select wrong options. Please move the script multimedia to graphics. Sorry.

Using Ubuntu 18.04.4 LTS and latest Playonlinux.
My scripts: https://github.com/lahtis/playonlinux
petch Lundi 18 Février 2013 à 20:01
petch

No worries.
I removed the "No-cd required" flag, because I suppose you interpreted it as "no cd required", which is not the same thing, quite the opposite in fact; And it wouldn't make much sense for a free-to-use program to have a DRM attached!
Talking about flags, you set the "testing" flag so the install script shows as "beta" and will only appear to people including beta scripts in their searches; And also, you didn't check the "PlayOnMac" compatible flag, so your script will only available from Linux. Most scripts work for both, so it could be worth enabling (and then check that it effectively works, of course).

Regards,
Pierre.
lahtis Mardi 19 Février 2013 à 22:58
lahtis

yeah!

Using Ubuntu 18.04.4 LTS and latest Playonlinux.
My scripts: https://github.com/lahtis/playonlinux

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