Shoes packager problem

2019-07-12 20:34发布

I used packager to make an executable file for the following code:

Shoes.app do
  stack :margin => 10 do
    @edit = edit_box :width => 1.0 do
      @para.text = @edit.text
    end
    @para = para ""
  end
end

then I got error message:

Error in C:/Program Files/Common Files/Shoes/0.r1134/lib/shoes.rb line 394utf.rb: 10:
compiler error
utf.rb: 10: Invalid char '\377' in expression
utf.rb: 10: Invalid char '\337' in expression
utf.rb: 10: Invalid char '\337' in expression
utf.rb: 10: Invalid char '\331' in expression
utf.rb: 10: Invalid char '\377' in expression
utf.rb: 10: Invalid char '\270' in expression
utf.rb: 10: Invalid char '\304' in expression

Could someone give me a hand?

BR,
DorianG

5条回答
看我几分像从前
2楼-- · 2019-07-12 20:57

I'm also getting "Invalid char '\377' in expression". I'm saving as UTF-8 (UNIX LF) so that's not the problem, it's because I'm using underscore ('_') in my app-names. Apparently you can't use the shoes-packager on files with underscore in the name which is annoying as underscore is the ruby-convention...

查看更多
疯言疯语
3楼-- · 2019-07-12 21:10

Might be something here wherein saving the file in BOM-less UTF-8 is suggested.

查看更多
做个烂人
4楼-- · 2019-07-12 21:12

I had the same issue when using vim on windows.

I found that it does work if you use notepad and save it as the default "ANSI"

查看更多
Viruses.
5楼-- · 2019-07-12 21:13

I had similar problems, but saving in Unix format made it work for me.

Though, another problem seems to be that the packaged .exe somehow caches the code to execute. If I change the source code, run packager to recreate the exe, and then starts the exe again, nothing seems to have happened to it. Even deleting the .exe before, or moving the source to another folder doesn't seem to solve the problem.

The only solution seems to be to rename the source file. The packager then correctly creates a new .exe with the updated code.

Has anyone had problems like this, or know of a solution? Is there perhaps a temp folder where the packager stores files, which then can't be overwritten so that the "first version" is always used? I've looked into the source code of the packager, but couldn't find anything there...

Christian

查看更多
聊天终结者
6楼-- · 2019-07-12 21:13

I couldn't find a way to produce a working .exe too. Tried saving the source in all possible Unicode encoding variations but still nothing. Shoes r1134. I think I red somewhere this needs to be fixed in the already long awaited next Shoes release ...

查看更多
登录 后发表回答