nillerusr / source-engine

Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
Other
1.22k stars 190 forks source link

Orange Pi 5 Build #216

Closed ferrellsl closed 1 year ago

ferrellsl commented 1 year ago

I was able to create a successful build on the Orange Pi 5 running Ubuntu (https://github.com/Joshua-Riek/ubuntu-orange-pi5) with the following workflow.

  1. Install the prerequisites as identified at: https://github.com/nillerusr/source-engine/wiki/Source-Engine-(EN)
  2. Clone the repository: git clone https://github.com/nillerusr/source-engine --recursive --depth 1
  3. Move to the source-engine folder: cd source-engine
  4. Start the WAF configuration tool: python3 waf configure -T release --64bits
  5. If the tool identifies any unmet dependencies that you've missed, install them and re-run the WAF configuration tool until they're all met.
  6. Run the WAF compilation tool: python3 waf
  7. Install the binaries: sudo python3 waf install

I copied the contents of my Steam hl2 folder into /usr/local/hl2 and then I run the launcher. I'm getting audio and video but no user interface to start/stop/configure the game. I suspect it's due to my gameinfo.txt file not being quite correct but as I'm new to the source-engine, I'm not really sure. If anyone could advise me, I'd appreciate it.

Here are the contents of my gameinfo.txt file:


"GameInfo" { game "HALF-LIFE 2" title "HALF-LIFE'" type singleplayer_only supportsvr 1

FileSystem
{
    SteamAppId              220     // This will mount all the GCFs we need (240=CS:S, 220=HL2).

    //
    // The code that loads this file automatically does a few things here:
    //
    // 1. For each "Game" search path, it adds a "GameBin" path, in <dir>\bin
    // 2. For each "Game" search path, it adds another "Game" path in front of it with _<langage> at the end.
    //    For example: c:\hl2\cstrike on a french machine would get a c:\hl2\cstrike_french path added to it.
    // 3. For the first "Game" search path, it adds a search path called "MOD".
    // 4. For the first "Game" search path, it adds a search path called "DEFAULT_WRITE_PATH".
    //

    //
    // Search paths are relative to the base directory, which is where hl2.exe is found.
    //
    // |gameinfo_path| points at the directory where gameinfo.txt is.
    // We always want to mount that directory relative to gameinfo.txt, so
    // people can mount stuff in c:\mymod, and the main game resources are in
    // someplace like c:\program files\valve\steam\steamapps\half-life 2.
    //
    SearchPaths
    {
        // First, mount all user customizations.  This will search for VPKs and subfolders
        // and mount them in alphabetical order.  The easiest way to distribute a mod is to
        // pack up the custom content into a VPK.  To "install" a mod, just drop it in this
        // folder.
        //
        // Note that this folder is scanned only when the game is booted.
        game+mod            hl2/custom/*

        // We search VPK files before ordinary folders, because most files will be found in
        // VPK and we can avoid making thousands of file system calls to attempt to open files
        // in folders where they don't exist.  (Searching a VPK is much faster than making an operating
        // system call.)
        game_lv             /usr/local/hl2/hl2_lv.vpk
        game+mod            /usr/local/hl2/hl2_sound_vo_english.vpk
        game+mod            /usr/local/hl2/hl2_pak.vpk
        game                |all_source_engine_paths|/usr/local/hl2/hl2_textures.vpk
        game                |all_source_engine_paths|/usr/local/hl2/hl2_sound_misc.vpk
        game                |all_source_engine_paths|/usr/local/hl2/hl2_misc.vpk
        platform            |all_source_engine_paths|/usr/local/platform/platform_misc.vpk

        // Now search loose files.  We'll set the directory containing the gameinfo.txt file
        // as the first "mod" search path (after any user customizations).  This is also the one
        // that's used when writing to the "mod" path.
        mod+mod_write+default_write_path        |gameinfo_path|.

        // Add the HL2 directory as a game search path.  This is also where where writes
        // to the "game" path go.
        game+game_write     /usr/local/hl2

        // Where the game's binaries are
        gamebin             /usr/local/hl2/bin

        // Last, mount in shared HL2 loose files
        game                |all_source_engine_paths|hl2
        platform            |all_source_engine_paths|platform
    }
}

}

And some screenshots from my Pi 5 after running the launcher Screenshot from 2023-03-15 11-15-06 Screenshot from 2023-03-15 11-41-27 Screenshot from 2023-03-15 11-54-04

ferrellsl commented 1 year ago

Made a bit more progress. I edited my gameinfo.txt file and changed this line:

game+mod hl2/custom/*

to this:

game+mod /usr/local/hl2/custom/*

I can launch a game now by playing with the arrow keys and pressing Enter, but the user interface is messed up. See below.

image

And here are some shots of in-game play:

image

image Screenshot from 2023-03-15 13-28-13

ferrellsl commented 1 year ago

OK, solved the issue. I just needed to copy the other folders from my Steam/HalfLife2 folder over to /usr/local

The missing folders were platform, steam-input, and the sub-folders: filters, motionmappertemplates, and the various other files from the Steam hl2/bin folder, minus the x86 DLL's and EXE files.

ferrellsl commented 1 year ago

I'm getting between 35 and 45 fps as shown in the upper right corner of this screenshot. Sorry the text is so small.

Screenshot from 2023-03-15 17-05-23

ferrellsl commented 1 year ago

Go ahead and close this issue as everything is working fine now.

SanyaSho commented 1 year ago

OK, solved the issue. I just needed to copy the other folders from my Steam/HalfLife2 folder over to /usr/local

The missing folders were platform, steam-input, and the sub-folders: filters, motionmappertemplates, and the various other files from the Steam hl2/bin folder, minus the x86 DLL's and EXE files.

nah, u forget to copy platform :trollface: and use --prefix=/path/ instead of /usr/local/