Fora

[Script]rFactor

Completely new script, without needing a crack

Autor Odpowiedzi
Ronin DUSETTE Saturday 13 April 2013 at 1:21
Ronin DUSETTE
Admin

Ok, so because a troubleshooting attempt earlier, I saw that this script is painfully out of date, and most of the POL commands are no longer used. I decided to write a new script.

This script works GREAT on Linux. Like, everything works. And I get a super clean game, as well. It really does run smooth. 

Mac, however, I cannot fully test. Here is the thing:

The issue I was working with earlier, was with the game working, but you couldnt activate it (couldnt open a browser/wine crashes). This issue is corrected in this script (mainly because of the newer Wine version).

This worked fine on a VIRTUAL MACHINE of OSX Mountain Lion. You can pay for and activate it no problem..... BUT I kept getting direct rendering errors, and thats for sure because Im running OSX in virtualbox, which stops me from actually testing it on a TRUE mac system. 

Anyway. Here is the script. Ill post up resources later. 

Mac users. Help me test the demo? :)

[code language=playonlinux]

#!/bin/bash
# Date : (2013-04-12)
# Last revision : (2013-04-12)
# Distribution used to test : Kubuntu 12.04.2 LTS 64-bit
# Author : DJYoshaBYD
# Licence : GPLv3
# PlayOnLinux: 4.2.1
    
    
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
    
PREFIX="rFactor12"
WINEVERSION="1.4.1"
TITLE="rFactor"
EDITOR="Image Space Incorporated"
GAME_URL="http://www.rfactor.net/"
AUTHOR="DJYoshaBYD"
    
#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_SetupWindow_browse "$(eval_gettext 'Please select $TITLE install file. Do NOT run rFactor after install has finished. Let DirectX install when asked. Make sure you set a 32-bit resolution when rFactor Config comes up.')" "$TITLE"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINEVERSION"
    
#Dependencies
POL_Call POL_Install_dxfullsetup

# Configuration
Set_OS "winxp"

# Installation
POL_Wine_WaitBefore "$TITLE"
POL_Wine "$APP_ANSWER"
POL_Wine_WaitExit "$TITLE"
    
# Create Shortcuts
POL_Shortcut "rFactor.exe" "$TITLE"
   
POL_SetupWindow_Close
exit 0

[/code]


Thanks!


Edytowane przez RoninDusette


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
Ronin DUSETTE Saturday 13 April 2013 at 1:40
Ronin DUSETTE
Admin

When I check code quality, it says that there are errors, but when I run the script checker, I get:

Remove signature                    [ Ok ]
Checking script syntax                    [ Ok ]
Checking $TITLE                         [ rFactor ]
Checking forbidden functions               [ Ok ]
Checking deprecated functions               [ Ok ]
Checking exit                         [ exit 0 ]
Checking convert scale absence               [ Ok ]
Checking make icon for shortcut absence          [ Ok ]
Checking POL_Debug_Init presence          [ Ok ]
Checking winetricks absence               [ Ok ]
Checking ProgramFile detection absence          [ Ok ]
Checking cdrom find absence               [ Ok ]
Checking old wine version absence : 0.9.x     [ Ok ]
Checking old wine version absence : 1.0.x     [ Ok ]
Checking old wine version absence : 1.1.x     [ Ok ]
Checking LNG strings absence               [ Ok ]
Checking $REPERTOIRE absence               [ Ok ]
Checking #!/bin/bash presence               [ Ok ]
Checking $PROGRAMFILES exist before use          [ Ok ]
Checking source "$PLAYONLINUX/lib/sources"     [ Ok ]
Checking no path .../drive_c/Program Files/...     [ Ok ]
Checking POL_SetupWindow_Init and Close          [ Ok ]
Checking $WINEPREFIX exist before use          [ Ok ]
Checking POL_Call POL_Function_OverrideDLL     [ Ok ]
Checking rm "$POL_USER_ROOT/tmp/*.jpg"     [ Ok ]
Checking old modifcations registry               [ Ok ]
Checking POL_Function_FontsSmoothRGB missing POL_Call     [ Ok ]
Checking bad gettext messages               [ Ok ]
Checking absence short prefix name     [ Ok ]
Checking possible to extract string               [ Ok ]
Checking absence messages delimited by doubles-quotes     [ Ok ]
Checking no disabled mmdevapi.dll with wine >= 1.4     [ Ok ]


So I think its good, and that the script checker on the site is giving a false positive.

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
Ronin DUSETTE Saturday 13 April 2013 at 2:21
Ronin DUSETTE
Admin

Here are some of the Icon resources. I only have 2. I dont have time to make left.jpg right now, but Im sure that we could totally re-use left. and top. from the old rFactor script.

http://djyoshabyd.quicktech209.com/repository/Resources/Icons/rFactor/

petch - would you be able to help facilitate this? I dont have FTP access. :)

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 Saturday 13 April 2013 at 2:25
petch
Developer

I think code quality is computed only once a day, sadly (http://www.playonlinux.com/en/issue-1925.html)

But if you want an old school manual review:
$TITLE doesn't match script name, which will break bug reporting. I'm not sure + is allowed in script names either, see how Notepad++ script is called "Notepad", mmmh...
Ronin DUSETTE Saturday 13 April 2013 at 2:32
Ronin DUSETTE
Admin

ok. can you make that change for me real quick? Im just getting ready to step away from the computer, and will only be available via wifi on my phone. :)

Ill make sure to keep that in mind for later on.

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 Saturday 13 April 2013 at 2:43
petch
Developer

Called it "rFactor 12", to avoid name collision with existing script
T0Be Saturday 13 April 2013 at 20:03
T0BeAnonymous

I tried the install script on the mac. The demo works ok but I can't activate the full version.

Here is what I did during installation:


PlayOnMac
     You try to open a script designed for PlayOnLinux! It might not work as expected
     -> [OK]
-> Installation Assistant
     -> [Continue]
-> Find install file
     -> [Continue]
-> gecko installation
-> directx runtime installation
-> microsoft xaudio2
     CPU does not meet minimum requirement; Streaming SIMD Extensions support required -> [OK]
registering of libraries
-> microsoft xaudio2
     CPU does not meet minimum requirement; Streaming SIMD Extensions support required -> [OK]
-> PlayOnMac Error
     Error in POL_Wine
     Wine seems to have crashed

     If your application continues to run, ignore this message

     -> [Continue]
-> rFactor installation
     -> [Continue]
     -> [Accept] (License)
     -> [Continue] (Install path)
     -> [Install] (Menu)
     … decompressing…
-> DirectX 9 installation
     -> [Continue] (License)
     -> [Continue]
     -> [Done]
     -> [Continue]
-> gMotor 2 : Video Setup v1.8
     Hardware Error
     Insufficient video memory detected. A minimum of 64MB of free video Memory required.
     Press continue to try playing anyway.
     -> [Continue]
-> gMotor 2 : Video Setup v1.8
     Hardware Error
     Insufficient video memory detected. A minimum of 64MB of free video Memory required.
     Press continue to try playing anyway.
     -> [Continue]
-> rFactor Installation
     Links on Desktop
     -> [Finish]
PlayOnMac Assistant
     An error occurred during the installation process
     Do you want to send the bug to PlayOnMac?
     -> [Yes]
Ronin DUSETTE Saturday 13 April 2013 at 20:21
Ronin DUSETTE
Admin

TOBe - Hey. Dont copy, and paste your response from your bug report to the forums. One or the other. :)

Like I stated in your bug report, this has to be your computer not opening up your web browser, because I could do it absolutely fine.

Also, you know you can just go to their site and activate, without even clicking the ACTIVATE button in the games menu?

BUT, that notwithstanding, I simply clicked it and it came up. Can you install chrome and check to see if it pulls it up in there?

Even though I couldnt test the game, your original issue was that you couldnt click the activation screen. Since I created the script, this is possible, at least for me.

Try to install chrome, just to test it to see if it opens. It should with no issues. If it does it with chrome and not safari, then there must be a problem with the way its making calls to the web browser of the system.

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
T0Be Saturday 13 April 2013 at 21:11
T0BeAnonymous

Sorry, about the double post.

As before the purchase button opens up the browser (safari, chrome and firefox) just fine, but the activate button does nothing. I also tried with chrome and firefox as the system default browser as well without luck.

Could you point me to the site where I can activate, I'd be happy to do so if it worked.

Thanks heaps for your assistance.
Ronin DUSETTE Saturday 13 April 2013 at 21:30
Ronin DUSETTE
Admin

Can you post a screenshot of the screen that shows the activate button? I think we are getting confused on which screen we are talking about. hahaha.

But yeah. post a screen shot of that window with the activate button so I can see if we are even looking at the same thing.

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
T0Be Saturday 13 April 2013 at 21:48
T0BeAnonymous

It's basicly this dialog I am refering to: http://rfactor.net/web/wp-content/uploads/2012/10/launcher-300x144.png
Ronin DUSETTE Sunday 14 April 2013 at 0:31
Ronin DUSETTE
Admin

Ok. Thats the one that I was talking about. Let me test it out a little bit more, and I will report back later. :)

Thanks for doing that. It cleared up a few things for me. Wrong screen.

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
T0Be Sunday 14 April 2013 at 23:08
T0BeAnonymous

Allright. Let me know if there is anything I can do.