Skip to content

Commit

Permalink
add pre-init hook
Browse files Browse the repository at this point in the history
  • Loading branch information
mmtrt committed Jan 22, 2024
1 parent 4115d15 commit 5f17bcc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions snap/local/src/pre-init
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

if [[ -d "$SNAP/winedata/wine" ]]; then
cp -urs "$SNAP/winedata/wine" "${XDG_CACHE_HOME}"
cp -urs "$SNAP/winedata/winetricks" "${XDG_CACHE_HOME}"
fi
6 changes: 3 additions & 3 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ parts:
override-build: |
craftctl default
set -ex
mkdir -p sommelier/hooks ; mv pre-install sommelier/hooks ; cp -R -p sommelier $CRAFT_PART_INSTALL
mkdir -p sommelier/hooks ; mv pre-install sommelier/hooks ; mv pre-init sommelier/hooks ; cp -R -p sommelier $CRAFT_PART_INSTALL
# Pre download required dependencies
wget -q "https://dl.winehq.org/wine/wine-mono/8.1.0/wine-mono-8.1.0-x86.msi" -P winedata/wine
wget -q "https://downloads.cncnet.org/CnCNet5_YR_Installer.exe" -P winedata
Expand All @@ -89,8 +89,8 @@ parts:
# initializes and configures Wine and installs the Windows application.
sommelier:
plugin: make
source: https://github.com/mmtrt/sommelier-core.git
source-branch: "core22"
source: https://github.com/snapcrafters/sommelier-core.git
source-branch: "master"
build-packages:
- libc6-dev-i386
- gcc-multilib

0 comments on commit 5f17bcc

Please sign in to comment.