Rakefile in atome-0.5.6.6.5 vs Rakefile in atome-0.5.6.6.7
- old
+ new
@@ -1,8 +1,7 @@
# frozen_string_literal: true
-
require 'fileutils'
require 'securerandom'
require 'digest/sha2'
require 'rubygems'
require 'rubygems/command_manager'
@@ -11,11 +10,11 @@
load 'exe/atome'
# folder_name = 'lib/eVe'
#
# # allow or deny eVe gem content to be copied to local eVe or not
-refresh_eVe=true
+# refresh_eVe=true
#
# # if refresh_eVe
# # # doesn't work
# # `bundle update`
# # end
@@ -85,12 +84,12 @@
def generate_resolved_file(source_file_path)
root_path = File.dirname(File.expand_path(source_file_path))
resolve_requires(source_file_path, root_path)
end
-def wasm_params(source, destination, project_name, wasi_file, host_mode, script_source, refresh_eVe)
- create_application(source, destination, project_name, refresh_eVe)
+def wasm_params(source, destination, project_name, wasi_file, host_mode, script_source)
+ create_application(source, destination, project_name)
wasm_common(source, destination, project_name, wasi_file, host_mode, script_source)
end
task :test_wasm do
project_name = :test
@@ -112,23 +111,23 @@
'wasi-vfs-osx_x86'
end
destination = './tmp'
script_source = './test/application'
- wasm_params(source, destination, project_name, wasi_file, host_mode, script_source,refresh_eVe)
+ wasm_params(source, destination, project_name, wasi_file, host_mode, script_source)
system "open", file_path
when /linux|bsd/
destination = './tmp'
script_source = './test/application'
wasi_file = 'wasi-vfs-unix pack tmp'
- wasm_params(source, destination, project_name, wasi_file, host_mode, script_source,refresh_eVe)
+ wasm_params(source, destination, project_name, wasi_file, host_mode, script_source)
system "xdg-open", file_path
when /mswin|mingw|cygwin/
destination = '.\\tmp'
script_source = '.\\test\\application'
wasi_file = 'wasi-vfs.exe pack'
- wasm_params(source, destination, project_name, wasi_file, host_mode, script_source,refresh_eVe)
+ wasm_params(source, destination, project_name, wasi_file, host_mode, script_source)
system "start", file_path
else
raise "Système d'exploitation non reconnu"
end
@@ -138,11 +137,11 @@
task :test_opal do
project_name = :test
source = '.'
destination = './tmp'
script_source = './test/application'
- create_application(source, destination, project_name, refresh_eVe)
+ create_application(source, destination, project_name)
# the line below is to add addition script to the application folder (useful for test per example)
add_to_application_folder(script_source, destination, project_name)
# build opal
build_opal_library(source, destination, project_name)
# build parser
@@ -156,29 +155,31 @@
# build application
build_opal_application(source, destination, project_name)
# open the app
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
# code to exec for Windows
- `start #{destination}\\#{project_name}\\src\\index_opal.html`
+ # `start \\tmp\\#{project_name}\\src\\index_opal.html`
+ `start "" "#{destination}\\#{project_name}\\src\\index_opal.html"`
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
# code to exec for MacOS
`open #{destination}/#{project_name}/src/index_opal.html`
else
# code to exec for Unix/Linux
`open #{destination}/#{project_name}/src/index_opal.html`
end
puts 'atome opal is build and running!'
end
+
task :test_server_wasm do
project_name = :test
source = '.'
destination = './tmp'
script_source = './test/application'
wasi_file = 'wasi-vfs-osx_arm'
host_mode = 'pure_wasm'
- create_application(source, destination, project_name, refresh_eVe)
+ create_application(source, destination, project_name)
wasm_common(source, destination, project_name, wasi_file, host_mode, script_source)
puts 'atome wasm is build and running!'
threads = []
threads << Thread.new do
@@ -198,16 +199,18 @@
end
build_for_wasm_server(destination, project_name, 9292, :production)
end
+
+
task :test_server do
project_name = :test
source = '.'
destination = './tmp'
script_source = './test/application'
- create_application(source, destination, project_name, refresh_eVe)
+ create_application(source, destination, project_name)
# the line below is to add addition script to the application folder (useful for test per example)
add_to_application_folder(script_source, destination, project_name)
# build opal
build_opal_library(source, destination, project_name)
# build parser
@@ -228,31 +231,29 @@
timestamp=Time.now.strftime("%Y%m%d%H%M%S")
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
# code to exec for Windows
`start http://localhost:9292?date=#{timestamp}`
- # `start #{destination}\\#{project_name}\\src\\index_server.html`
elsif RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
# code to exec for MacOS
`open http://localhost:9292?date=#{timestamp}`
else
# code to exec for Unix/Linux
`open http://localhost:9292?date=#{timestamp}`
end
end
- build_for_opal_server(destination, project_name, 9292, :production)
+ build_for_opal_server(destination, project_name, 9292, :production, true)
end
-
task :opal_server_rebuild do
project_name = :test
source = '.'
destination = './tmp'
script_source = './test/application'
- create_application(source, destination, project_name, refresh_eVe)
+ create_application(source, destination, project_name)
# the line below is to add addition script to the application folder (useful for test per example)
add_to_application_folder(script_source, destination, project_name)
# build opal
build_opal_library(source, destination, project_name)
# build parser
@@ -294,11 +295,11 @@
source = '.'
destination = './tmp'
script_source = './test/application'
wasi_file = 'wasi-vfs-osx_arm'
host_mode = 'tauri'
- create_application(source, destination, project_name, refresh_eVe)
+ create_application(source, destination, project_name)
wasm_common(source, destination, project_name, wasi_file, host_mode, script_source)
destination = './tmp'
# build and open the app
build_for_osx(destination, :dev)
puts 'atome osx is running'
@@ -309,11 +310,11 @@
source = '.'
destination = './tmp'
script_source = './test/application'
wasi_file = 'wasi-vfs-osx_arm'
host_mode = 'tauri'
- create_application(source, destination, project_name, refresh_eVe)
+ create_application(source, destination, project_name)
wasm_common(source, destination, project_name, wasi_file, host_mode, script_source)
destination = './tmp'
# build and open the app
build_for_osx(destination, :build)
puts 'atome osx is running'
@@ -335,11 +336,11 @@
task :osx_server do
project_name = :test
source = '.'
destination = './tmp'
script_source = './test/application'
- create_application(source, destination, project_name, refresh_eVe)
+ create_application(source, destination, project_name)
# the line below is to add addition script to the application folder (useful for test per example)
add_to_application_folder(script_source, destination, project_name)
# build opal
build_opal_library(source, destination, project_name)
# build parser
@@ -358,11 +359,11 @@
source = '.'
destination = './tmp'
script_source = './test/application'
wasi_file = 'wasi-vfs-osx_arm'
host_mode = 'tauri'
- create_application(source, destination, project_name, refresh_eVe)
+ create_application(source, destination, project_name)
wasm_common(source, destination, project_name, wasi_file, host_mode, script_source)
destination = './tmp'
threads = []
threads << Thread.new do
build_for_opal_server(destination, project_name, 9292, :production)
@@ -399,11 +400,10 @@
gem_builder
puts 'atome gem built and installed'
end
-
task :push_gem do
# building gem
gem_builder
@@ -432,11 +432,10 @@
`cd pkg; gem push #{latest_file}`
end
puts "#{latest_file} pushed"
end
-
task :full_test do
# building the gem
`rake build` # run build_app thru ARGV in exe atome
# installing the gem
@@ -458,10 +457,10 @@
# now building new test app
project_name = :test
source = '.'
destination = './tmp'
script_source = './test/application'
- create_application(source, destination, project_name, refresh_eVe)
+ create_application(source, destination, project_name)
# the line below is to add addition script to the application folder (useful for test per example)
add_to_application_folder(script_source, destination, project_name)
# build opal
build_opal_library(source, destination, project_name)
# build parser