Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Feature parity for win32 version - Page 2 — Gideros Forum

Feature parity for win32 version

2»

Comments

  • hgy29hgy29 Maintainer
    @MoKaLux, you were on the right track. I Have updated my repo with a working get("directory")

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited October 26
    I got openFileDialog appearing and it returns the path to the chosen file :) . Now I have to find how to pass the arguments title|path|extensions
    Here is the working and tested code I have so far: https://wiki.gideros.rocks/index.php/CPlusPlus_for_Gideros_Studio_Help#openFileDialog

    Viva Gideros and C++ o:)

    EDIT: I can now filter file extensions but it is hard coded, how do I get them from Gideros?
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited October 28
    some more progress:
    application:get(openFileDialog(title|path|extensions//help))

    I can now set the open dialog name passed via gideros (title), that was easier than I thought but now the hard stuff: how to set the extensions (not done) and the starting folder (done) via gideros :s
    The good news is that application:get(saveFileDialog(title|path|extensions//help)) should now be easy to implement!? :p

    Questions: hgy29 do you think I can push my code so far? if so where is the best place official Gideros GH or hgy29 GH?

    Thank you :)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    edited October 28
    Hi @MoKaLux, I have merged your last code with gideros, and completed it, now win32 fully support all three file dialogs on win32, including extensions. Thanks for your help, it saved me a lot of time.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited October 29
    I have merged ... and completed it, now win32 fully support all three file dialogs on win32, including extensions. Thanks for your help, it saved me a lot of time.
    I am happy this helped ;) , thank you for coding the hardest parts :p

    I am sorry but I have 2 more issues :o :
    - I cannot make os.execute work :'(
    - I cannot make lfs work :'(
    os.execute("start ".."c:\\tmp") -- "c:/tmp" "c:/tmp/" "c:\\tmp\\"  -- NOT WORKING BUT NO CRASH
    lfs = require "lfs" -- OK
    ...
    	print(application:get("directory", "pictures")) -- OK
    	lfs.chdir(application:get("directory", "pictures")) --> CRASHES THE APP :-(
    Questions: where do I find os.execute in gideros code (GH)? I couldn't find it :*

    Thank you :)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • rrraptor said:
    In this case I prefer not to touch it since it is Luau source file :s
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • good job guys, thanks for the progress

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    MoKaLux said:


    In this case I prefer not to touch it since it is Luau source file :s

    Don't worry, it is Gideros fork of luau.
    I made the change anyway:
    https://github.com/gideros/luau/commit/8db99f44c6e833be229c3d1e846ae1cb62dee2d8

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited November 3
    I tried updating to latest lfs 1.8 https://github.com/lunarmodules/luafilesystem. I copied the new 1.8 lfs lfs.cpp and lfs.h files into gideros \Build.Win\All Plugins\lfs\source, I didn't touch anything, only copy/paste :p and that worked on export for windows 64 and Gideros player :o NOT SO SURE ABOUT THIS! NEED MORE TESTS

    I found some internet links that may explain the issue but I hoped that would work with lfs 1.8 :/
    win32 LFS problem with separator

    Recent changes to path handling (most likely [0]) caused AssetCatalogTest.create_catalog_after_loading_file to fail on WIN32.

    The test relied on the resulting path to be joined with "/" as a path separator. The resulting path used both forward and back-slashes. While these do work for some API's on WIN32, mixing both in a file path isn't expected behavior in most cases, so update the tests to use native slash direction for file-paths.


    PS: I have a feeling new Gideros is coming ;)

    PS2: a screenshot

    I don't know if the capture happens before the crash or after the crash so I am not sure if callFile is the actual culprit :(

    Still trying, Viva Gideros c++ :)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    I couldn't reproduce the crash,
    os.execute("start ".."c:\\tmp")
    works for me.
  • MoKaLuxMoKaLux Member
    edited November 3
    (at) hgy29, I know os.execute now works because you did it (not me :) )

    I don't know if your comment is related to my last one, but I am trying to make lfs works with win32 :# having quite a hard time doing it :s
    MoKaLux said:

    I am sorry but I have 2 more issues :o :
    - I cannot make os.execute work :'( HGY29 FIXED IT
    - I cannot make lfs work :'(

    lfs = require "lfs" -- OK
    ...
    	print(application:get("directory", "pictures")) -- OK
    	lfs.chdir(application:get("directory", "pictures")) --> CRASHES THE APP :-(
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    lfs.chdir works here too
  • hgy29hgy29 Maintainer
    could it be because your user directory contains non Latin1 characters ? Mine is purely ASCII
  • MoKaLuxMoKaLux Member
    edited November 3
    I am sorry to insist but that doesn't work on my machine windows 10 export to win32 :'(
    My code:
    lfs = require "lfs"
    local picdir = application:get("directory", "pictures") -- OK
    print("* picture directory *:", picdir)
    -- tests
    print("* lfs.currentdir() *: ", lfs.currentdir()) -- OK
    lfs.chdir(picdir) -- CRASH
    The win32 console output without lfs.chdir(picdir):
    * picture directory *:  C:\Users\mokat\Pictures
    * lfs.currentdir() *:   C:\X_MOKA\PROJECTS\_gideros\_BUILDS\win32\PLATFORMER_CBUMP_TECS_20221101
    gideros studio debug output:
    C:/Users/mokal/Pictures
    C:\dev\gideros20221103\Build.Win
    Notice the difference between the separators!. That maybe the issue?

    AFAIK there is no non Latin characters and there are no spaces as well :s
    I am glad it is working for you.
    Could I have more people to try on their machines please?
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited November 16
    various win32 fixes (awaiting on GH)

    platform-win32.cpp:
    - getKeyboardModifiers were still activated after keyup events: fixed (tested ok)
    - added strcmp(what, "mkDir") (tested ok)
    - auto add extension to saved files

    win32.cpp:
    - mouse wheel had a * 120 which resulted in delta of 14400 (120 * 120): fixed (tested ok)
    - add missing ALT modifier to various mouse events (not tested yet)

    imho it is important to get win32 working as close as x64 as possible. I learned the hard way Qt license for x64 is very limited or very expensive :s

    Now I can port my Qt app to a win32 build and make millions B) thanks to gideros, then I may buy their Qt licence.

    Viva Gideros <3
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
Sign In or Register to comment.