Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

installers #59

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open

installers #59

wants to merge 4 commits into from

Conversation

antis81
Copy link
Member

@antis81 antis81 commented Nov 14, 2014

PR to finish the installers for libGitWrap.

  • Create a code gatherer script, so the package creation can be automatically run on the build server.
  • Create a PPA on Launchpad ( https://launchpad.net/~nilsfenner/+archive/ubuntu/macgitver-dev )
    To add the PPA write this in a terminal sudo apt-add-repository ppa:nilsfenner/macgitver-dev
  • Generate Debian source package for uploading to the PPA.
  • Create DEB install package
  • Create an RPM installer for Suse/Redhat distro's.
  • Create a Homebrew package for OSX.
  • (NOT NEEDED) Finish the OSX DragNDrop Installer
  • (USE WiX INSTEAD) Finish the NSIS based installer for Windows
  • (CANCELLED, BECAUSE NOBODY NEEDS IT) Finish the WiX based installer for Windows (create an MSM merge-module)

@scunz
Copy link
Member

scunz commented Nov 14, 2014

@antis81,

  1. If you make a proper RAD-Tool out of that cmake script (that can be loaded via the usual RAD commands, ... (But what I think you want is actually a place to share that script with the rest of the MGV code, right? Then maybe a Build-Scripts Repository might be better; it could still contain RAD-Tools)

  2. What is the purpose of a Drag and Drop installer for Mac OS X ("for a library like libGitWrap")? It could only be a .framework-bundle. And this one would have to contain all the Qt framework bundles. Then do the same thing for libHeaven? DnD 10 frameworks for libHeaven; contain the Qt Frameworks in each of them? Think this might not be the best idea to proceed.

    Packages for Linux are IMHO okay; Recipes for Mac OS X based package managers might be okay as well. But that's about that: It's okay to feed package managers with instructions (be it binary or via source code). They got support for dependencies and can do "the right thing" most of the time.

  3. What exactly is wrong with the windows build? Can you open an Issue or mail me about the actual problem?

@scunz
Copy link
Member

scunz commented Nov 14, 2014

And the same probably applies to Windows: It doesn't make much sense to produce an installer for Windows, unless it is a MSI-Style "Merge-Package" (*.msm) that can be included as a component into a larger MSI installer package...

@antis81
Copy link
Member Author

antis81 commented Nov 14, 2014

(But what I think you want is actually a place to share that script with the rest of the MGV code, right? Then maybe a Build-Scripts Repository might be better; it could still contain RAD-Tools)

Hm, ok. A new central scripts repo is a good idea. This has to go to Launchpad as well then as a build dependency.

What is the purpose of a Drag and Drop installer for Mac OS X ("for a library like libGitWrap")?

Right, there's no purpose here. This should go to the MGV main repo. There's a chance though, that we want to install the GitWrap and Heaven as standalone libraries. Maybe we would be better off with Homebrew ( http://brew.sh ) here. This works similar to APT.

And the same probably applies to Windows.

Uhm, right. But MSM (the merge modules mechanism) and NSIS don't like each other. I think there's a better way to get it right. It is mostly, because NSIS makes the deployment more easy by probably just adding another build target, instead of including MSI. Or am I wrong?

What exactly is wrong with the windows build? Can you open an Issue or mail me about the actual problem?

Basically libgit2 doesn't build like we integrate it. There's a problem including the http_server.h header and probably more, but this is what I get. I should mention though, I'm building with msys/mingw (on Windows XP, but this shouldn't matter at all).

@scunz
Copy link
Member

scunz commented Nov 15, 2014

Hm, ok. A new central scripts repo is a good idea. This has to go to Launchpad as well then as a build dependency.

That's plain stupid then :)
Ain't you allowed to just reference it as a submodule and be done with it?

There's a chance though, that we want to install the GitWrap and Heaven as standalone libraries. Maybe we would be better off with Homebrew ( http://brew.sh ) here. This works similar to APT.

In that case, yes - this was actually, what I was trying to say. However, I indeed think that anyone building an application for Mac OS X will know exactly, if frameworks or flat libraries are needed. For such a use case, it might be best to provide a simple and easy to run build experience - Since I guess any decent developer will probably do it by themselves.

But MSM (the merge modules mechanism) and NSIS don't like each other. I think there's a better way to get it right. It is mostly, because NSIS makes the deployment more easy by probably just adding another build target, instead of including MSI. Or am I wrong?

Once you got your head wrapped around the MSI Technology (and the WiX tools), it's quite easy and straight forward. And so much more powerful than all the *nix alternatives... :)

Really, NSIS is more pain in the longer run. The CMake support isn't very good either (IMHO).

Basically libgit2 doesn't build like we integrate it.

Surprise. Surprise. Who would have guessed? The way I did it, was a quirk, a kludge, a real nasty way to get rid of the ignorance to my improvements. But that's past. It should be possible to do it better nowadays. Better means: Build upon the CMakeLists.txt they provide and use their shared library...

There's a problem including the http_server.h header and probably more, but this is what I get. I should mention though, I'm building with msys/mingw (on Windows XP, but this shouldn't matter at all).

Oh my dear... You're building for that ancient monster? And even using a so much diversified tool chain? Seriously, nobody uses Wixp anymore!
Anyway: The mingw part is more of a problem in my opinion. There're so many different flavours and builds of it out there. Most of them are incompatible with each other. See the struggle Qt-Project.org always has with that stuff. In the end, I very much doubt the usefulness of such a build, unless it is solely based upon the stuff provided by Qt-Project.org. But they actually do not officially support WinXP either. In fact, the new QWebEngine module demands MS VC 12 (aka 2013)...

@antis81
Copy link
Member Author

antis81 commented Nov 15, 2014

Build upon the CMakeLists.txt they provide and use their shared library... (libgit2)

Let's leave the past behind then and switch the submodule to the original lg2 repo. That's the best we can do and it will ease the building/testing process.

Oh my dear... You're building for that ancient monster? ... (WinXP)

Funny game! I'm not using Windows at all and be happy :). It runs in a VM only to build for this OS! The question is: Does it work with that toolchain on Win7/8? If so, MGV should completely build (by copying the library binaries and headers manually to the MGV build dir). Would be great, if we could provide a windows binary as well. If I read right, we can provide a WiX (oh, what a name 😆) installer from CMake, right? Using that on windows is the better alternative, yes.

@scunz
Copy link
Member

scunz commented Nov 15, 2014

Let's leave the past behind then and switch the submodule to the original lg2 repo.

The repository-copy is just a safety-net. Keep it, you should :)

I'm not using Windows at all and be happy :). The question is: Does it work with that toolchain on Win7/8?

Well... Yes and no. Windows really is the path to the dark side... Once you're there, you're doomed to stick with it. Should read like: If you provide it once, you'll probably have to support it - and you know how people are: You give them a helping hand and they'll come back tomorrow and grab your whole arm...

@scunz
Copy link
Member

scunz commented Nov 15, 2014

Oh, and yes: you're right a) WiX is indeed an interesting name for a "program that adds something to another person's intimidate data locations" and b) seems like CMake supports this :)

@antis81
Copy link
Member Author

antis81 commented Nov 15, 2014

Ain't you allowed to just reference it (central cmake modules) as a submodule and be done with it?

Yeah, that's actually a good alternative :).

Btw.: What I wrote about the RAD-Tools dependency is completely crap. Sorry for being awkward 😇. I'm just learning to deal with Launchpad. When providing the "apt-get install" mechanism, we need to improve our deployment strategy. Because the sources are actually built on Launchpad. Maybe I should make up an issue on its own for that.

Just to remember: Providing binary DEB packages is the more "easy way" and similar to a windows installer. Packages just have to be installed by the user in the right order (libraries first). Problem here: MGV itself doesn't start.

Do you have some Linux VM? Then please try for yourself:

# first run the cmake scripts (I use Qt-Creator)
cd /path/to/RAD-Tools-build && sudo make install
cd /path/to/libGitWrap-build && sudo make install
cd /path/to/libHeaven-build && sudo make install
cd /path/to/MacGitver-build && sudo make install

# run the programm
MacGitver

It will fail to start, like I said on the phone. Seems like libHeaven breaks it.

@antis81
Copy link
Member Author

antis81 commented Nov 15, 2014

Oh, and yes: you're right a) WiX is indeed an interesting name for a "program that adds something to another person's intimidate data locations" and b) seems like CMake supports this :)

Ok, then let's go this way. I'll replace NSIS with WiX in the TODO list.

@scunz
Copy link
Member

scunz commented Nov 15, 2014

@antis81, take a step backwards, a deep breath and then think about this again.

What you really need to do is:

  • Make sure the sources are able to build everywhere you want to deploy. This doesn't correlate to the origin of the sources at all; i.e. just ensure that a full set of sources builds.
  • You need a script to export the sources; preferable to both a tarball and a CR/LF line ending crippled .zip file.
  • Next step is to provide a hosting space for these tarballs.
  • Refer to these tarballs as the "release" source inside your packages and on the web sites..

@scunz
Copy link
Member

scunz commented Nov 15, 2014

Back in the ol' days, when our Git Lab was still alive, we actually had a jenkins job, which actually did exactly that. Grab the sources from all relevant submodules and daily update a git repository with a complete set of all MacGitver sources in one place.

@scunz
Copy link
Member

scunz commented Nov 15, 2014

see here

@antis81
Copy link
Member Author

antis81 commented Nov 15, 2014

Thanks for that hint 👍!

Hm, this is what UploadPPA.cmake is doing (well, almost), just before the tarball is generated. But instead of cloning, it copies the local source directory.

I'd prefer to re-write the code gatherer as a cmake module. This way it becomes more platform independent. And ... I have to admit I'm not that good in shell scripting ☺️. What do you think?

@scunz
Copy link
Member

scunz commented Nov 15, 2014

If I get this right, you want to wrap the shell commands from the gatherer inside ADD_COMMAND tags in CMake becuase you're not good in shell scripting? Does that make sense? Actually, unless you're going to write a complete git wrapper for CMake, there's no other way than running git CLI step-by-step (which is indeed what the gatherer already does).

I'd rather like to have it in a format that can be easily integrated into an automated system and be run automatically...

@antis81
Copy link
Member Author

antis81 commented Nov 15, 2014

Not exactly. I'd not wrap it, but write it completely as a CMake module (function or a macro). This way it can be run on win / lin / mac the same way, without the need to write separate scripts for each OS ... and without having to cross-compile. Something like this

find_program( GIT git )
if( NOT ${GIT} )
    MESSAGE(STATUS "Git was not found on this system.")
    return()
endif()

function( git_clone_source REPOSITORIES BASE_DIR)
    # we could do a check for existing directories and fetch recursive
    # I'd prefer to delete BASE_DIR instead
    foreach( REPO IN REPOSITORIES )
        execute_process( ${GIT} clone --recursive ${REPO} ${BASE_DIR}/ )
    endforeach()
endfunction()

# ... and so on ...

@scunz
Copy link
Member

scunz commented Nov 15, 2014

This is still wrapping the commands. Except that it will not become cross platform, since it would still require a msys-style bash on windows to deal correctly with the forward slashes... :)

@antis81
Copy link
Member Author

antis81 commented Nov 15, 2014

Well, when having installed Git on Windows, you have an msys bash anyways :). But the real question is. Why should that be bad? We have to run cmake anyways. So why not using it?

@scunz
Copy link
Member

scunz commented Nov 15, 2014

Counter question: If you want this kind of bullet-proof, you'll have to write a huge amount of CMake scripts, which is by far not easy. The gain is that a system that is actually not at all meant to be run by any user and is hence just required by the maintainer to execute (or even better be automated in the background), becomes usable on a system which neither you nor me make use of. So, could the time spent on that be spend with a higher valuable output?

@scunz
Copy link
Member

scunz commented Nov 15, 2014

btw: If you're using Visual Studio (which probably is still like 90-95% of Windows developers), you'd be advised wisely to avoid all kinds of msys in the first place :)

@antis81
Copy link
Member Author

antis81 commented Nov 16, 2014

Slept over that one and it's hard but true. Supporting a system, that none of the developers uses, does not make much sense. Thus, unless someone wants to support a WiX installer, GitWrap for Windows won't get one.

Using a shell script is a reasonable way to gather the sources then. Though, I can't tell the difference between cmake and shell script in this context. Except shell script is more flexible when replacing the build system in a far away future :).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants