user3577896
user3577896

Reputation: 25

Pack all files to one

I want pack my all files to one file (exe). I have been used Costura Fody, all is okey, program is run, I saw my one window (wpf), but when my program want open another window (OpenWindow()) - I dont see it.

I trying too add "resources" in properties of my project.

I use awesomium (webkit for c#), can it matter?

Here is code of my program:

namespace adek
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            CopyProgram();
        }

        public void SaveVisitor()
        {
          //remove for clean
        }

        public async Task<int> CheckTime()
        {
            while (true)
            {
               //remove for clean 
                OpenWindow();   
                await Task.Delay(120000);
            }

            return 1;
        }

        public void OpenWindow()
        {
            ad win2 = new ad();
            win2.RunTask();
        }

        public void CopyProgram()
        {
            if (aboutme.DirectoryName == destination)
            {
                CheckTime();
            }
            else
            {
                SaveVisitor();
                CheckTime();
                try
                {
                    File.Copy(me, destination + "\\" + aboutme.Name);
                }
                catch { }
            }
        }

         }
}

So, How to make it work?

Thank you for any help

Upvotes: 0

Views: 103

Answers (1)

galenus
galenus

Reputation: 2127

The awesomium component definitely could be a problem, because it has an unmanaged part, and I don't think Costura can take care of this.

Look at other solutions like BoxedApp Packer or Enigma Virtual Box. They are not free products, however, and I am not aware of any free alternative.

Upvotes: 1

Related Questions