Skip to content

Restructure the repository and handle addon files#60

Merged
marcinn merged 1 commit intoMaSzyna-Reloaded:mainfrom
marcinn:reorganize-repo
Dec 16, 2024
Merged

Restructure the repository and handle addon files#60
marcinn merged 1 commit intoMaSzyna-Reloaded:mainfrom
marcinn:reorganize-repo

Conversation

@marcinn
Copy link
Member

@marcinn marcinn commented Dec 14, 2024

Solves #59

@marcinn marcinn requested a review from JezSonic December 14, 2024 14:35
@marcinn marcinn linked an issue Dec 14, 2024 that may be closed by this pull request
@JezSonic
Copy link
Member

I still don't really like the idea of having dependencies in the root folder and copying them over instead of just having them in a demo/.

There's a high chance to overwrite files by mistake and having copy of that just makes kinda no sense to me.

I haven't look through everything yet and checked it all, will get to that in a few hours

@marcinn
Copy link
Member Author

marcinn commented Dec 14, 2024

Demo is just a project which can disappear from this repo. All sources must be outside the project, because this is an addon. Just imagine that there is no demo folder.

The same issue will be with the Game and MSED repositories, because libmaszyna will not be stored under project's addons dir.

There's a high chance to overwrite files by mistake and having copy of that just makes kinda no sense to me.

Yes. This is the case for all dependencies, which will be under your development, especially when you switch to the target project (Game or Editor). To solve this case you can use symlinks (the easiest and straightforward way). You can use them on Windows by enabling developer mode.
You can also create tools you like, i.e. a script which will copy back files from demo/addons/libmaszyna (or other project you will work with) to the addon sources dir, maybe automatically based on inotify.
Or maybe you will develop with the source files, and there will be a script based on inotify, which will automatically run scons after detecting changes.

It is up to you. Personally I would stick with symlinks, but they will not be committed to the repository.

@marcinn marcinn marked this pull request as draft December 15, 2024 01:08
@marcinn
Copy link
Member Author

marcinn commented Dec 15, 2024

Switching to draft.

For easier development will be possible to use symlink

It works for existing files, however Scons is DELETING your new files during next build. This is unacceptable. After a texting on the Scons Discord, they asked me to report a bug. Looks like we're stuck for a while. I'll try to workaround this by manually checking for the existence of the symlink.

@marcinn marcinn marked this pull request as ready for review December 15, 2024 03:56
@marcinn
Copy link
Member Author

marcinn commented Dec 15, 2024

applied workaround

@JezSonic
Copy link
Member

Demo is just a project which can disappear from this repo. All sources must be outside the project, because this is an addon. Just imagine that there is no demo folder.

The same issue will be with the Game and MSED repositories, because libmaszyna will not be stored under project's addons dir.

There's a high chance to overwrite files by mistake and having copy of that just makes kinda no sense to me.

Yes. This is the case for all dependencies, which will be under your development, especially when you switch to the target project (Game or Editor). To solve this case you can use symlinks (the easiest and straightforward way). You can use them on Windows by enabling developer mode. You can also create tools you like, i.e. a script which will copy back files from demo/addons/libmaszyna (or other project you will work with) to the addon sources dir, maybe automatically based on inotify. Or maybe you will develop with the source files, and there will be a script based on inotify, which will automatically run scons after detecting changes.

It is up to you. Personally I would stick with symlinks, but they will not be committed to the repository.

K, thx for clarification

Copy link
Member

@JezSonic JezSonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me

@marcinn marcinn requested a review from carmel4a December 15, 2024 17:51
Copy link
Contributor

@carmel4a carmel4a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I've told on discord. I'm not sure if .gitigore and few commits from main merged successfully, but it seems to be ok.

@marcinn marcinn merged commit 2fd1c35 into MaSzyna-Reloaded:main Dec 16, 2024
6 checks passed
@marcinn marcinn deleted the reorganize-repo branch December 16, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restructure the repository and handle addon files

3 participants