Important - GZDoom repository now uses submodules

Here, developers communicate stuff that does not go onto the main News section or the front page of the site.
[Dev Blog] [Development Builds] [Git Change Log] [GZDoom Github Repo]

Moderator: GZDoom Developers

Important - GZDoom repository now uses submodules

Postby Rachael » Tue Oct 27, 2020 8:37 am

If you are developing on the GZDoom repository, a new change that has occurred is that it now uses a git submodule for Nash's widescreen mod.

A submodule is a link to another repository, the contents of which are not stored in the main one. The submodule can be a link to the original author's own repository, or to another one.

However - one issue with Git is it does not handle submodules automatically. It does require a little bit of remembering extra commands, especially if you're using a CUI where it is typically expected you remember this stuff automatically.

In order to do a full clone (from scratch) of GZDoom's repository now, you use the following command:
Code: Select allExpand view
git clone https://github.com/coelckers/gzdoom --recurse-submodules


If you are updating from a pre-submoduled commit, you must do this command as well:
Code: Select allExpand view
git pull
git submodule init
git pull --recurse-submodules

(this command only needs to be done once)

In order to do a pull for the current branch:
Code: Select allExpand view
git pull --recurse-submodules


In order to do a fetch without updating your current branch:
Code: Select allExpand view
git fetch --recurse-submodules


(note: --recurse might work as a shorthand for the above commands)

The extra parameter will cause git to scan and merge linked repositories as indicated by the command you used.

The commands for commit and push are unchanged.

---

If this is all correctly done, then the next time you build GZDoom, you should get a game_widescreen_gfx.pk3 file populated with the widescreen resources in their current state.

Note that this file is *NOT* commercial-project friendly, and like game_support.pk3 - *must* be removed prior to distributing the engine with a commercial game.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Important - GZDoom repository now uses submodules

Postby Major Cooke » Tue Oct 27, 2020 10:31 am

I've tried doing a pull with recurse but it just says "Already up to date." I hope this doesn't mean I need to restart my entire project because that means I have to redo all my submissions over again.

The GUI I'm using has the ability to enable this recurse checking automatically and it usually warns that Nash's stuff isn't included with it yet. Hmm...
Last edited by Major Cooke on Tue Oct 27, 2020 10:34 am, edited 1 time in total.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Important - GZDoom repository now uses submodules

Postby Rachael » Tue Oct 27, 2020 10:33 am

No. It should just automatically update.

When you compile, check the contents of game_widescreen_gfx.pk3 and verify that it contains more than just a placeholder credits.txt.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Important - GZDoom repository now uses submodules

Postby _mental_ » Tue Oct 27, 2020 10:57 am

Was it really necessary? All complications came with modules are simply not worth it in my opinion.
I would understand if we have an umbrella repository with a bunch of modules. One module for quite special resources is an overkill.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Important - GZDoom repository now uses submodules

Postby Rachael » Tue Oct 27, 2020 11:17 am

I'm sure in time if it turns out to be too problematic it can be reversed.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Important - GZDoom repository now uses submodules

Postby drfrag » Tue Oct 27, 2020 11:27 am

Actually to get the files i had to use submodule update in tortoisegit and everyone cloning the repo will have to do the same manually since there's nothing to commit after doing it.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Important - GZDoom repository now uses submodules

Postby Rachael » Tue Oct 27, 2020 11:55 am

I omitted (by mistake) an important step:

If you are updating from a pre-submoduled commit, you must do this command as well:
Code: Select allExpand view
git submodule init

(this command only needs to be done once)
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Important - GZDoom repository now uses submodules

Postby Graf Zahl » Tue Oct 27, 2020 12:14 pm

In this case, the worst thing to happen would be having no widescreen images. So it's a perfect test case to see how submodules work out.
Let's just say this: At work I have to deal with a project split across 7 different repos, not using submodules because the same repos get used by other projects as well. Keeping things in sync is a logistical nightmare. We have the same issue with ZMusic which is shared by GZDoom and Raze. The current setup is a lot worse than using submodules but still better than duplicating all that rarely changing code in both repos.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Important - GZDoom repository now uses submodules

Postby Major Cooke » Tue Oct 27, 2020 1:16 pm

Oh so that's what I was missing. Thanks Rachael!
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Important - GZDoom repository now uses submodules

Postby Rachael » Tue Oct 27, 2020 1:40 pm

You're welcome :)
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Important - GZDoom repository now uses submodules

Postby Chris » Tue Oct 27, 2020 1:41 pm

So I'm apparently doing something wrong. I have a preexisting local repo, so I first ran
Code: Select allExpand view
git submodule init

There was no error, and no output. I then ran
Code: Select allExpand view
git fetch gzdoom --recurse-submodules

(gzdoom is for Graf's remote repo, origin is my fork). This fetched as normal. Then did
Code: Select allExpand view
git rebase gzdoom/master

and it successfully rebased. At this point, I see a wadsrc_widescreen directory with a CMakeLists.txt, but wadsrc_widescreen/static is empty. I tried running
Code: Select allExpand view
git submodule init

again, and this time it said something about setting up another repository (exact message is gone now, unfortunately), but wadsrc_widescreen/static is still empty. Ran
Code: Select allExpand view
git fetch gzdoom --recurse-submodules
git rebase gzdoom/master

again, and it's still empty. Building GZDoom creates game_widescreen_gfx.pk3 with 0 files.

I've never had a positive experience with submodules.
User avatar
Chris
 
Joined: 17 Jul 2003

Re: Important - GZDoom repository now uses submodules

Postby Major Cooke » Tue Oct 27, 2020 1:46 pm

Ack, yeah, still getting this issue. That happens when Im going to push to my github itself.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Important - GZDoom repository now uses submodules

Postby Rachael » Tue Oct 27, 2020 2:04 pm

@ Chris & Cooke:

Try doing a "git pull --recurse" (after the init) and see if that fixes it.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Important - GZDoom repository now uses submodules

Postby Nash » Tue Oct 27, 2020 2:07 pm

For what it's worth, for TortoiseGit users like me, the top answer on this page (31 votes at the time of the post) was the most straightfoward way. I was able to get GZDoom to build a proper copy of game_widescreen_gfx.pk3.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Important - GZDoom repository now uses submodules

Postby Graf Zahl » Tue Oct 27, 2020 2:16 pm

TortoiseGit has a "Submodule update..." entry in its context menu, that always does the trick. So far every time I had problems with submodules, "git submodule update" solved them, especially on macOS where all Git clients are shit, especially the expensive ones :twisted:
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Next

Return to Developer Blog

Who is online

Users browsing this forum: Captain J and 0 guests