El Foro

[Script] EVE online

mmorpg

Autor Respuestas
Jump to the page: 1 - 2
l0ser140 Wednesday 20 March 2013 at 13:24
l0ser140Anonymous

Game marked as silver on winehq.org.

Eve Online is a video game by CCP games. It is a player-driven, persistent-world MMORPG set in a science fiction space setting.

I posted code in simple code tag because "language=playonlinux" broke layout. I have no idea why.
[code language=playonlinux]#!/bin/bash
# Date : (2013-03-20)
# Last revision : (2013-03-20)
# Wine version used : 1.5.26
# Distribution used to test : Arch x86_64
# Licence : GPLv3
# PlayOnLinux : 4.1.9
# Author : l0ser140

POL_Wine_DelOverrideDLL()
{
    # Delete override DLLs
    cat << EOF > "$POL_USER_ROOT/tmp/del-override-dll.reg"
REGEDIT4

[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\DllOverrides]
EOF

    while test "$1" != ""
    do
        echo "\\"$1\\"=-" >> "$POL_USER_ROOT/tmp/del-override-dll.reg"
        shift
    done
    POL_Debug_Message "Deleting overrides DLLs"
    POL_SetupWindow_wait_next_signal "Please wait" "$TITLE"
    POL_Wine regedit "$POL_USER_ROOT/tmp/del-override-dll.reg"
}

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

PREFIX="EVEonline"
WINEVERSION="1.5.26"
TITLE="EVE online"
EDITOR="CCP games"
GAME_URL="http://www.eveonline.com"
AUTHOR="l0ser140"
GAME_VMS="128"

# 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_System_SetArch "x86"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINEVERSION"

# Dependencies
POL_Call POL_Install_vcrun2008

# Overriding dlls
POL_Wine_DelOverrideDLL "*msvcr90"
POL_Wine_OverrideDLL "" "d3d11"
POL_Wine_OverrideDLL_App "launcher.exe" "native,builtin" "msvcr90"
POL_Wine_OverrideDLL_App "repair.exe" "native,builtin" "msvcr90"

# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS

POL_SetupWindow_message "$(eval_gettext 'Requires about 18Gb free space.\\n\\n
As well, an additional 5Gb in your /home/ folder if you will use online installer.\\n
Recommend using offline installer.')" "$TITLE"

# Installation
POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
if [ "$INSTALL_METHOD" = "LOCAL" ]
then
    POL_SetupWindow_question "$(eval_gettext 'You want to open $TITLE download page in your browser?')" "$TITLE"
    if [ "$APP_ANSWER" = "TRUE" ]
    then
        POL_Browser "http://community.eveonline.com/download/?fallback=1&"
    fi
    POL_SetupWindow_browse "$(eval_gettext 'Please select $TITLE install file:')" "$TITLE"

    POL_Wine_WaitBefore "$TITLE"
    POL_Wine "$APP_ANSWER"
    POL_Wine_WaitExit "$TITLE"

elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
    # Check latest EVE version to download it
    POL_SetupWindow_wait "$(eval_gettext 'Checking latest version...')" "$TITLE"
    check_one "wget" "wget"
    check_one "sed" "sed"
    POL_SetupWindow_missing
    version=`wget -q -O - http://community.eveonline.com/download/ | sed -n 's;.*<a class="win" href="http://content\\.eveonline\\.com/\\([0-9]*\\)/.*">.*</a>.*;\\1;p'`

    if [ -n "$version" ]
    then
        # Create temp folder
        POL_System_TmpCreate "$PREFIX"
        cd "$POL_System_TmpDir"
        # Download online installer
        POL_Download "http://content.eveonline.com/${version}/EVE_Online_Installer_${version}.exe"

        POL_Wine_WaitBefore "$TITLE"
        POL_Wine "$POL_System_TmpDir/EVE_Online_Installer_${version}.exe"
        POL_Wine_WaitExit "$TITLE"

        POL_System_TmpDelete
    else
        POL_Debug_Fatal "Error while checking $TITLE version."
    fi
fi

# Create symbolic link for settings
POL_SetupWindow_question "$(eval_gettext 'You want to create symbolic link for $TITLE settings in your /home/ folder?\\n(Recommend yes.)')" "$TITLE"
if [ "$APP_ANSWER" = "TRUE" ]
then
    POL_SetupWindow_wait "$(eval_gettext 'Creating symlinks...')" "$TITLE"
    ccp_path="${WINEPREFIX}/drive_c/users/${USER}/Local Settings/Application Data/CCP"
    if [ ! -d "$HOME/EVE/settings" ]; then
        mkdir -p "$HOME/EVE/settings"
    fi
    if [ -d "${ccp_path}/EVE" ]; then
        mv "${ccp_path}/EVE" "${ccp_path}/EVE_old"
    else
        mkdir -p "$ccp_path"
    fi
    ln -s "$HOME/EVE/settings" "${ccp_path}/EVE"
fi

# Create Shortcuts
POL_Shortcut "eve.exe" "$TITLE"

POL_SetupWindow_message "$(eval_gettext "Known issues:\\n\\n1) Loading EULA on the first run can take a long (5min) time.\\n\\n2) The Captain's Quarters feature is broken for most (all?) users.\\nIf you crash after selecting a character try hitting escape at the login screen and disabling Captain's Quarters under the graphics selection.\\n(This feature is considered useless by most Eve Players.)")" "$TITLE"
POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.')" "$TITLE"

POL_SetupWindow_Close
exit 0
[/code]





Editado por: l0ser140

Ronin DUSETTE Wednesday 20 March 2013 at 15:47
Ronin DUSETTE

SWEET! I love Eve. I have always wanted to play Dust, as well.

The only thing that I see right off the bat, is the VMS setting. You should ask the user, as if you dont specify, Wine can only use, I think about 128 mb, but if you specify that your card has 1GB, it will use it. Make it ask the user, but if there is a minimum MB limit, make sure you state that when asking the user to state their VMS size.

Other than that, it looks good. Same with all of the icons and everything.

Correct that, and then submit it in the Supported Software portion of this site by going there, clicking New Installer, fill out the form, and submit for signing, as per the sticky at the top of the page regarding script standards.

Cant wait to install this one. :) Guess I gotta get another account. haha

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
petch Wednesday 20 March 2013 at 17:12
petch

POL_SetupWindow_VMS asks the user how much video memory his videocard has, and writes that into the registry. It also caches the answer so the user is only asked once.
Its parameter is the minimal amount of memory required for the game, or whatever application is being installed. Its only use is, if the amount entered by the user is below that value, it also issues a warning.

Editado por: petch

Ronin DUSETTE Wednesday 20 March 2013 at 17:18
Ronin DUSETTE

Oh. I thought that was just in there so that when it asked, it automatically just used that one.

We should really look into that feature request where you suggested to create a wiki to get started on getting a compendium of info on all of this in one spot.

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
l0ser140 Wednesday 20 March 2013 at 17:36
l0ser140Anonymous

So POL_SetupWindow_VMS was used correctly?
Also what you would say about using "start /unix", coz I cant understand why it is used in other scripts.
Ronin DUSETTE Wednesday 20 March 2013 at 17:40
Ronin DUSETTE

If petch says it was used correctly, then it was. His coding background far surpasses mine. :) Im learning, though. haha

As for the start /unix, Im not sure. I know who will, though. haha

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
petch Wednesday 20 March 2013 at 18:42
petch

@l0ser140: If the game requires a minimum of 128MB of memory onboard videocard, then that's correct.

start /unix is seldom necessary (personally I only experienced it once; I've been told it's also needed in some cases where CDROMs are involved, but I can't tell). On the other hand, it has the drawback of "detaching" the Windows programs launched that way, and they're not automatically killed if the install script is closed/aborted by the user.
So, as a general rule, don't use it unless you experienced that it is really necessary.


Personally I noticed that you do not use translation facility (eval_gettext) consistently, you should use it for all messages to the user, or some messages will never be translated.

Not a problem, but a tip: in sed syntax for substitution s///, the use of the slash character is purely conventional, you can use almost any other character. That can be useful when you already have slashes in the pattern or substitution texts, because then you don't need to backslash them (eg sed -n 's|.*<a class="win" href="http://content\\.eveonline\\.com/\\([0-9]*\\)/.*|\\1|p')

Editado por: petch

l0ser140 Wednesday 20 March 2013 at 18:53
l0ser140Anonymous

So, as a general rule, don't use it unless you experienced that it is really necessary.

Quote from petch
Well, I removed it from script.
How I can make changes in script which already waiting signature?
Source code page is blank.

Editado por: l0ser140

Ronin DUSETTE Wednesday 20 March 2013 at 18:58
Ronin DUSETTE

Personally I noticed that you do not use translation facility (eval_gettext) consistently, you should use it for all messages to the user, or some messages will never be translated.

Citar


Is the translation done automatically or something based on what uses (eval_gettext)? Just for my future reference when writing a script.

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
petch Wednesday 20 March 2013 at 20:11
petch

Is the translation done automatically or something based on what uses (eval_gettext)? Just for my future reference when writing a script.

Quote from DJYoshaBYD


It uses GNU gettext mechanisms (https://www.gnu.org/software/gettext/).
Basically this libraries allows to lookup for translation texts using the english text and the current "text domain" as a key.

gettext provides all the required parts:
- a function that can be used in the code to do those lookups at run time;
- tools to extract the english text 'keys' from those function calls in a separate file (.po), that can be enriched manually with the translation of each text, in the different languages;
- (tools to merge such files, etc.);
- a tool to compile those files in binary files (.mo) that allow for efficient lookups, for use by the translation function.

Translations are handled by a team of translators thru the Launchpad (https://launchpad.net/playonlinux).

All the repository scripts, at least, are in a single "text domain", that's why messages reused between scripts (including the "standard" messages) are immediately translatable with no effort, and should be highly encouraged.

Ronin DUSETTE Wednesday 20 March 2013 at 20:27
Ronin DUSETTE

Is the translation done automatically or something based on what uses (eval_gettext)? Just for my future reference when writing a script.

Quote from petch


It uses GNU gettext mechanisms (https://www.gnu.org/software/gettext/).
Basically this libraries allows to lookup for translation texts using the english text and the current "text domain" as a key.

gettext provides all the required parts:
- a function that can be used in the code to do those lookups at run time;
- tools to extract the english text 'keys' from those function calls in a separate file (.po), that can be enriched manually with the translation of each text, in the different languages;
- (tools to merge such files, etc.);
- a tool to compile those files in binary files (.mo) that allow for efficient lookups, for use by the translation function.

Translations are handled by a team of translators thru the Launchpad (https://launchpad.net/playonlinux).

All the repository scripts, at least, are in a single "text domain", that's why messages reused between scripts (including the "standard" messages) are immediately translatable with no effort, and should be highly encouraged.

Quote from DJYoshaBYD


:D :D I heart technology!

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
l0ser140 Wednesday 20 March 2013 at 21:10
l0ser140Anonymous

Hm... I have a small problem:
By the fact game doesnt need to override to native msvcr90 library. This requires only by launcher and updater.
But when I use the following code global overrides overlap app's overrides and app doesnt work.
[code]POL_Wine_OverrideDLL "builtin,native" "msvcr90"
POL_Wine_OverrideDLL_App "launcher.exe" "native,builtin" "msvcr90"
POL_Wine_OverrideDLL_App "repair.exe" "native,builtin" "msvcr90"
[/code]
How i can just delete override which placed by installing vcrun2008?

I want to use wine builtin lib for game and native lib for launcher only.


add: well, I created POL_Wine_DelOverrideDLL() function. May be you will add it to your library? It may be necessary for some cases. (I'm too lazy to do pull-request on github)
And finally I cant make changes in script with waiting for signature status.

Editado por: l0ser140

Ronin DUSETTE Thursday 21 March 2013 at 22:39
Ronin DUSETTE

You can submit your Function as a Feature Request in the Bugs part of this site.

If Im not mistaken, all of that is in the registry, though, Im not sure where.

And yes, once you submit it, it means you are done with it. Afterward, if changes need to be made, only a scripter, dev, or admin can change it.

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
l0ser140 Thursday 21 March 2013 at 22:52
l0ser140Anonymous

You can submit your Function as a Feature Request in the Bugs part of this site.

If Im not mistaken, all of that is in the registry, though, Im not sure where.

And yes, once you submit it, it means you are done with it. Afterward, if changes need to be made, only a scripter, dev, or admin can change it.

Quote from DJYoshaBYD
I created feature request with attached code.

So can you you give a signature
or reject script that I already have submited. I need to make changes and its will finally ready.

Editado por: l0ser140

Ronin DUSETTE Thursday 21 March 2013 at 23:00
Ronin DUSETTE

Ill remove the sig, then just resubmit it when done. Just keep it in mind for the future. :)

The eve script, correct?

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
l0ser140 Thursday 21 March 2013 at 23:05
l0ser140Anonymous

The eve script, correct?

Quote from DJYoshaBYD
Yup, "EVE online" title.
Also please check again script in first post. If all correct I'll submit it again.

Editado por: l0ser140

Ronin DUSETTE Thursday 21 March 2013 at 23:33
Ronin DUSETTE

Ok. I removed the sig. You should be able to edit it now. After you made the changes and tested, go ahead and resubmit.

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
l0ser140 Thursday 21 March 2013 at 23:45
l0ser140Anonymous

Thanks sir. I made changes and resubmit script.
Ronin DUSETTE Friday 22 March 2013 at 5:47
Ronin DUSETTE

Submit it for signing. Lol. I cannot see it as of yet.

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
petch Friday 22 March 2013 at 9:18
petch

@DJYoshaBYD: I can see it, sending direction in PM

@l0ser140:
POL_SetupWindow_message "$(eval_gettext 'If shortcut is not created automatically, do it yourself.')" "$TITLE"

That's a weird thing to say in an automated installer ;)
Does the problem still happen? If so, it'd better be investigated, that sounds (smells?) fishy...