diff options
author | Trumeet | 2021-06-14 20:15:08 -0700 |
---|---|---|
committer | Trumeet | 2021-06-14 20:15:08 -0700 |
commit | 60d56a8f914c63fba485328c13a828300f084fce (patch) | |
tree | 1840debd33b6d3475701c9754c03de0359933c4a | |
download | aur-60d56a8f914c63fba485328c13a828300f084fce.tar.gz |
First Commit
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 55 | ||||
-rw-r--r-- | mingw_compile.patch | 77 | ||||
-rwxr-xr-x | winfile | 13 |
5 files changed, 169 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a67a03968bfa --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = winfile + pkgdesc = Original Windows File Manager (winfile) with enhancements + pkgver = 10.1.4.0 + pkgrel = 1 + url = https://github.com/microsoft/winfile + arch = x86_64 + license = custom + makedepends = mingw-w64-gcc + makedepends = mingw-w64-headers + depends = mingw-w64-crt + source = src::git+https://github.com/microsoft/winfile.git + source = mingw_compile.patch + source = https://patch-diff.githubusercontent.com/raw/microsoft/winfile/pull/262.patch + source = winfile + sha256sums = SKIP + sha256sums = 920e92250a36d96e232d8ca1e556531c166e5cb9137e618396ff1790eb86eced + sha256sums = 6ff49930b6e473e66e506444643edd99bd0f46278d091df22aeb9f95f7f6eacc + sha256sums = e323e64c3cc2cfc20af3d6aa1d5794ab09c2a21643d45ad7ca9c6fa111c5110e + +pkgname = winfile diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..7efc1c5f9f98 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +src/ +pkg/ +*.zst +262.patch diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..eab169ae0c8c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Yuuta Liang <yuuta@yuuta.moe> +pkgname=winfile +pkgver=10.1.4.0 +pkgrel=1 +epoch= +pkgdesc="Original Windows File Manager (winfile) with enhancements" +arch=(x86_64) +url="https://github.com/microsoft/winfile" +license=('custom') +groups=() +depends=(mingw-w64-crt) +makedepends=(mingw-w64-gcc mingw-w64-headers) +checkdepends=() +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +changelog= +source=("src::git+https://github.com/microsoft/winfile.git" +"mingw_compile.patch" +"https://patch-diff.githubusercontent.com/raw/microsoft/winfile/pull/262.patch" +"winfile") +noextract=() +sha256sums=('SKIP' + '920e92250a36d96e232d8ca1e556531c166e5cb9137e618396ff1790eb86eced' + '6ff49930b6e473e66e506444643edd99bd0f46278d091df22aeb9f95f7f6eacc' + 'e323e64c3cc2cfc20af3d6aa1d5794ab09c2a21643d45ad7ca9c6fa111c5110e') +validpgpkeys=() + +prepare() { + cd "$srcdir/src" + git checkout v$pkgver + # Fix some issues compiling on *nix (e.g. directory separator, toolchain location, header names, etc) + git apply ../mingw_compile.patch + # Pull request #262: WinFile: Fix multiple definition of variables error in MinGW + git apply ../262.patch +} + +build() { + cd "$srcdir/src" + TOOLCHAIN=x86_64-w64-mingw32- make +} + +package() { + cd "$srcdir/src" + mkdir -p "$pkgdir"/usr/share/$pkgname + mkdir -p "$pkgdir"/usr/share/licenses/$pkgname + mkdir -p "$pkgdir"/usr/bin + install -Dm755 winfile.exe "$pkgdir"/usr/share/$pkgname + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname + install -Dm755 ../winfile "$pkgdir"/usr/bin +} diff --git a/mingw_compile.patch b/mingw_compile.patch new file mode 100644 index 000000000000..11a1f405210f --- /dev/null +++ b/mingw_compile.patch @@ -0,0 +1,77 @@ +diff --git a/GNUmakefile b/GNUmakefile +index 8282ff4..a4c8ae7 100644 +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -47,21 +47,21 @@ endif + all : $(TARGET) + + $(TARGET) : $(OBJS) +- g++ -o $@ $(OBJS) $(LIBS) ++ $(TOOLCHAIN)g++ -o $@ $(OBJS) $(LIBS) + + .c.o : +- gcc -c $(CFLAGS) -I. $< -o $@ ++ $(TOOLCHAIN)gcc -c $(CFLAGS) -I. $< -o $@ + + .cpp.o : +- g++ -c $(CFLAGS) -I. $< -o $@ ++ $(TOOLCHAIN)g++ -c $(CFLAGS) -I. $< -o $@ + + src/res.o : src/res.rc src/lang/*.rc src/lang/*.dlg +- windres -DNOWINRES -I. -i src/res.rc -o src/res.o ++ $(TOOLCHAIN)windres -DNOWINRES -I. -i src/res.rc -o src/res.o + + clean : + rm -f $(OBJS) $(TARGET) + + depend: +- gcc -E -MM -w src/*.c > Makefile.depends ++ $(TOOLCHAIN)gcc -E -MM -w src/*.c > Makefile.depends + + -include Makefile.depends +diff --git a/src/res.rc b/src/res.rc +index 3edbb41..46cc506 100644 +--- a/src/res.rc ++++ b/src/res.rc +@@ -137,9 +137,9 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "winfile.exe.manifest" +
+ //Language includes
+ #pragma code_page(65001) //UTF-8
+-#include "lang\res_en-US.rc"
+-#include "lang\res_zh-CN.rc"
+-#include "lang\res_ja-JP.rc"
+-#include "lang\res_pl-PL.rc"
+-#include "lang\res_he-IL.rc"
+-#include "lang\res_de-DE.rc"
++#include "lang/res_en-US.rc"
++#include "lang/res_zh-CN.rc"
++#include "lang/res_ja-JP.rc"
++#include "lang/res_pl-PL.rc"
++#include "lang/res_he-IL.rc"
++#include "lang/res_de-DE.rc"
+diff --git a/src/suggest.c b/src/suggest.c +index 8469bef..b90f286 100644 +--- a/src/suggest.c ++++ b/src/suggest.c +@@ -16,7 +16,7 @@ + //
+ #define SUGGEST(id,err,flags,str) err, flags, id+IDS_SUGGESTBEGIN,
+ DWORD adwSuggest[][3] = {
+-#include "lang\suggest_en-US.db"
++#include "lang/suggest_en-US.db"
+ 0,0,0
+ };
+ #undef SUGGEST
+diff --git a/src/winfile.h b/src/winfile.h +index 782f80b..4b30045 100644 +--- a/src/winfile.h ++++ b/src/winfile.h +@@ -15,7 +15,7 @@ + #define NTFS
+
+ #include <windows.h>
+-#include <windowsX.h>
++#include <windowsx.h>
+ #include <setjmp.h>
+ #include <string.h>
+ #include <memory.h>
diff --git a/winfile b/winfile new file mode 100755 index 000000000000..8515b5f2d7d4 --- /dev/null +++ b/winfile @@ -0,0 +1,13 @@ +#!/bin/bash +set -e +unset WINEPREFIX +if [ -z ${XDG_DATA_HOME+x} ]; +then export WINEPREFIX="$HOME"/.local/share/winfile; +else export WINEPREFIX="$XDG_DATA_HOME"/winfile; +fi +if [ ! -d $WINEPREFIX ] ; then + mkdir -p $WINEPREFIX +fi +export WINEPATH="/usr/x86_64-w64-mingw32/bin/" +export WINEDEBUG=-all +exec wine /usr/share/winfile/winfile.exe "$@" |