itkach / aard2-web

Mozilla Public License 2.0
70 stars 15 forks source link

how to run on windows with multi dictionary #8

Closed blackholeearth closed 6 years ago

blackholeearth commented 6 years ago

""*"" parameter at readme doesnt work run .

java -Dslobber.browse=true -jar "D:\Downloads\aard2\aard2-web-0.7.jar"   "D:\Downloads\aard2\*.slob"  

this works

java -Dslobber.browse=true -jar "D:\Downloads\aard2\aard2-web-0.7.jar"   "D:\Downloads\aard2\freedict-eng-tur-0.2.1.slob"  

if i had soruce code i maybe i could fix there but idont have it.


also . if im not wrong previous version is c++ you compiled that to all environments or other thing that i dont know .that must have been hard. and now this is java , in theory this look easier to maintain was it?

i wantted to know your opinion. about cross platform thing / c+ / java , also brief info how to do this things

sorry to bother.
lots of repos lots of effort.


edit managed to fake bash glob like this. maybe helps other winusers

@echo off

@echo:
echo You Have To Run As Bat File, Copy Pasting inTo CMD may Not Work!!!
@echo:
echo folder Structure Should be like this:
@echo:
echo Folder/
echo     +run_aar2.bat   (this bat file)
echo     +aard2.jar
echo     +mydict1.slob
echo     +mydict2.slob
@echo:

setlocal enabledelayedexpansion enableextensions
set LIST=
for %%x in (*.slob) do set LIST=!LIST! "%~dp0\%%x"
set LIST=%LIST:~1%

echo   Check if Combined  Paths Right:
@echo: 
echo  %LIST%
@echo: 

java -Dslobber.browse=true -jar "%~dp0\aard2-web-0.7.jar"  %LIST%
itkach commented 6 years ago

Examples in README are written for a typical UNIX shell, such as bash.* is shell glob pattern, the shell does the expansion. Looks like you're running this on Windows, where cmd.exe doesn't support this.

if i had soruce code i maybe i could fix there but idont have it.

You are commenting on a source code repository, not sure how is it that you don't have it.

... maybe i could fix there

The deficiency is really in Windows' cmd.exe, so I take issue with word "fix". More like "work around Windows limitations", perhaps the application could do that...

if im not wrong previous version is c++ you compiled that to all environments or other thing that i dont know .that must have been hard.

Original aarddict for desktop was written with PyQt which is a Python language binding for Qt, a C++ application framework. I built installers for Windows and Mac, but it was extremely tedious and brittle.

java , in theory this look easier to maintain was it?

Yes. Java's motto from the early days "write once, run anywhere" was often derided, but is actually not that far from reality.

your opinion. about cross platform thing / c+ / java ,

Which one is more suitable depends on the application, goals, development team and target audience, but in general java is much easier.

brief info how to do this things

Not sure what you're asking here

blackholeearth commented 6 years ago

thanks for answering all the questions (maybe annoying for you) .

Examples in README are written for a typical UNIX shell, such as bash.* is shell glob pattern, the shell does the expansion. Looks like you're running this on Windows, where cmd.exe doesn't support this.

i search "" for unix it acts like regex (..slob) doesnt it ? its for finding single file.

does (aard-web) support multiple specifying dictionaries in the parameters? ie:


java -Dslobber.browse=true -jar "D:\Downloads\aard2\aard2-web-0.7.jar"   "D:\Downloads\aard2\dict1.slob;D:\Downloads\aard2\dict2.slob"  
itkach commented 6 years ago

does (aard-web) support multiple specifying dictionaries in the parameters?

It does.

ie:

java -Dslobber.browse=true -jar "D:\Downloads\aard2\aard2-web-0.7.jar"   "D:\Downloads\aard2\dict1.slob;D:\Downloads\aard2\dict2.slob"  

Not like this. Each command line argument is a file name (see https://github.com/itkach/slobber/blob/master/src/main/java/itkach/slobber/Slobber.java#L755), so multiple dictionaries can be specified like so:

java -Dslobber.browse=true -jar D:\Downloads\aard2\aard2-web-0.7.jar D:\Downloads\aard2\dict1.slob D:\Downloads\aard2\dict2.slob
blackholeearth commented 6 years ago

Yes. İ saw that main args in code . All args dict path . At first java jar arg confusedme anyway. i made script for multi dict in folder. And added to my first post. Thanks for good intention.