YoYoGames / GMEXT-Steamworks

Repository for GameMaker's Steamworks Extension
Other
65 stars 12 forks source link

YYprojectName variable in post_step_bat resolves to an empty string when using CLI for Linux #61

Closed patchuby closed 8 months ago

patchuby commented 8 months ago

I'm building my game on Linux from Windows using CLI. The process fails to produce a zip because of Steamworks as far as I can tell. The variable YYprojectName seems to resolve to an empty string and in so giving the file path ".zip" instead of "[project_name].zip".

Here is the output :


"Copying Linux (64 bit) dependencies"

    Directory: C:\CDS-Builds\Linux

Mode                 LastWriteTime         Length Name                                                                 
----                 -------------         ------ ----                                                                 
d-----        08/03/2024     12:51                _temp                                                                

Expand-Archive : The path '.zip' either does not exist or is not a valid file system path.
At line:1 char:34
+ ... e = 'Stop'; Expand-Archive -Path $env:PS_SRCFILE -DestinationPath $en ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (.zip:String) [Expand-Archive], InvalidOperationException
    + FullyQualifiedErrorId : ArchiveCmdletPathNotFound,Expand-Archive

[STEAMWORKS] ERROR: Failed to extract contents of '.zip' to '_temp\'.

C:\GMS\extensions\Steamworks\post_build_step.bat exited with non-zero status (1)```
patchuby commented 8 months ago

In case it's relevant, I'm running igor from the following batch file :


setlocal 
set _gm_user_folder=%appdata%\GameMakerStudio2\tom_133823
set _gm_runtime_folder=C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2024.2.0.163
set _gm_project_folder="C:\GMS\Chronique des Silencieux.yyp"
set _gm_cache_folder=C:\GMBuildCache
set _gm_build_folder=C:\CDS-Builds
set _gm_device_json=%_gm_user_folder%\devices.json
set _gm_licence_plist=%_gm_user_folder%\licence.plist
set _steam_sdk_folder="C:\Steam SDK"
set _steam_content_builder_folder=%_steam_sdk_folder%\tools\ContentBuilder
set _steam_cmd_exe=%_steam_content_builder_folder%\builder\steamcmd.exe
set _build_log=%_gm_build_folder%\build.log

cd %_gm_runtime_folder%\bin\igor\windows\x64"

Igor.exe /uf=%_gm_user_folder% /rp=%_gm_runtime_folder% /project=%_gm_project_folder% /cache=%_gm_cache_folder% /of="%_gm_build_folder%\Linux\Chronique des Silencieux" -- Linux Clean >> %_build_log% | type %_build_log%
Igor.exe /uf=%_gm_user_folder% /rp=%_gm_runtime_folder% /project=%_gm_project_folder% /cache=%_gm_cache_folder% /runtime=YYC /of="%_gm_build_folder%\Linux\Chronique des Silencieux" /tf="%_gm_build_folder%\Linux.zip" /config=Release_Steam  /device="Ubuntu on Dell" /df=%_gm_device_json% -- Linux Package >> %_build_log% | type %_build_log%

endlocal```
DiasFranciscoA commented 8 months ago

Extension scripts were changed to not relying on YYprojectName (updated in main repo, pending release and marketplace update)

patchuby commented 8 months ago

@DiasFranciscoA I've updated the post_step.bat/.sh from your yesterday commit but now I'm getting this when building for Mac YYC :

Exception calling "GetUnresolvedProviderPathFromPSPath" with "1" argument(s): "Cannot find drive. A drive with the
name ' =_YYprojectName' does not exist."
At line:1 char:94
+ ...  $basePath; $ExecutionContext.SessionState.Path.GetUnresolvedProvider ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DriveNotFoundException

I might have been there before, the mac building output goes the terminal limit apparently so I only see the latest output (across 3 builds for Windows/Mac/Linux) Did I need to update something else ? I notice the variable is called _YYprojectName instead of YYprojectName could that be an issue ?

Edit : Even weirder, the zip produced from this output could actually be extracted by Windows and 7z didn't give warnings, contrary to what happened in #4982

patchuby commented 8 months ago

@DiasFranciscoA I noticed that the _YYprojectName error happened during cleaning but afterwards Steamworks extension scripts were not even called (couldn't see another [STEAMWORKS] in the output after cleaning).

Cleaning seems to be broken in CLI so I cleaned in IDE and then launched the CLI to build and the error popped up in the build output.

Also noticed that the project I sent might have had Steamworks disabled for Ubuntu, double check if this is enabled on your side.

The issues I've reported the last few days all seem to be connected, let me know if you want me to create a new issue for this or comment on another issue (since this one is closed). I'm also available for a call on discord ("patchuby_") to go over details if you need