Code Monkey home page Code Monkey logo

guigna's Introduction

GUIGNA: the GUI of Guigna is Not by Apple :)

Guigna* is the prototype of a GUI supporting Homebrew, MacPorts, Fink and pkgsrc at the same time.

screenshot

Design and ideas

Guigna tries to abstract several package managers by creating generalized classes (GSystem and GPackage) while keeping a minimalist approach and using screen scraping. The original implementations in Objective-C and MacRuby/RubyMotion are being ported to Swift.

Guigna doesn't hide the complexity of compiling open source software: it launches the shell commands in a Terminal window you can monitor and interrupt. When administration privilege or another input are required, the answer to the prompt can be typed directly in the Terminal brought to the foreground thanks to the Scripting Bridge.

When multiple package managers are detected, their sandboxes are hidden by appending _off to their prefix before the compilation phase. An on-line mode, however, allows to get the details about the packages by scraping directly their original repositories.

Feedback

Guigna is at a very early stage of development and it is tested only for the latest versions of macOS, Xcode and Swift betas. Some preliminary builds are available from Dropbox.

Some advice and warnings:

  • Add the system prefixes (/opt/local, /usr/local, /sw) and their hidden versions (with a _off suffix) to the Private section of the Spotlight preference panel, since they are renamed continuously. No other modifications are made to the system: simply delete ~/Library/Application Support/Guigna and execute defaults delete name.soranzio.guido.Guigna for a fresh restart.
  • In systems other than MacPorts and Homebrew many commands don't work since they are still sketched mock-ups.
  • Stop is not implemented yet. Forcing quitting and restarting Guigna should offer to unhide the detected prefixes. Remember that, in comparison to other traditional GUIs, Guigna is scripting the Terminal and you can always check the tasks which are executing in the shell.
    GSource is a collection of GItems
       .                         .
      /_\                       /_\
       |                         |             status: available
       |                         |                     uptodate
                                                       outdated
    GSystem                  GPackages                 inactive


    The following GSystem methods execute the corresponding command,
    update the 'items' array and return a copy:

    - list
    - installed
    - outdated
    - inactive

    The following methods build and return the corresponding commands
    as strings:

    -   installCmd(pkg)
    - uninstallCmd(pkg)
    -   upgradeCmd(pkg)
    
    The following methods execute specific commands and return the output:
   
    -     home(item)   URL of the original website
    -      log(item)   URL of the page listing the versions/commits
    -     info(item)   output of the 'info' command
    -     deps(item)   list of the dependencies/requirements
    -      cat(item)   portfile, formula, spec or makefile
    - contents(item)   list of installed files


    Other GSystem methods and properties:

    - index     dictionary of the system's items, having
                'name-system' as keys: it is used for a fast
                access when determining new and updated items

    - [name]    accessor to the indexed package carrying that name

    - prefix    /opt/local, /usr/local, /sw, /usr/pkg, ...

    - cmd       prefix + /bin/port | bin/brew | /bin/fink | ...

    - agent     passed by appDelegate and implementing the methods:
                - nodesForURL:XPath:
                - outputForCommand:
                - appDelegate (it gives access to GuignaAppDelegate)

    - outputFor shortcut for calling agent's outputForCommand: method,
                passing a format and a va_list of args
                

    GPackage properties:

    - system     weak reference to its GSystem (GSource)
      (source)

    - installed  installed version (string or nil)

    - mark       enum: install, uninstall, upgrade, fetch, ...

    - options    available variants/options/flags, joined by space

    - marked     variants/options/flags marked by the user for committing
      Options

    - *Cmd       shortcuts to self.system.*Cmd(pkg), passing itself as argument
      
    Inactive packages are not indexed and are inserted also directly in
    the appDelegate's allPackages array.

--

* The Kodkod (Leopardus guigna), also called guiña, is the smallest cat in the Americas.

icon

guigna's People

Contributors

gui-dos avatar the-samminater avatar

Watchers

 avatar

guigna's Issues

Thanks!

Just wanted to say "thank you" for this awesome application. I just started using it to manage my brew and other installs on a new computer, I never saw this application before.

It's very powerful, no other manager really comes close. I'd say it could move a bit more into the spotlight, maybe contact the brew guys or something?

Anyway, really just here to say thanks :)

Cheers,
Normen

P.S.: Using a self-compiled version from GitHub, compilation worked fine on the latest OS X / Xcode (10.15.3).

Cannot parse a NULL or zero-length data

i guess its from
GuignaAppDelegate.swift:404:self.reloadAllPackages()

Error message:

2016-10-10 21:06:01.296 Guigna[40239:6275196] Bartender: Loaded BartenderHelperNinetySix
2016-10-10 21:06:56.094 Guigna[40239:6275218] An uncaught exception was raised
2016-10-10 21:06:56.094 Guigna[40239:6275218] Error Domain=NSCocoaErrorDomain Code=3840 "Cannot parse a NULL or zero-length data" UserInfo={NSDebugDescription=Cannot parse a NULL or zero-length data}
2016-10-10 21:06:56.095 Guigna[40239:6275218] (
    0   CoreFoundation                      0x00007fff8f9054f2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff9bce473c objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff8f96c4bd +[NSException raise:format:] + 205
    3   Foundation                          0x00007fff9361df9c -[NSString(NSExtendedStringPropertyListParsing) propertyList] + 235
    4   libswiftFoundation.dylib            0x00000001007e3b4d _TFE10FoundationSS12propertyListfT_P_ + 45
    5   Guigna                              0x0000000100114953 _TFC6Guigna6ITunes9installedfT_GSaCS_8GPackage_ + 2819
    6   Guigna                              0x0000000100113d9c _TFC6Guigna6ITunes4listfT_GSaCS_8GPackage_ + 396
    7   Guigna                              0x00000001000408e4 _TFC6Guigna17GuignaAppDelegate17reloadAllPackagesfT_T_ + 1124
    8   Guigna                              0x000000010003a1c3 _TFFC6Guigna17GuignaAppDelegate29applicationDidFinishLaunchingFV10Foundation12NotificationT_U_FT_T_ + 35
    9   Guigna                              0x000000010003a287 _TTRXFo___XFdCb___ + 39
    10  libdispatch.dylib                   0x0000000100a9d070 _dispatch_call_block_and_release + 12
    11  libdispatch.dylib                   0x0000000100a8fcc5 _dispatch_client_callout + 8
    12  libdispatch.dylib                   0x0000000100aa5f8a _dispatch_async_redirect_invoke + 2837
    13  libdispatch.dylib                   0x0000000100a8fcc5 _dispatch_client_callout + 8
    14  libdispatch.dylib                   0x0000000100a94457 _dispatch_root_queue_drain + 2934
    15  libdispatch.dylib                   0x0000000100a938a5 _dispatch_worker_thread3 + 106
    16  libsystem_pthread.dylib             0x0000000100af2336 _pthread_wqthread + 1129
    17  libsystem_pthread.dylib             0x0000000100aeff91 start_wqthread + 13
)
2016-10-10 21:06:56.095 Guigna[40239:6275218] *** Terminating app due to uncaught exception 'NSParseErrorException', reason: 'Error Domain=NSCocoaErrorDomain Code=3840 "Cannot parse a NULL or zero-length data" UserInfo={NSDebugDescription=Cannot parse a NULL or zero-length data}'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff8f9054f2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff9bce473c objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff8f96c4bd +[NSException raise:format:] + 205
    3   Foundation                          0x00007fff9361df9c -[NSString(NSExtendedStringPropertyListParsing) propertyList] + 235
    4   libswiftFoundation.dylib            0x00000001007e3b4d _TFE10FoundationSS12propertyListfT_P_ + 45
    5   Guigna                              0x0000000100114953 _TFC6Guigna6ITunes9installedfT_GSaCS_8GPackage_ + 2819
    6   Guigna                              0x0000000100113d9c _TFC6Guigna6ITunes4listfT_GSaCS_8GPackage_ + 396
    7   Guigna                              0x00000001000408e4 _TFC6Guigna17GuignaAppDelegate17reloadAllPackagesfT_T_ + 1124
    8   Guigna                              0x000000010003a1c3 _TFFC6Guigna17GuignaAppDelegate29applicationDidFinishLaunchingFV10Foundation12NotificationT_U_FT_T_ + 35
    9   Guigna                              0x000000010003a287 _TTRXFo___XFdCb___ + 39
    10  libdispatch.dylib                   0x0000000100a9d070 _dispatch_call_block_and_release + 12
    11  libdispatch.dylib                   0x0000000100a8fcc5 _dispatch_client_callout + 8
    12  libdispatch.dylib                   0x0000000100aa5f8a _dispatch_async_redirect_invoke + 2837
    13  libdispatch.dylib                   0x0000000100a8fcc5 _dispatch_client_callout + 8
    14  libdispatch.dylib                   0x0000000100a94457 _dispatch_root_queue_drain + 2934
    15  libdispatch.dylib                   0x0000000100a938a5 _dispatch_worker_thread3 + 106
    16  libsystem_pthread.dylib             0x0000000100af2336 _pthread_wqthread + 1129
    17  libsystem_pthread.dylib             0x0000000100aeff91 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(Recorded Frame) 

Settings:
Homebew [x] Main Taps [x] iTunes [x]

OSX:
10.11.6 (15G1004)
MacBook Pro (Retina, Mid 2012)

workaround:
when i disable iTunes after the next restart i dont get the error

only this in logfile - that means it has nothing to do with the BartenderHelper:

2016-10-10 21:14:27.881 Guigna[45237:6312726] Bartender: Loaded BartenderHelperNinetySix

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.