Skip to content
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

Build a basic .deb file #802

Merged
merged 5 commits into from
Jan 7, 2022
Merged

Build a basic .deb file #802

merged 5 commits into from
Jan 7, 2022

Conversation

jwrober
Copy link
Collaborator

@jwrober jwrober commented Jan 3, 2022

No description provided.

@jwrober jwrober requested a review from lmoureaux January 3, 2022 21:26
@lmoureaux
Copy link
Contributor

I installed the resulting package and started the client from the menu. It started an old client installed in my home directory. The .desktop points to:

Exec=/home/louis/freeciv/freeciv21/build/install/bin/freeciv21-client
Icon=/home/louis/freeciv/freeciv21/build/install/share/freeciv21/misc/civicon.png

However, the .deb installs in /usr. There are more inconsistencies: for instance, translations are loaded from my home folder, which also appears in the data path.

Is this an issue on my end or a package issue?

@lmoureaux
Copy link
Contributor

Also, the installed size is above 400MB for my, is it because it's a debug build?

@jwrober
Copy link
Collaborator Author

jwrober commented Jan 4, 2022

That is strange. Let me look more closely at the output. It should not be that big. It is a Release build and the .desktop files included point to /usr... I tested on a blank VM with a fresh OS build.

@jwrober
Copy link
Collaborator Author

jwrober commented Jan 4, 2022

I wonder if .desktop files in home directory take precedence over the ones in /usr? The deb file is created with a simple build cmake . -B build -G Ninja and then cmake --build build --target package. In my local build directory, the meta and desktop files going to /usr/local and so does the package then uncompress ~80MB of data to /usr/local/.

@jwrober
Copy link
Collaborator Author

jwrober commented Jan 4, 2022

I see what the issue is. The executable files are being placed in /usr/bin, but the desktop files are pointing to /usr/local/bin.

@jwrober
Copy link
Collaborator Author

jwrober commented Jan 4, 2022

I found the fix - configure with this cmake . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr and then do the package with cmake --build build --target package. This will send the correct command to configure_file() and setup the package to install all components to correct spot on the file system and also configure the .desktop files to point to where the binaries are actually installed. I think there is an upstream defect here, but can't exactly pin it down. On my test system the game shows up in the games menu after install immediately.

@lmoureaux
Copy link
Contributor

OK we can do this in CI. Does the documentation need an update?

@jwrober
Copy link
Collaborator Author

jwrober commented Jan 7, 2022

OK we can do this in CI. Does the documentation need an update?

Yes, good point. I'll push a doc update to capture the steps that we can then add to CI in another PR after this one.

@jwrober jwrober merged commit f2b3518 into longturn:master Jan 7, 2022
@jwrober jwrober deleted the feature/deb-rpm branch January 22, 2022 20:22
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.

2 participants