diff --git a/README.md b/README.md index c07a88a..096ef5f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,37 @@ -# unreal_engine_bug_flake +# UEFN Reproduce Env Project used to declare wine configuration to help developer to find the problem -bugs.winehq.org/show_bug.cgi?id=56654 - Usefull links - - https://github.com/fufexan/nix-gaming/blob/master/pkgs/star-citizen/default.nix \ No newline at end of file + - https://bugs.winehq.org/show_bug.cgi?id=56654 + - https://github.com/fufexan/nix-gaming/blob/master/pkgs/star-citizen/default.nix + +**Requirements:** Nix installed see https://nixos.org/download/ +> Otherwise, you can see flake.nix file to known how configure you're env. +> +> All needed configuration is fully declarated in the flake.nix file. + +**Step to reproduce:** + +1. Enter in shell + +```bash +nix develop --extra-experimental-features "nix-command flakes" +``` + +Can be longer because it install required wine version and dependencies at first. +And then, it download Epic Games Official Launcher, configure Wineprefix with required dependencices and Run Official Launcher. + +2. Run Epic Games Launcher and Install Unreal Engine for Fornite + +```bash +run +``` + +It run Epic Games Launcher Executable with current prefix. + +> Note: You can stop wineserver directly with `stop` +> +> And clean wineprefix with `clean` + +3. Run Unreal Engine for Fornite \ No newline at end of file diff --git a/flake.nix b/flake.nix index a1dc0f2..6ed2b5f 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,15 @@ }; # concat winetricks args - winetricksArgs = concatStringsSep " " [ "corefonts" ]; + winetricksPackages = [ "corefonts" ]; + winetricksArgs = + if (builtins.length winetricksPackages) > 0 + then concatStringsSep " " winetricksPackages + else "-V"; + + # concat dll overrides + wineDllOverrides = ["winemenubuilder.exe=d"]; + wineDllOverridesEnv = pkgs.lib.strings.concatStringsSep "," wineDllOverrides; install_script = writeShellScriptBin "install" '' echo "Installing Dependencies" @@ -31,35 +39,46 @@ echo "Dependencies Installed" echo "Installing Epic Games Launcher" - wine64 ${epic_games_launcher} /S + $WINE ${epic_games_launcher} /q wineserver -k echo "Epic Games Launcher Installed" ''; + stop_script = writeShellScriptBin "stop" '' + wineserver -k + ''; + clean_script = writeShellScriptBin "clean" '' + wineserver -k rm -rf $WINEPREFIX ''; run_script = writeShellScriptBin "run" '' - + $WINE "$WINEPREFIX/drive_c/Program Files (x86)/Epic Games/Launcher/Portal/Binaries/Win32/EpicGamesLauncher.exe" ''; in { devShells = { default = pkgs.mkShell { packages = with pkgs; [ - wine64Packages.unstableFull + # Wine packages + wineWow64Packages.unstableFull winetricks + + # Custom scripts install_script run_script + stop_script clean_script ]; shellHook = '' export WINETRICKS_LATEST_VERSION_CHECK=disabled export WINEPREFIX=$(pwd)/wine_prefix + export WINE=wine export WINEARCH="win64" export WINEDEBUG=-all + export WINEDLLOVERRIDES="${wineDllOverridesEnv}" if [ ! -d "$WINEPREFIX" ]; then install