Skip to content

Commit

Permalink
[WINESYNC] Allow using the "new" Wine-Staging patchinstall.py script.
Browse files Browse the repository at this point in the history
Wine-Staging switched to staging/patchinstall.py , removing the
deprecated patches/patchinstall.sh in Feb.16, 2023 commit
wine-staging/wine-staging@c1b4af9
just before the v8.2 release.

In order to maintain interoperability between older and newer
Wine-Staging versions, try to run first the new script; if it fails,
fall back to the older script.
  • Loading branch information
HBelusca authored and DarkFire01 committed Sep 12, 2023
1 parent bd846c7 commit f368990
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdk/tools/winesync/winesync.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ def create_or_checkout_wine_branch(self, wine_tag, wine_staging_tag):
self.wine_staging_repo.reset(wine_staging_target_commit, pygit2.GIT_RESET_HARD)

# run the wine-staging script
subprocess.call(['bash', '-c', self.wine_staging_src + '/patches/patchinstall.sh DESTDIR=' + self.wine_src + ' --all --backend=git-am --no-autoconf'])
if subprocess.call(['python', self.wine_staging_src + '/staging/patchinstall.py', 'DESTDIR=' + self.wine_src, '--all', '--backend=git-am', '--no-autoconf']):
# the new script failed (it doesn't exist?), try the old one
subprocess.call(['bash', '-c', self.wine_staging_src + '/patches/patchinstall.sh DESTDIR=' + self.wine_src + ' --all --backend=git-am --no-autoconf'])

# delete the branch we created
self.wine_staging_repo.checkout(self.wine_staging_repo.lookup_branch('master'))
Expand Down

0 comments on commit f368990

Please sign in to comment.