Giter VIP home page Giter VIP logo

configurator's People

Contributors

yak1ex avatar

Watchers

 avatar  avatar

configurator's Issues

[cho] git 64bit

Currently, it is assumed that git has 32bit build only, but 64bit build exists.

[bootstrap] Invoke-Bootstrap fails

Invoke-Bootstrap fails by missing invoke_helper function.
It seems that Remove-Module YakSetup flushes function definition.
Moving function definitions after Remove-Module will solve this issue.

On this occasion, it is better to make a list of target modules and their contents to be external (remote) files like:

$modules=ConvertFrom-Json ((New-Object System.Net.WebClient).DownloadString('http://example.com/psmodules.json'))
foreach($module in $modules) {
#...
}

[bootstrap] Add libjpeg-turbo

Chocolatey package is too old.

https://sourceforge.net/projects/libjpeg-turbo/files/latest/download
redirects to like
Location: https://downloads.sourceforge.net/project/libjpeg-turbo/2.1.4/libjpeg-turbo-2.1.4-gcc64.exe?ts=gAAAAABjAGmZCA41160XH_p3tkw9NCChS1YHlgsZiQxwaNhydrhV5xy-w3o0wtBPJJQp1NOKs6bB3eUOxqyfoPCZJ7-6Fhbd9A%3D%3D&use_mirror=jaist&r=

In this case, the target URL should be https://sourceforge.net/projects/libjpeg-turbo/files/2.1.4/libjpeg-turbo-2.1.4-vc64.exe/download

[node-bootstrap] Prepare required stuffs

Something like

npm install --global windows-build-tools
conda create -n py27 python=2.7 anaconda
conda activate py27
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat"

[bootstrap] Consider to use Scoop

For, at least, binary installation part, Scoop may suffice, by using Extra and my own Bucket set up from BucketTemplate.

cadidates:

  • via Chocolatey
    • arduino => Extras/arduino
    • autohotkey.install => autohotkey
    • git.install => git, git-lfs
    • irfanview => Extras/ifranview
    • libreoffice-fresh => Extras/libreoffice
    • miniforge3 => Extras/mambaforge
    • mpc-hc-clsid2 => Extras/mpc-hc-fork
    • notepadplusplus => Extras/notepadplusplus
    • nvm.install => nvm
    • sysinternals => Extras/sysinternals
    • temurin => Java/temurin-jdk
    • winmerge => Extras/winmerge
  • via bootstrap.ps1
    • afxw
    • cmigemo
    • FFmpeg => ffmpeg
    • GTK
    • Hidemaru
    • KeySwap
  • Others
    • => 7zip
    • => Extras/calibre
    • => Extras/mu-editor
    • => Extras/thonny
    • => Extras/winrar

[bootstrap] scala on WSL

sudo apt install zip
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java 11.0.10.hs-adpt
sdk install sbt

[bootstrap] Perl related stuff

wget -q -O - https://cpanmin.us | perl - App::cpanminus
cpanm App::installdeps Dist::Zilla Dist::Zilla::PluginBundle::Author::YAKEX
dzil setup
cp -pR /usr/local/share/perl5/site_perl/5.26/auto/share/module/Dist-Zilla-MintingProfile-Author-YAKEX/default ~/.dzil/profiles/

[bootstrap] Add aliases

Append to "${env:USERPOFILE}\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1"

Set-Alias git "C:\Program Files\ToolCUI\Git\bin\git.exe"
function vsenv {
  Import-Module "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
  Enter-VsDevShell 9844c53b -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64"
}
function condaenv {
  & "${env:USERPROFILE}\AppData\Local\miniforge3\shell\condabin\conda-hook.ps1"
  conda activate "${env:USERPROFILE}\AppData\Local\miniforge3"
}
Set-PSReadLineKeyHandler -Key Tab -Function Complete

This might be configuration part.

[bootstrap] Setup CA certificate

For Cygwin,

cp .ca.crt /etc/pki/ca-trust/source/anchors/
update-ca-trust

For Windows native,

Import-Certificate -FilePath .ca.crt -CertStoreLocation Cert:\CurrentUser\Root

For WSL,

sudo cp .ca.crt /usr/local/share/ca-certificates
sudo update-ca-certificates

[bootstrap] Add its own tiny install helper

We might sometimes need to invoke installers not by chocolatey but by ourselves.

  • not supported by chocolatey
  • having its own update process, not so matched with chocolatey

[bootstrap] Arrange Cygwin setup.exe

We may have no way to detect a version of a local setup.exe. So, we may need to use DateTime base newer check. In this case, HTTP HEAD request to http://www.cygwin.com/setup-x86.exe is preferable.

Add shortcut with -K pubkey command line argument

ln -s `cygpath -D` desktop
ln -s `cygpath.exe -F 40`/Downloads downloads

[bootstrap] Add anaconda-related stuffs

  • gmpy2
  • shapely
  • descartes
  • plotly
    jupyter labextension install @jupyterlab/plotly-extension
  • jupyter-widgets/jupyterlab
    npm -g install webpack
    node c:\usr\local\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js config set proxy http://localhost:8118
    node c:\usr\local\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js config set https-proxy http://localhost:8118
    jupyter labextension install @jupyter-widgets/jupyterlab-manager
  • matplotlib config
    see https://qiita.com/yniji/items/3fac25c2ffa316990d0c
    copy "C:\usr\local\anaconda3\Lib\site-packages\matplotlib\mpl-data\matplotlibrc" "C:\Users\someone.matplotlib\matplotlibrc"
    font.serif          : IPAexMincho, DejaVu Serif, Bitstream Vera Serif, Computer Modern Roman, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
    font.sans-serif     : IPAexGothic, DejaVu Sans, Bitstream Vera Sans, Computer Modern Sans Serif, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif
    figure.dpi       : 160
    
  • tqdm
  • jupyter_nbextensions_configurator
  • jupyter_contrib_nbextensions
  • webbrowser
    #os.environ['HOMEDRIVE']+os.environ['HOMEPATH']+'/.jupyter/jupyter_notebook_config.py'
    import webbrowser
    webbrowser.register('firefox', None, webbrowser.GenericBrowser('C:\\Program Files\\Mozilla Firefox\\firefox.exe'))
    c.NotebookApp.browser = 'firefox'
    

[bootstrap] Add WSL-related stuffs

  • OpenSSH
    • ssh-keygen -A
    • task scheduler for sshd
      $tt=New-ScheduledTaskTrigger -AtLogOn -User WINUSER
      $ta=New-ScheduledTaskAction -Execute wsl -Argument '-u root service ssh start'
      $ts=New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries
      $task=New-ScheduledTask -Action $ta -Trigger $tt -Settings $ts
      Register-ScheduledTask "WSL sshd" -InputObject $task
      c:\cygwin64\bin\bash -l -c '/bin/cat .ssh/*.pub | wsl -u WSLUSER -- cat \>\> /home/WSLUSER/.ssh/authorized_keys'
    • pubkey
  • opam
    sudo apt install make m4 gcc unzip bubblewrap
    sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
    #opam init --disable-sandboxing # seems to be unnecessary for WSL2 
    opam init
    opam switch create 4.xx.x
    opam switch 4.xx.x
    eval $(opam env)
    #opam install opam-depext # unnecessary for opam 2.1+
    #opam depext frama-c coq # unnecessary for opam 2.1+
    opam install frama-c coq
    • ssreflect ref. https://staff.aist.go.jp/reynald.affeldt/ssrcoq/install.html
      opam repo add --set-default coq-released https://coq.inria.fr/opam/released
      opam install coq-mathcomp-ssreflect
      # opam install coq-mathcomp-fingroup coq-mathcomp-algebra coq-mathcomp-solvable coq-mathcomp-field coq-mathcomp-character coq-mathcomp-finmap coq-mathcomp-bigenough coq-mathcomp-sum-of-two-square coq-mathcomp-multinomials
      # coq-mathcomp-bigenough and coq-mathcomp-sum-of-two-square may require downgrade
  • python
    sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
    sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
    sudo apt install python3-venv
    Python2 is not install by default
    sudo apt install python-is-python3
    
  • mount on native side

[bootstrap] Add VSCode stuffs

C:\Users\<UserName>\AppData\Local\Programs\Microsoft VS Code\bin\code

Extensions

  • DavidAnson.vscode-markdownlint
  • dbaeumer.vscode-eslint
  • eg2.vscode-npm-script
  • hnw.vscode-auto-open-markdown-preview
  • jsynowiec.vscode-insertdatestring
  • ms-python.python
  • ms-vscode-remote.remote-wsl
  • ms-vscode.cpptools
  • ms-vscode.powershell
  • nickdodd79.gulptasks
  • nobuhito.printcode
  • PKief.markdown-checkbox
  • redhat.vscode-yaml
  • satokaz.vscode-memo-life-for-you
  • shd101wyy.markdown-preview-enhanced
  • streetsidesoftware.code-spell-checker
  • tht13.html-preview-vscode
  • VisualStudioExptTeam.vscodeintellicode
  • yzhang.markdown-all-in-one

[bootstrap] Add installing CraftLaunch

Local version check:

(cat "${installpath}\doc\changes.html" | ? { $_ -match "<p><strong>(.*)</strong></p>" } | select -index 0) -match "<p><strong>(.*)</strong></p>"; $matches[1]

[bootstrap] Candidates for install

Custom installation is provided by a wrapper script cho.

Candidates:

  • 7-Zip by Scoop
  • AcrobatReader
  • AutoHotkey by Scoop
  • Coq in WSL
  • FastCopy
  • Flash obsoleted
  • FFmpeg by cho
  • (FreeMind)
  • Git by cho
  • IrfanView by cho
  • JDK/JRE
  • MPC-HC by cho
  • Nodist nvm by plain chocolatey
  • Privoxy
  • Scilab
  • Sysinternals by plain chocolatey
  • WinMerge by cho

[config_maker] Proper context handling

  • A context for a target is inherited to another target.
    • For context separation, it is necessary to call like Object.assign({}, origContext).
    • On the other hand, calling vm.createContext() is necessary for each context.
  • Some scripts for context preparing should be shared for different targets.

[bootstrap] Arrange chocolatey install

  • Ensure \Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 should have more than 4 bytes.
  • choco feature enable -n useRememberedArgumentsForUpgrades

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.