Forums

[Script] Simple Shop

Need help

Auteur Réponses
simpleshop Mardi 2 Octobre 2012 à 18:31
simpleshopAnonymous

I need help in finishing my script, so that program will be installed. Program requeriment is Microsoft .NET 3.5 and mdac28. Program is working well via Play on Linux, manual install, but I would like to share it via script.

Here is my work at script for now, but it's not working when I tried to run it manually.

Thank you... after script will be working we would donate to project...

#!/bin/bash
# Date : (2012-10-02 18-00)
# Last revision : (2012-10-02 18-00)
# Wine version used : 1.4.1
# Distribution used to test : Ubuntu 12.04 LTS x86
# Author : RED ZION d.o.o., Simon Dolenec
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Simple Shop"
PUBLISHER="RED ZION d.o.o."
PREFIX="simpleshop"

POL_GetSetupImages "http://www.simple-shop.si/images/POL-top.jpg" "http://www.simple-shop.si/images/POL-left.jpg" "$TITLE"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "$PUBLISHER" "http://www.simple-shop.si" "$PUBLISHER" "$PREFIX"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate

POL_System_TmpCreate "$PREFIX"

POL_Call POL_Install_dotnet35
POL_Call POL_Install_mdac28

POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

if [ "$INSTALL_METHOD" = "LOCAL" ]
then
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE $(eval_gettext 'installation')"
    POL_SetupWindow_wait "$(eval_gettext 'Installation in progress.')" "$TITLE installation"
    POL_Wine start /unix "$APP_ANSWER"
elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
    cd "$POL_System_TmpDir"
    POL_Download "http://www.simple-shop.si/prenos/SShop.exe"
    POL_SetupWindow_wait "$(eval_gettext 'Installation in progress.')" "$TITLE $(eval_gettext 'installation')"
    POL_Wine start /unix "$POL_System_TmpDir/SShop.exe"
fi

POL_System_TmpDelete

POL_Shortcut "SShop.exe" "$TITLE"
POL_Shortcut "update.exe" "Check for updates"

POL_SetupWindow_Close
exit

Edité par simpleshop

simpleshop Vendredi 5 Octobre 2012 à 7:29
simpleshopAnonymous

Somebody?
simpleshop Mercredi 24 Octobre 2012 à 10:13
simpleshopAnonymous

Is there anybody who can help me to finish install script?
For normal use program need:
.NET Framework 3.5 SP1
.mdac28

I'm prepearing to pay for help with script.. Thank you!
petch Mercredi 24 Octobre 2012 à 16:39
petch

Hi,

I'd recommend using a specific Wine version instead of using System one. Every distribution has its idea about how Wine should work, 32bit, different ways of compiling it for 64bit, wineserver not in $PATH, etc. so better not rely on that.
I'd recomment 1.4.1 at this point, since there's some ongoing issues with dotnet30sp1 and dotnet35 (http://www.playonmac.com/en/issue-1439.html) but they seem to run fine with 1.4.1

POL_Wine_PrefixCreate "1.4.1"


"start /unix" is useless 95% of the time, and once in a while it has bad side effects.
This is the case here, it makes running your installer non-blocking, so just after starting the installation the script goes on with removing all files and creating shortcuts.
Just drop "start /unix".

    POL_Wine "$APP_ANSWER"
...
    POL_Wine "$POL_System_TmpDir/SShop.exe"


There's two SShop.exe in the installed software, and POL_Shortcut picks the "wrong" one (the one in C:\\SShop\\SQLE) on my box. So you'll have to specific the executable path relative to drive_c to remove the ambiguity. That required PlayOnLinux 4.0.15


...
POL_SetupWindow_Init
POL_RequiredVersion "4.0.15" || POL_Debug_Fatal "$APPLICATION_TITLE 4.0.15 is required to install $TITLE"
POL_Debug_Init
...
POL_Shortcut "SShop/SShop.exe" "$TITLE"


Shortcuts will be sorted by name, and they all share the same namespace. I recommend that you rename "Check for updates" to "$TITLE - Check for updates" or similar to keep them close, and to avoid name clashes.

Finally both programs crash on my box, I don't know why.


[10/24/12 16:39:14] - Running wine-1.4.1 SShop.exe (Working directory : /home/petchema/.PlayOnLinux/wineprefix/simpleshop/drive_c/SShop)
err:seh:setup_exception_record stack overflow 1064 bytes in thread 0052 eip 7bc3f2ef esp 00240f08 stack 0x240000-0x241000-0x340000

Edité par petch

simpleshop Vendredi 4 Janvier 2013 à 23:05
simpleshopAnonymous

Many thanks for your answer..
I will try edit script with your proposals and I will report if it's working...

About your error...
As seen on:
http://www.simple-shop.si/en/test-simple-shop-na-ubuntu-12-04-lts-preko-wine-play-on-linux.html

Maybe you should edit file "SShop.exe.config" at program root (C:\\SShop) to show the right path to database file (MS SQL CE).

Change text “.\\db.sdf” to “C:\\SShop\\db.sdf” as seen on pictures:
http://www.simple-shop.si/images/stories/test-simple-shop-na-ubuntu-12-04-lts-preko-wine-play-on-linux/43.png
http://www.simple-shop.si/images/stories/test-simple-shop-na-ubuntu-12-04-lts-preko-wine-play-on-linux/44.png

Please report if it's working... Also, maybe you have problem with installer... The right installer download link is:
http://www.simple-shop.si/prenos/SShop.exe (85,5MB).
simpleshop Vendredi 4 Janvier 2013 à 23:09
simpleshopAnonymous

Can we edit script, which should download file (SShop.exe.config) after installation process? So that people do not need to edit file manualy, and that I publish Linux edition file on official web site to be downloaded by script, the same as for POL-top and POL-left image..
petch Samedi 5 Janvier 2013 à 1:21
petch

Either that, or use local text manipulation tools (for example sed) to modify the configuration file.
simpleshop Samedi 5 Janvier 2013 à 2:04
simpleshopAnonymous

My latest script.. now install working, all programs (.exe) working, except SShop.exe (main program). Will find what is going wrong - something with connection to SQL CE database...

#!/bin/bash
# Date : (2012-10-02 18-00)
# Last revision : (2013-01-05 02-00)
# Wine version used : 1.4.1
# Distribution used to test : Ubuntu 12.04 LTS x86
# Author : RED ZION d.o.o., Simon Dolenec
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

POL_GetSetupImages "http://www.simple-shop.si/images/POL-top.jpg" "http://www.simple-shop.si/images/POL-left.jpg" "$TITLE"

POL_RequiredVersion "4.0.15" || POL_Debug_Fatal "Play on Linux 4.0.15 or newer is required to install $TITLE"
POL_SetupWindow_Init
TITLE="Simple Shop"
PREFIX="simpleshop"

COMPANY="RED ZION d.o.o."
COMPANY_URL="http://www.simple-shop.si/"
URL="http://www.simple-shop.si/prenos/SShop.exe"
FILE="SShop.exe"
EXECUTABLE="SShop.exe"
AUTHOR="Simon"

DOWNLOAD_RUN="Downloading..."
INSTALL_RUN="Installation in progress..."
WAIT_END="Click on \\"Forward\\" ONLY when the\\n$TITLE installation is finished."
SUCCES="$TITLE has been installed successfully."

POL_SetupWindow_presentation "$TITLE" "$COMPANY" "$COMPANY_URL" "$AUTHOR" "$PREFIX"

select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
POL_Wine_PrefixCreate "1.4.1"
POL_SetupWindow_prefixcreate

POL_Call POL_Install_dotnet20
POL_Call POL_Install_dotnet35
POL_Call POL_Install_mdac28

cd "$REPERTOIRE/tmp"
POL_SetupWindow_download "$DOWNLOAD_RUN" "$TITLE" "$URL"
POL_SetupWindow_wait_next_signal "$INSTALL_RUN" "$TITLE"
wine "$FILE"
POL_SetupWindow_detect_exit
rm "$FILE"

POL_Shortcut "SShop/SShop.exe" "$TITLE"
POL_Shortcut "update.exe" "$TITLE - Check for updates"

POL_SetupWindow_message "$SUCCES" "$TITLE"
POL_SetupWindow_Close
exit
simpleshop Mercredi 16 Janvier 2013 à 10:06
simpleshopAnonymous

I figure it out why main program do not working...

The basic problem is, that Microsoft .NET Framework 3.5 SP1 is not installed as should be and becouse minimal requirement of program Simple Shop which needs .net 3.5 sp1 installed program failed to run.

Can we somehow fix .net 3.5 sp1 install?
hyperfang8 Jeudi 17 Janvier 2013 à 23:17
hyperfang8

I tried replacing .NET with mono and got some interesting results...
Here is the script with mono version: http://pastebin.com/A63Z00Hs !
I used 1.5.18 wine version since it seems that wine 1.4.1 complains something about .db file but 1.5.18 runs fine!
The program itself runs almost perfectly that is until you try actualy using programs.
Some dialogs have visual glitches and throw errors.
What i think is that author should try and port the program to native linux (mono).
Mono is open source replacement for .NET environment.
You can finde more about mono here: http://www.mono-project.com/
And i hope this page can be of help to: http://www.mono-project.com/Guide:_Porting_Winforms_Applications
Though i think program developers will need more than that to port it.
But hey, microsoft is abandoning .Net , mono could be good solution to keep it running.

Edit: It seems that main program actualy isn't writen in mono.

Edit 2: Dotnet35 , dotnet30, dotnet30sp1 scripts are seriusly broken, bugged and unreliable hope that we can patch them soon.
I guess the main problem is that those scripts have some kind of "compatability" for older wine releases like 1.1 and 1.2.

Edité par hyperfang8


Avoid the Gates of Hell. Use
Linux.
simpleshop Jeudi 5 Janvier 2017 à 22:03
simpleshopAnonymous

After some years I present working copy of Simple Shop on Ubuntu via Play on Linux.

Article is published on:
https://www.simple-shop.si/en/working-copy-of-simple-shop-on-ubuntu-16-04-play-on-linux

So what is now procedure to publish in software list?
I think that probably there is some interest in working fiscal invoice software for POS and A4 format..

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com