Hello,
Ça tombe bien, je viens justement de me prendre la tête avec le même cas que toi il y quelques jours.
Du coup, c'est encore tout frais dans ma tête.
Pour aller vite, je vais te copier-coller le contenu des fichiers utiles et leurs chemins pour un exemple de 2 jeux différents que j'ai installé ici :
Streets of Rage Remake sous "E:\HyperSpin\Emulators\RomFiles\PC\SorR\SorR.exe"
Turbo Sliders sous "E:\HyperSpin\Emulators\RomFiles\PC\Turbo Sliders\sliders.exe"
- Databases pour la roue d'Hyperspin que j'ai préalablement créée depuis HyperHQ et nommée "Jeux PC" :
"E:\HyperSpin\Databases\Jeux PC\
Jeux PC.xml"
<menu>
<game name = "SorR">
<description>Streets of Rage Remake</description>
<manufacturer>BomberGames</manufacturer>
<year>2011</year>
<type></type>
</game>
<game name = "sliders">
<description>Turbo Sliders</description>
<manufacturer>Jollygood Games</manufacturer>
<year>2003</year>
<type></type>
</game>
</menu>
Rien de notable.
Principe classique pour toutes les roues d'Hyperspin.
- Fichier HyperList (modules) pour le lancement de jeux PC trouvé sur le site
d'Hyperspin :
"E:\HyperSpin\Modules\Jeux PC\
Jeux PC.ahk"
;----------------------------------------------------------------------------
; Application Launcher
; PCLauncher
; by djvj
; 1.5
;
; Notes:
; Use the example Settings.ini in your Modules\PCLauncher\ folder to add more applications.
; Read the comments at the top of Settings.ini for the definitions of each key.
;----------------------------------------------------------------------------
If 0 < 1
{ MsgBox,,,Please run this through HyperSpin,2
ExitApp
}Else
Goto, Start
Start:
GUI_ID := FadeInStart()
SettingsFile := CheckFile(A_Scriptdir . "\Modules\" . systemName . "\Settings.ini")
iniLookup = ApplicationPath,ApplicationEXE,Parameters,PreLaunch,PreLaunchSleep,PostLaunch,PostLaunchSleep,ExitKey,FadeTitle
Loop, Parse, iniLookup, `,
{
IniRead, %A_LoopField%, %SettingsFile%, %romName%, %A_LoopField%
If ( %A_LoopField% = "ERROR" ) { ; Create keys if they do not exist in the ini
IniWrite, %A_Space%, %SettingsFile%, %romName%, %A_LoopField%
missingKeys = 1
}
}
If missingKeys
ScriptError("Created missing keys in Settings.ini for " . romName . "`nFill in your desired values and try again.")
;Verify Settings.ini parameters are set
CheckSettings()
If ( PreLaunch <> "" ) {
Run, "%PreLaunch%"
Sleep, %PreLaunchSleep%
}
Run, "%ApplicationPath%%ApplicationEXE%" %Parameters%, %ApplicationPath%,, AppPID
If FadeTitle {
WinWait, %FadeTitle%
WinWaitActive, %FadeTitle%
} Else {
WinWait, ahk_pid %AppPID%
WinWaitActive, ahk_pid %AppPID%
}
GUI_ID2 := FadeInExit()
Process, WaitClose, %AppPID%
If ( PostLaunch <> "" ) {
Run, "%PostLaunch%"
Sleep, %PostLaunchSleep%
}
GUI_ID4 := FadeOutExit()
WinActivate, HyperSpin
ExitApp
CheckSettings() {
global romName
global ApplicationPath
global ApplicationEXE
StringRight, ApplicationPathBackSlash, ApplicationPath, 1
If (romName = "")
ScriptError("Missing romName in Settings.ini")
If (ApplicationPath = "")
ScriptError("Missing ApplicationPath in Settings.ini")
If (ApplicationPathBackSlash != "\")
ScriptError("Make sure your ApplicationPath contains a backslash on the end.")
If (ApplicationEXE = "")
ScriptError("Missing ApplicationEXE in Settings.ini.")
CheckFile(ApplicationPath . ApplicationEXE)
}
CloseProcess:
If ExitKey ; fadeout will only take effect if an ExitKey method was set, otherwise fade will occur and application will not close
GUI_ID3 := FadeOutStart()
If ( ExitKey = "Process" )
Process, Close, %ApplicationEXE%
Else If ( ExitKey = "WinClose" && FadeTitle )
WinClose, %FadeTitle%
Else If ( ExitKey = "WinClose" )
WinClose, %ApplicationEXE%
Return
A accompagner dans le même répertoire du fichier Settings.ini suivant :
"E:\HyperSpin\Modules\Jeux PC\
Settings.ini"
# [romName] - The romName starts each section below. It must match your "game name" in your database.
# ApplicationPath - The directory your application resides in (this must end with a backslash).
# ApplicationEXE - The executable, batch, or shortcut (lnk file) residing in the ApplicationPath (this must end with the applications 3-letter extension).
# Parameters - This can be any number of parameters that you want to supply to your application.
# PreLaunch - This can be used to run another application before launching the ApplicationEXE. This will usually be blank. Use an absolute path and include any parameters on the one line
# PreLaunchSleep - If you need the script to wait after launching your PreLaunch app for a set amount of time, put that here (1000 = 1 second).
# ExitKey - Define a quick way, if desired, to exit your ApplicationEXE in case it doesn't close with your Hyperspin exit keys. Choices are Process or WinClose
#//////////////////////////// My Applications //////////////////////////////
[SorR]
ApplicationPath = E:\HyperSpin\Emulators\RomFiles\PC\SorR\
ApplicationEXE = SorR.exe
Parameters =
PreLaunch =
PreLaunchSleep =
PostLaunch =
PostLaunchSleep =
ExitKey = WinClose
FadeTitle=
[sliders]
ApplicationPath = E:\HyperSpin\Emulators\RomFiles\PC\Turbo Sliders\
ApplicationEXE = sliders.exe
Parameters =
PreLaunch =
PreLaunchSleep =
PostLaunch =
PostLaunchSleep =
ExitKey =
FadeTitle=
Pour chaque jeu, il faudra ajouter une section dans ce fichier, et éventuellement selon le cas, préciser dans la partie "ExitKey" la façon de quitter le jeu lorsqu'on presse Echap :
- "Process" force la fermeture du jeu "à la sauvage" comme depuis le gestionnaire des tâches.
- "WinClose" ferme le jeu via la fenêtre si ce dernier autorise cette manière de se couper.
- ou ne rien mettre pour quitter le jeu de manière classique
-
Partie subtile :
Par exemple dans le dossier où les jeux PC sont installés, il faut créer un fichier exe fictif, en partant un fichier txt vide que tu renommes par exemple " dummy.exe".
Ensuite, dans le même dossier que ce faux fichier exe, il faut ajouter autant de fichier txt vide qu'il y a de jeux.
Chacun de ces fichiers txt devra porter le nom de l'exe de chaque jeu.
En clair, dans mon cas, sous le dossier " E:\HyperSpin\Emulators\RomFiles\PC", j'ai ces 3 fichiers vides :
dummy.exe
SorR.txt
sliders.txt
Réglage des
Settings depuis HyperHQ :
Et voilà.
Tout ce bordel ne sert qu'à lancer et quitter basiquement un jeu quelconque depuis Hyperspin.
Il reste encore plein d'options pour par exemple associer automatiquement joytokey à certains jeu qui ne supportent pas nativement les manettes, etc ...
Mais je n'en suis pas encore là.
Pour la partie media, il n'y rien de particulier.
C'est comme pour toutes les roues.
Maintenant, libre à toi de changer les répertoires et noms de fichier, l'essentiel est évidement de rester cohérent entre chacune des étapes.
Ciao