Skip to content
This repository was archived by the owner on Apr 17, 2022. It is now read-only.
This repository was archived by the owner on Apr 17, 2022. It is now read-only.

Remove popt #1659

Closed
Closed

Description

@wzdev-ci

keyword_popt_arguments resolution_fixed type_patch (an actual patch, not a request for one) | by Per


The popt library is a unnecessary dependency. This patch removes it in favour of a very small and very quickly hacked together arguments parser that acts as a drop in replacement for our use of popt.


Issue migrated from trac:1659 at 2022-04-15 21:11:33 -0700

Activity

  1. wzdev-ci commented on Mar 3, 2010

    @wzdev-ci
    ContributorAuthor

    Per uploaded file popt-b-gone.diff (5.6 KiB)

  2. wzdev-ci commented on Mar 3, 2010

    @wzdev-ci
    ContributorAuthor

    Zarel commented


    I am in support of this action.

  3. wzdev-ci commented on Mar 3, 2010

    @wzdev-ci
    ContributorAuthor

    i-NoD commented


    The idea is great, but I can't figure how to pass --mod="C:\Program files\WZ2100" because this results in two tokens...
    Plus if there are no short form then argument is compared with "-", which could possibly lead to unwanted results.

  4. wzdev-ci commented on Mar 4, 2010

    @wzdev-ci
    ContributorAuthor

    Per uploaded file popt-b-gone2.diff (6.2 KiB)

    Thanks for the response. Both issues fixed in new patch.

  5. wzdev-ci commented on Mar 4, 2010

    @wzdev-ci
    ContributorAuthor

    i-NoD commented


    Function poptGetNextOpt() was fixed a bit (internal buffer issue and missing spaces, return actual enums instead of count ;) ) so it would parse smth like:

    Warzone2100.exe --cheat --debug=all --mod=TCMask --configdir="c:\Users\123\Documents\WZ 2100 Trnk"

    Btw, if its fine for Unix, will it work for Mac too?

  6. wzdev-ci commented on Mar 4, 2010

    @wzdev-ci
    ContributorAuthor

    Per commented


    Nice fixups.

    It should work fine on Mac. I see I forgot to remove a debug printf in there, and should probably remove the usage option before committing.

  7. wzdev-ci commented on Mar 5, 2010

    @wzdev-ci
    ContributorAuthor

    i-NoD uploaded file popt.patch (5.0 KiB)

    We should remove final qoutes from one-word params too.

  8. wzdev-ci commented on Mar 6, 2010

    @wzdev-ci
    ContributorAuthor

    i-NoD commented


    Per, could you please commit this feature? I'm keeping 10 shortcuts (new and old style) around and like to purge some :-/

    As a note: i've made a non-critical mistake in the last patch and there should be

     if (ctx->table[i].argument && pparam)
    

    check like in your original code.

  9. wzdev-ci commented on Mar 6, 2010

    @wzdev-ci
    ContributorAuthor

    Buginator commented


    Nice.

    die popt die! :D

    It will also kill off
    libiconv-2.dll
    popt1.dll
    libintl-2.dll

  10. wzdev-ci commented on Mar 6, 2010

    @wzdev-ci
    ContributorAuthor

    i-NoD commented


    Somehow I knew you would say it! :)

    I think libiconv-2.dll and libintl-2.dll are still required for internalization, althought it's not strictly necessary for MSVC builds.

    At least with popt death it will be possible to compile both into static libs.

  11. wzdev-ci commented on Mar 7, 2010

    @wzdev-ci
    ContributorAuthor

    Per changed status from new to closed

  12. wzdev-ci commented on Mar 7, 2010

    @wzdev-ci
    ContributorAuthor

    Per set resolution to fixed

  13. wzdev-ci commented on Mar 7, 2010

    @wzdev-ci
    ContributorAuthor

    Per commented


    (In [10186]) Remove our dependency on popt by writing a custom popt-like parser. Patch by me and i-NoD. Closes #1659

  14. wzdev-ci commented on Mar 7, 2010

    @wzdev-ci
    ContributorAuthor

    Git SVN Gateway <gateway@...> commented


    (In Warzone2100/warzone2100@240bb91) Remove our dependency on popt by writing a custom popt-like parser. Patch by me and i-NoD. Closes #1659

    git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10186 4a71c877-e1ca-e34f-864e-861f7616d084

  15. wzdev-ci commented on Oct 14, 2010

    @wzdev-ci
    ContributorAuthor

    Git SVN Gateway <gateway@...> commented


    In Warzone2100/warzone2100@240bb91:

    #CommitTicketReference repository="" revision="240bb9189125a5560535956d253c755ec0890d04"
    Remove our dependency on popt by writing a custom popt-like parser. Patch by me and i-NoD. Closes #1659
    
    
    git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10186 4a71c877-e1ca-e34f-864e-861f7616d084
    
  16. wzdev-ci commented on Oct 23, 2010

    @wzdev-ci
    ContributorAuthor

    buginator <buginator@...> commented


    (In Warzone2100/warzone2100@2aca760) Remove our dependency on popt by writing a custom popt-like parser. Patch by me and i-NoD. Closes #1659

    git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10186 4a71c877-e1ca-e34f-864e-861f7616d084
    (cherry picked from commit 240bb9189125a5560535956d253c755ec0890d04)

    Conflicts:

    configure.ac
    src/Makefile.am
    
  17. wzdev-ci commented on Oct 23, 2010

    @wzdev-ci
    ContributorAuthor

    buginator <buginator@...> commented


    In Warzone2100/warzone2100@2aca760:

    #CommitTicketReference repository="" revision="2aca760ab52865660c3c30bdb84eab4d2850e6ae"
    Remove our dependency on popt by writing a custom popt-like parser. Patch by me and i-NoD. Closes #1659
    
    
    git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10186 4a71c877-e1ca-e34f-864e-861f7616d084
    (cherry picked from commit 240bb9189125a5560535956d253c755ec0890d04)
    
    Conflicts:
    
    	configure.ac
    	src/Makefile.am
    
  18. wzdev-ci commented on Jan 3, 2012

    @wzdev-ci
    ContributorAuthor

    cybersphinx changed milestone from 3.0 to unspecified

  19. wzdev-ci commented on Jan 3, 2012

    @wzdev-ci
    ContributorAuthor

    cybersphinx commented


    Milestone 3.0 deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions