[1.1.26] Fail to restart after update

Place for things which are bugs but we have no idea how to solve them. Things related to hardware, libraries, strange setups, etc.
Post Reply
Toslan
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Aug 14, 2020 10:08 am
Contact:

[1.1.26] Fail to restart after update

Post by Toslan »

I suspect this is going to go into 1/0 magic :D

I'm getting a "Shell execute error" every time factorio wants to restart itself (like after the update to 1.1.24, 1.1.25 & 1.1.26 or when mods were updated and I click "confirm".

No problem, I just start the game myself.

I suspect my strange setup is at fault, but I wanted to report to complete your body of knowledge.

I'm currently playing factorio in Win10.

I've downloaded the factorio stable zip and uncompressed it to a folder, then created a folder "Krastorio 2" (and a folder "Industrial Revolution 2", "Pyanodons", ...) as a sibling to that folder. I copied the "config-path.cfg" to each of these folders. Then I created symlinks to the contents of the stable zip folder's contents.

Code: Select all

> copy ..\Factorio_1.1\config-path.cfg config-path.cfg
> mklink /D bin ..\Factorio_1.1\bin
> mklink /D data ..\Factorio_1.1\data
> mklink /D doc-html ..\Factorio_1.1\doc-html
> mklink /D tests ..\Factorio_1.1\tests
Now I created shortcuts to each bin/x64/factorio.exe and can select from Desktop which conversion I want to play, without using gigabytes of precious SSD storage.

Code: Select all

|
+- Factorio_1.1                   (zip extracted here)
|  +- bin/
|  +- data/
|  +- doc-html/
|  +- tests/
|  +- config-path.cfg
|
+- Industrial Revolution 2
|  +- bin/                         (symlink)
|  +- mods/                      (actual directory)
...
I got this far painting the tree, but decided "dir" will describe this quicker:

Code: Select all

Microsoft Windows [Version 10.0.19042.844]
(c) 2020 Microsoft Corporation. All rights reserved.

C:\Games\Factorio Modded\Industrial Revolution 2>dir
 Volume in drive C has no label.
 Volume Serial Number is 9653-B10F

 Directory of C:\Games\Factorio Modded\Industrial Revolution 2

05/03/2021  23:58    <DIR>          .
05/03/2021  23:58    <DIR>          ..
05/03/2021  23:58             2.684 achievements-modded.dat
20/02/2021  16:46    <SYMLINKD>     bin [..\Factorio_1.1\bin]
05/02/2021  17:04         6.228.188 blueprint-storage.dat
05/03/2021  20:30    <DIR>          config
07/01/2021  09:47             1.001 config-path.cfg
05/03/2021  16:35         1.830.460 crop-cache.dat
20/02/2021  16:47    <SYMLINKD>     data [..\Factorio_1.1\data]
20/02/2021  16:47    <SYMLINKD>     doc-html [..\Factorio_1.1\doc-html]
05/03/2021  23:58            25.276 factorio-current.log
05/03/2021  16:33            10.841 factorio-previous.log
05/03/2021  23:58    <DIR>          mods
05/03/2021  23:58             7.836 player-data.json
05/03/2021  23:51    <DIR>          saves
05/03/2021  23:51    <DIR>          temp
20/02/2021  16:48    <SYMLINKD>     tests [..\Factorio_1.1\tests]
               7 File(s)      8.106.286 bytes
              10 Dir(s)   2.733.673.984 bytes free
So in conclusion: I created symlinks to the stuff in the zip, and let factorio create all the other files it wants without further trickery. I works beautifully. The only hickup is that factorio gets a "shell excecute error" when it wants to restart itself, which isn't really a problem.

Another bonus with this setup is that all my factorios are actually the same one, so if I update factorio while playing from my Krastorio 2 shortcut, my IR2 factorio is updated too.

sp55aa
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Mon Oct 07, 2019 9:27 am
Contact:

Re: [1.1.26] Fail to restart after update

Post by sp55aa »

maybe you don't need mklink.

I do it this way:
1. extract Factorio to C:\Local\Factorio_1.1.26
2. mkdir C:\Local\Factorio-1
3. copy config.ini to C:\Local\Factorio-1\config.ini, or create new one:

Code: Select all

; version=9
[path]
write-data=C:\Local\Factorio-1
4. modify config.ini:

Code: Select all

write-data=C:\Local\Factorio-1
5. run game: C:\Local\Factorio_1.1.26\bin\x64\factorio.exe --config C:\Local\Factorio-1\config.ini

then game should use write saves to C:\Local\Factorio-1\saves, read mods from C:\Local\Factorio-1\mods (tested)

Toslan
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Aug 14, 2020 10:08 am
Contact:

Re: [1.1.26] Fail to restart after update

Post by Toslan »

Hi!

Thanks that does look a lot simpler. I was unaware of the --config parameter.
As far as I understand your post, this simple trick of yours replicates exactly what I am doing?

So factorio reads all static data relative to the binary, and all variable data relative to the config? - That's an ingenious solution by Wube!
I'm blown away by the foresight.

I've thought myself clever by coming up with the previously described solution, but yeah.. humbled.
I used to have 6 (!!!) folders of factorio with different versions and mods combinations, so this was a massive improvement space and maintenance wise.


Edit: Just reread your post, it's not relative aynthing after all, it just respects whatever

Code: Select all

read-data
and

Code: Select all

write-data
are set to. That is slightly less impressive, but servicable. Makes one wonder though if the "doc-html" and "tests" folders are needed to play at all, as I see no reference to them in config.ini

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [1.1.26] Fail to restart after update

Post by posila »

There are also hidden variables "saves" and "mods" to override paths to those folder, that will be loaded, if you add them.

However, there is also command line parameter --mod-directory that you can use to override path to mods folder without needing to have separate config for each instance.

Toslan
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Aug 14, 2020 10:08 am
Contact:

Re: [1.1.26] Fail to restart after update

Post by Toslan »

Thanks for the information!

Sadly the "mods" variable doesn't help my case that much.
I've already got my problem solved with the --config parameter now.
(I've implemented the suggestion, works beautifully, I also don't have the problem I opened the bug report for with this change (doesn't solve the bug though, I just circumvented the trigger.))

I could reduce my "spreading" of factorio's files a little with a "mods" parameter, but honestly I don't think I'd want to.
Neither saves, blueprints nor cropped snippets are compatible between the big mods or vanilla, so it's actually practical to have them separated.

The only parameter I'd wished for would be one that'd let me set a different path for "mod-list.json" and "mod-settings.dat". That'd relieve me of maintaining different "mods" folders. I could just have one pool of mods and each factorio instance would have it's own settings on which are enabled.

Currently if a mod like Bottleneck or Auto-deconstruct are updating, I've got to either run the update for each instance (and restart that instance) or manually copy the updated mod file to each instance using it.

sp55aa
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Mon Oct 07, 2019 9:27 am
Contact:

Re: [1.1.26] Fail to restart after update

Post by sp55aa »

Toslan wrote:
Sat Mar 06, 2021 5:23 pm
Hi!

Thanks that does look a lot simpler. I was unaware of the --config parameter.
As far as I understand your post, this simple trick of yours replicates exactly what I am doing?

So factorio reads all static data relative to the binary, and all variable data relative to the config? - That's an ingenious solution by Wube!
I'm blown away by the foresight.

I've thought myself clever by coming up with the previously described solution, but yeah.. humbled.
I used to have 6 (!!!) folders of factorio with different versions and mods combinations, so this was a massive improvement space and maintenance wise.


Edit: Just reread your post, it's not relative aynthing after all, it just respects whatever

Code: Select all

read-data
and

Code: Select all

write-data
are set to. That is slightly less impressive, but servicable. Makes one wonder though if the "doc-html" and "tests" folders are needed to play at all, as I see no reference to them in config.ini
I have 3, each for normal gaming / blueprint design / mod test. :D

Post Reply

Return to “1 / 0 magic”