-
Notifications
You must be signed in to change notification settings - Fork 40
Refactor of 4ed_build #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Nice one! Thanks for doing this. Looks like mac and linux packaging is failing in CI (I need to figure out why I had to approve the pipeline to start 🤔) I assume because the output structure has changed a little. I think its probably worth also cleaning up the script files. I don't really see much point in our package scripts anymore, can you remove them and update the build instructions in the readme too? Also now is probably a good time to update the |
|
I've made the changes you've mentioned and also added to the Is it an issue for Release action? |
Jack-Punter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple points on some bits relating to the build context.
You're also going to need to update the github actions as this changes how you do a build and the pipeline steps are defined by the current branch not the destination branch. The changes should look something like this patch:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 9bc661a..1dc2858 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -11,19 +11,19 @@ jobs:
include:
- suffix: x64-win-dx11
os: windows-latest
- build_cmd: bin\package.bat /DWIN32_DX11
+ build_cmd: bin\build.bat /DWIN32_DX11
- suffix: x64-win-gl
os: windows-latest
- build_cmd: bin\package.bat /DWIN32_OPENGL
+ build_cmd: bin\build.bat /DWIN32_OPENGL
- suffix: x64-linux
os: ubuntu-latest
- build_cmd: sudo apt update -y && sudo apt install build-essential libx11-dev libxfixes-dev libglx-dev mesa-common-dev libasound2-dev libfreetype-dev libfontconfig-dev -y && ./bin/package-linux.sh
+ build_cmd: sudo apt update -y && sudo apt install build-essential libx11-dev libxfixes-dev libglx-dev mesa-common-dev libasound2-dev libfreetype-dev libfontconfig-dev -y && ./bin/build-linux.sh
- suffix: x64-mac
os: macos-15-intel
- build_cmd: ./bin/package-mac.sh
+ build_cmd: ./bin/build-mac.sh
# - suffix: arm64-mac
# os: macos-latest
-# build_cmd: ./bin/package_arm64-mac.sh
+# build_cmd: ./bin/build_arm64-mac.sh
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
@@ -34,5 +34,5 @@ jobs:
uses: actions/upload-artifact@v4.6.0
with:
name: 4cc-${{ matrix.suffix }}
- path: current_dist_super_x64/4coder/ # having "x64" in path might have to change
+ path: build/ # or whatever the output directory is
Jack-Punter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice looks good, just a quick one on the pipeline (we still need to fix arm builds so just leave those commented for now). Once thats done ill do some tests on my various machines (dont have mac but have a few different linux boxes) then i'll look at merging
I've some macs I can test it myself Also I actually know a lot about POSIX shell scripting so if you want I can merge the two build script into one both for linux and mac (and possibly other unixes) |
|
Builds nicely on my ubuntu24.04 and 20.04 boxes. |
|
On 7 January 2026 13:52:05 CET, "Jack Punter - notifications at github.com" ***@***.***> wrote:
Jack-Punter left a comment (4coder-community/4cc#49)
There's a couple mentions of the package still in the readme which need removing.
Ok I will check them when I am at home
|
|
Ok I've updated the README with the new instructions |
Jack-Punter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I've tested on ubuntu20 and 24 as well as my windows 10 machine and seams to working nicely. I'll leave to see if we get any input from the other @4coder-community/maintainers in case they have any extra comments
|
I'd like to ask for the optimized builds to generate pdbs on Windows ( The "Build script parameter" section of the readme also needs to be updated I think. |
Do you mean in 4coder itself in the 4ed_build.cpp |
|
PDBs for 4ed.exe and 4ed_app.dll . I also wonder if we should "forward" the custom layer with the "release" argument to |
Ok, I should be able to do it by adding the DEBUG_SYMBOLS to the flags in OPT_MODE
I was thinking to touch the custom layer script and refine the build process in another PR. Simply to make the PR not too big. But I can do it now |
|
If you're talking about
I think we always want to generate debug info on windows because it's an external file (the pdb). On linux and Mac I believe debug info are in the executable directly (is that right ?) so I don't know that we want them at all time ? @Jack-Punter What do you think ? |
Yes, it is correct.
Ok, how should I do it then? |
I think modifying the custom layer script should be another pr. But since the core build call the custom layer script, maybe we may want to forward the optimization request (the custom layer script already supports the release argument). |
On windows I would always have the |
|
Ok, I've made so the build script passes the optimizations to the custom layer scripts. This works only on windows since is the only one that implements correctly the I think that we should just merge this and then do a separate PR for tackling the other issues. The |
I've made the following changes to
4ed_build.cpp:builddirectory<architecture>subfolder in buildBefore PR
After doing
cd code && .\bin\package.batAfter PR
After doing
cd code && .\bin\package.batNext Step
This is only a first step to unify and simply the build process for 4coder