You are not logged in.
If you can do pull requests into my repository it will be very nice!
Currently:
./PKGBUILD
# Maintainer: Mateus Mercer <mateusmercer@gmail.com>
pkgname=algodoo-wine
_pkgname=Algodoo
pkgver=2.1.0
_pkgver=2_1_0
pkgrel=1
pkgdesc="A unique 2D-simulation software from Algoryx Simulation AB (Using Wine)."
arch=("any")
url="http://algodoo.com"
license=('custom:Algodoo')
depends=('wine'
'desktop-file-utils'
'winetricks'
)
makedepends=(
'innoextract'
)
optdepends=(
'lib32-nvidia-utils: 32 bits NVIDIA driver for Algodoo'
)
_alg="${_pkgname}_${_pkgver}-Win32.exe"
source=("http://www.algodoo.com/download/${_alg}"
"LICENSE"
"algodoo.sh"
"algodoo.desktop"
"algodoo.png"
)
sha256sums=("3e65d18c63b20c17aaedd5c96f9751d914dc5e024ef001fc5cf569b94255caa4"
"3a46622a459bd0148d52988a7d5bcd7432facfe6af30b33a2f6db5f4f04f5bb2"
"12fe213da742a3bea365c2a345a610262bf23524e498e3485900a55016f5f984"
"19f2775207fe72643ff4a787afb478c8d511b7eb25f632f54dc229a064b1c41c"
"0f7e995cd90df87236404db4c28789e23eef7341cc47f321f1ea6ce30fa913f1"
)
package() {
# Create common folders
mkdir -p "$pkgdir/usr/share/algodoo"
# Extract installer using innoextract
innoextract "${_alg}" --output-dir "$pkgdir/usr/share/algodoo"
# Correct filesystem perms
chmod -R u=rwX,go=rX "$pkgdir"/usr/share
# Install the license
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# Install the script
install -Dm755 algodoo.sh "$pkgdir/usr/bin/algodoo"
# Install the icon
install -Dm644 algodoo.png "$pkgdir/usr/share/pixmaps/algodoo.png"
# Install the .desktop
install -Dm644 algodoo.desktop "$pkgdir/usr/share/applications/algodoo.desktop"
}
./algodoo.sh
#!/bin/bash
# Wine prefix not set, use default: man wine
if [ -z "$WINEPREFIX" ]; then
export WINEPREFIX=$HOME/.wine
fi
progName="algodoo"
progRealPath="/usr/share/$progName/app"
progBin="Algodoo.exe"
wineTricksLog="$WINEPREFIX/winetricks.log"
# Detects if corefonts is installed and install it if don't
if ! grep -qw corefonts $wineTricksLog; then
winetricks -q corefonts
fi
# Detects if vcrun2008 is installed and install it if don't
if ! grep -qw vcrun2008 $wineTricksLog; then
winetricks -q vcrun2008
fi
# msvcp90 MUST be overriden https://www.reddit.com/r/linuxquestions/comments/6g077y/wine_error_class_not_registered/dqn9c8k/
export WINEDLLOVERRIDES="msvcp90=n"
wine $progRealPath/$progBin "$@"
./algodoo.desktop
[Desktop Entry]
Name=Algodoo
GenericName=Physics Simulator
Comment=A unique 2D-simulation software from Algoryx Simulation AB.
Encoding=UTF-8
Version=2.1.0
Type=Application
Terminal=false
Icon=algodoo
Exec=algodoo -immediate %F
Categories=Games;Education;
./LICENSE
Algodoo License
Read these terms carefully before installing Algodoo. By installing Algodoo, you acknowledge that you have read this license agreement, that you understood it, and that you agree to be bound by its terms. If you do not agree to the terms and conditions of this license agreement, you should cancel the installation of the software.
This version of Algodoo covered under this license is provided free of charge from Algoryx for Mac and PC
Algodoo is proprietary software owned by Algoryx Simulation AB (“Algoryx”). Algodoo may also be made available as a commercial product or service from certain web-shops and portals (for example: Apple AppStore) or resellers as decided by Algoryx. If you have purchased such a license, the existence of this free license does not entitle you any sort of economic compensation or money back.
Algodoo may not be reproduced or distributed in any form outside the specific control of Algoryx, without prior written permission by Algoryx. Algodoo may not be used for promotion of third party products or systems without explicit written permission by Algoryx. Algodoo is a internationally registered trademark owned and protected by Algoryx. The software or the Algodoo trademark may not be used to endorse or sell other commercial products or services without the written permission by Algoryx. Algodoo may not be preinstalled or bundled with commercially offered hardware, software or services without the written permission by Algoryx.
The software is provided as is, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement of third party rights. In no event shall the authors or copyright holders, Algoryx Simulation AB, be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out or in connection with the software or the use or other dealings in the software.
Enjoy Algodoo!
About the part regarding "Algodoo may not be reproduced or distributed in any form outside the specific control of Algoryx", I've already asked them, in their forums.
I see one problem in my PKGBUILD already, the "lib32-nvidia-utils" dependency is only needed for nvidia graphic card systems. How do I only install the dependency in a nvidia environment only?
Thank you for reading .
Edit: Update files.
Last edited by MatMercer (2018-04-10 21:51:47)
Offline
# Correct filesystem perms
find "$pkgdir"/usr/share -type f -exec chmod 644 "{}" \;
find "$pkgdir"/usr/share -type d -exec chmod 755 "{}" \;
You can shorten the above to chmod -R u=rwX,go=rX "$pkgdir"/usr/share (note the capital X)
# Core fonts, needed for Algodoo
sudo -H -u $USER bash -c 'winetricks -q corefonts'
# C++ 2008 native runtime, needed for Algodoo
sudo -H -u $USER bash -c 'winetricks -q vcrun2008'
Don't do this. If these commands are required to make the application work, then run them as part of a post install script, not in the PKGBUILD. And don't assume the user has sudo installed -- why are you using sudo to run these commands as the current user anyway?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
pkgdesc="Algodoo is a unique 2D-simulation software from Algoryx Simulation AB (Using Wine)."
https://wiki.archlinux.org/index.php/PKGBUILD#pkgdesc
'innoextract'
Should that not be a makedepends?
'lib32-nvidia-utils'
What is this needed for?
'winetricks'
Should this not be a makedepends as well?
_wine="wine-1.8-rc1"
This variable appears unused
source=("${_alg}::http://www.algodoo.com/download"
This downloads a web page.
Could you please explain the need for the script file with its copying and linking.
Offline
Responding to loqs review.
pkgdesc="Algodoo is a unique 2D-simulation software from Algoryx Simulation AB (Using Wine)."
I fixed it, changed to "A unique 2D-simulation software from Algoryx Simulation AB (Using Wine)."
'innoextract'
Should that not be a makedepends?
'winetricks'
Should this not be a makedepends as well?
Added to makedepends.
'lib32-nvidia-utils'
What is this needed for?
Added to optdepends "lib32-nvidia-utils: 32 bits NVIDIA driver for Algodoo".
_wine="wine-1.8-rc1"
This variable appears unused
Oops, I was testing some stuff, variable removed.
source=("${_alg}::http://www.algodoo.com/download"
This downloads a web page.
I didn't tested the link :#, I fixed it.
Could you please explain the need for the script file with its copying and linking.
I've noticed that algodoo doesn't need to copy/linking their files, removed it.
Thanks for all the tips and the fast response!
Offline
What.
makedepends are specifically for things that are required during build but are *not* in depends -- or are only in split PKGBUILD depends within the package_foo() function.
EDIT: bad eschwartz, don't review things 12 minutes after you wake up.
winetricks should be kept in depends and moved from package() to the wrapper script as I mentioned below... it isn't in both places...
Also,
sudo -H -u $USER bash -c 'winetricks -q corefonts'
# C++ 2008 native runtime, needed for Algodoo
sudo -H -u $USER bash -c 'winetricks -q vcrun2008'
This won't work and is strictly prohibited.
It needs to be used at runtime, in the wineprefix used. *Not* in the PKGBUILD where it won't even affect the packaged software.
Also this is really weird, running sudo in order to switch to the user you are already running as??? This is not how sudo works, or alternatively I have no clue why you think you aren't running as your own user...
Last edited by eschwartz (2018-04-09 15:08:48)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Responding to fukawi2 review.
# Correct filesystem perms find "$pkgdir"/usr/share -type f -exec chmod 644 "{}" \; find "$pkgdir"/usr/share -type d -exec chmod 755 "{}" \;
You can shorten the above to chmod -R u=rwX,go=rX "$pkgdir"/usr/share (note the capital X)
I shortened it, very clever!
# Core fonts, needed for Algodoo sudo -H -u $USER bash -c 'winetricks -q corefonts' # C++ 2008 native runtime, needed for Algodoo sudo -H -u $USER bash -c 'winetricks -q vcrun2008'
Don't do this. If these commands are required to make the application work, then run them as part of a post install script, not in the PKGBUILD. And don't assume the user has sudo installed -- why are you using sudo to run these commands as the current user anyway?
run them as part of a post install script, not in the PKGBUILD
How I manage to do that? What do you mean by "post install script"?
don't assume the user has sudo installed
That was my mistake, I didn't thought about that. I'll remove it after I create the post install script.
Offline
I'll remove it after I create the post install script.
NO. A post-install script won't work either -- it needs to run as your user, at runtime. You need a wrapper script to allow users to launch the software for the first time which will do this.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
MatMercer wrote:I'll remove it after I create the post install script.
NO. A post-install script won't work either -- it needs to run as your user, at runtime. You need a wrapper script to allow users to launch the software for the first time which will do this.
Exactly how I was creating the $HOME/.algodoo directory right? I'll need to detect if c++2008 runtime and corefonts is installed when the user run the program for the first time? Winetricks isn't fast, running the command "winetricks corefonts" causes a delay, that's why I need to detect if the 2 packages are installed into the current wine environment, to run the winetricks or not.
I'll check if winetricks has a tool to check if a dependency is already installed for a wine environment.
Thanks for the response!
Offline
MatMercer wrote:I'll remove it after I create the post install script.
NO. A post-install script won't work either -- it needs to run as your user, at runtime. You need a wrapper script to allow users to launch the software for the first time which will do this.
Take a loot at algodoo.sh now. I think that I managed to run winetricks only at the first run of Algodoo, if needed.
Offline
This looks much more reasonable, though I still don't understand why the current AUR package??? uses linux binaries but this uses Windows ones via WINE.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
The current version in AUR of Algodoo is very outdated and the dependencies inside PKGBUILD can't be found.
Offline
Well, that is exceedingly awkward. I didn't bother to look at your interactive video, but every single dependency listed there is available, so maybe your AUR helper (assuming you used one) is broken.
As for out of date, can it not be updated? How is this an answer to my question "why use Windows binaries via wine, instead of linux binaries"?
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
@Eschwartz: It seems as if the version in the AUR is the last linux build. The website only lists downloads for windows, mac and ipad.
In that case, I'd suggest to add a "-wine" suffix to the package name and not replace the linux version.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
@Eschwartz: It seems as if the version in the AUR is the last linux build. The website only lists downloads for windows, mac and ipad.
In that case, I'd suggest to add a "-wine" suffix to the package name and not replace the linux version.
Exactly. I will add the -wine sufix. After that the package will be fine to be uploaded to the AUR?
Offline
I updated the package name to algodoo-wine and reseted the release to 1. Is everything ok to it be uploaded to AUR now?
Thanks for all the really fast responses. This is the most active community I've ever seen.
Offline
algodoo-wine is now avaible in AUR.
Offline