Code Monkey home page Code Monkey logo

au-packages's Introduction

Build status

Update status

chocolatey/burck1

This repository contains chocolatey automatic packages.
The repository is setup so that you can manage your packages entirely from the GitHub web interface (using AppVeyor to update and push packages) and/or using the local repository copy.

Prerequisites

To run locally you will need:

In order to setup AppVeyor update runner please take a look at the AU wiki AppVeyor section.

Create a package

To create a new package see Creating the package updater script.

Testing the package

In a package directory run: Test-Package. This function can be used to start testing in chocolatey-test-environment via Vagrant parameter or it can test packages locally.

Automatic package update

Single package

Run from within the directory of the package to update that package:

cd <package_dir>
./update.ps1

If this script is missing, the package is not automatic.
Set $au_Force = $true prior to script call to update the package even if no new version is found.

Multiple packages

To update all packages run ./update_all.ps1. It accepts few options:

./update_all.ps1 -Name a*                         # Update all packages which name start with letter 'a'
./update_all.ps1 -ForcedPackages 'cpu-z copyq'    # Update all packages and force cpu-z and copyq
./update_all.ps1 -ForcedPackages 'copyq:1.2.3'    # Update all packages but force copyq with explicit version
./update_all.ps1 -ForcedPackages 'libreoffice-streams\fresh:6.1.0]'    # Update all packages but force libreoffice-streams package to update stream `fresh` with explicit version `6.1.0`.
./update_all.ps1 -Root 'c:\packages'              # Update all packages in the c:\packages folder

The following global variables influence the execution of update_all.ps1 script if set prior to the call:

$au_NoPlugins = $true        #Do not execute plugins
$au_Push      = $false       #Do not push to chocolatey

You can also call AU method Update-AUPackages (alias updateall) on its own in the repository root. This will just run the updater for the each package without any other option from update_all.ps1 script. For example to force update of all packages with a single command execute:

updateall -Options ([ordered]@{ Force = $true })

Testing all packages

You can force the update of all or subset of packages to see how they behave when complete update procedure is done:

./test_all.ps1                            # Test force update on all packages
./test_all.ps1 'cdrtfe','freecad', 'p*'   # Test force update on only given packages
./test_all.ps1 'random 3'                 # Split packages in 3 groups and randomly select and test 1 of those each time

Note: If you run this locally your packages will get updated. Use git reset --hard after running this to revert the changes.

Pushing To Community Repository Via Commit Message

You can force package update and push using git commit message. AppVeyor build is set up to pass arguments from the commit message to the ./update_all.ps1 script.

If commit message includes [AU <forced_packages>] message on the first line, the forced_packages string will be sent to the updater.

Examples:

  • [AU pkg1 pkg2]
    Force update ONLY packages pkg1 and pkg2.
  • [AU pkg1:ver1 pkg2 non_existent]
    Force pkg1 and use explicit version ver1, force pkg2 and ignore non_existent.

To see how versions behave when package update is forced see the force documentation.

You can also push manual packages with command [PUSH pkg1 ... pkgN]. This works for any package anywhere in the file hierarchy and will not invoke AU updater at all.

If there are no changes in the repository use --allow-empty git parameter:

git commit -m '[AU copyq less:2.0]' --allow-empty
git push

Start using AU with your own packages

To use this system with your own packages do the following steps:

  • Fork this project. If needed, rename it to au-packages.
  • Delete all existing packages.
  • Edit the README.md header with your repository info.
  • Set your environment variables. See AU wiki for details.

Add your own packages now, with this in mind:

  • You can keep both manual and automatic packages together. To get only AU packages any time use Get-AUPackages function (alias lsau or gau)
  • Keep all package additional files in the package directory (icons, screenshots etc.). This keeps everything related to one package in its own directory so it is easy to move it around or remove it.

au-packages's People

Contributors

majkinetor avatar burck1 avatar jtcmedia avatar dennisgaida avatar gep13 avatar yodadacoda avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Forkers

yodadacoda

au-packages's Issues

Silent install package for Razer Synapse 3

So, I'm not entirely sure how you'll feel about how I had to go about accomplishing the silent install package for Razer Synapse 3 because I'm not sure how you would go about automating it, but here goes.

The only way that I was able to accomplish the complete silent install of Razer Synapse 3 was to take a look at the install log and try and recreate how the web installer installs all of the components for Razer Synapse 3, but luckily the web installer downloads all of the components using publicly accessible URLs.

There are 6 components in total:

  • Razer Synapse Dependencies
  • Razer Central
  • GMS
  • Razer String Translations
  • Razer Synapse Configuration Data
  • Razer Synapse

Also, the web installer installs them in that specific order, I don't know how much that really matters but you do have to specify if each one is the last installed module with /ISLASTMODULE=False or /ISLASTMODULE=True. By installing each of these components separately like this all of them can be installed silently with the /S or /silent flags. Some of the components you also have to specify the install path which is C:\Program Files (x86)\Razer by default.

I'll go ahead and create a PR for how I setup my install script for the silent install, but like I said I don't know what you'll actually want to do with it because the only way that I can figure out how to get the updated links for the components is to install Synapse 3 using the web installer and looking at the install log.

There might be a way to see how the installer gets the links itself but I would have to decompile the web installer and I'm still looking into that.

Edit: I should also mention that these are just the required components and that none of the optional components are installed with this.

Silent install package for Razer Synapse 2

Sorry it's taken me so long to get back to you on creating the issue for creating the silent install package for Razer Synapse 2. I was working with the maintainer of the Battle.net package to try and get some fixes submitted for that package and realized that things get weird when you include the installer file within the package because then you have to make sure that you have redistributable rights at that point and my original implementation included the MSI file that the Razer Synapse 2 installer extracts. And the Razer redistribution rights don't allow us to do that and publish the package to the public feed.

Anyways, I have since found a way that we can get Razer Synapse 2 package to be silently installed without having to include the MSI file in the package, although something extra that you are going to have to work out since this is an automated package is how you're going to get the checksum of the internal file. The basic premise is to unzip the Web installer and within the unzipped files there is the internal installer that you can pass the silent install flags that you are using in your package to make it be silently installed.

The steps that I did to get the silent install package:

  1. Download the Web installer from https://dl.razerzone.com/drivers/Synapse2/win/Web_Razer_Synapse_Installer_v2.21.24.41.exe
  2. Unzip that file using Install-ChocolateyZipPackage to the $toolsDir
  3. Now there will be a $PLUGINSDIR in the $toolsDir and in there will be the executable that can take /s /v"/qn" for silent args, grab that filename with Get-ChildItem filtering for *.exe and Select-Object or something similar
  4. Install that executable with Install-ChocolateyInstallPackage and the previously mentioned silent args

I will also create a PR with the code in the install script that I used and then you can do with it what you want and figure out how you want to handle automatically grabbing the checksum of the internal installer.

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.